Add Pi and OMP harnesses with OMP as the default - #913
Conversation
Performance
⚠ Regression detected:
|
📊 Coverage gateThresholds from
✅ Gate passedNo surface regressed past the allowed threshold and the aggregate stayed above the floor. |
📐 Patch coverage gateThreshold: 80% on lines this PR touches vs
✅ Patch gate passedEvery surface whose lines were touched by this PR has patch coverage at or above the threshold. |
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
- Go pi.go: build the plan-mode read-only tool list as a fresh slice instead of the in-place tools[:0] filter, matching the Python/TS providers and removing the aliasing footgun. - Go pi.go: distinguish a negative return code (signal kill) from a plain non-zero exit, reporting 'Process killed by signal N.' to match the Python provider and the gemini/opencode Go providers. - Add a pi_test.go case pinning the signal-kill message.
|
Addressing the review findings on this PR. Code changes (commit
Release-note callouts (PR body, "Compatibility" section):
Not changed (reviewed, left as-is to keep the diff minimal):
Verification: |
Product outcome
AgentField can now run Pi and OMP as first-class coding harnesses from Python, TypeScript, and Go. OMP is the consistent zero-configuration default, while explicit provider selection remains fully supported. A production-shaped Go example fans one task out to Pi and OMP concurrently and joins their typed results in a single AgentField workflow.
This closes the practical parity gap with OpenCode: applications use the same AgentField harness contract for model selection, project root, system prompt, tools, permissions, session resume, structured output, retries/timeouts, and normalized usage metrics.
Developer experience
sonnetfallback into provider-neutral calls.provider="opencode"orprovider="pi"are unchanged.harness=omp) across Python, TypeScript, and Go.af harness doctorrecognizes both CLIs, reports binary/version/auth/usability, and lists OMP first as the default.Architecture
#variant→--model+--thinking--cwdplus process cwd for OMP--session; OMP--resumefind; OMPglobParity assessment
Pi and OMP have feature parity with OpenCode at the AgentField contract boundary. Native flags are intentionally not identical: each adapter translates its CLI's approval, resume, project-root, and filesystem-search vocabulary. Those differences do not leak into application code.
Covered contract surface:
Installation and operations
npm install -g --ignore-scripts @earendil-works/pi-coding-agent curl -fsSL https://omp.sh/install | sh af harness doctor --provider pi,omp --jsonThe doctor check is static and does not make a paid model request. Containers should install the selected CLI during image construction and run the doctor as a startup/CI gate.
Go workflow example
examples/go_agent_nodes/cmd/harness_duoregisters:comparestarts both branches concurrently and joins their structured results. It defaults toopenrouter/minimax/minimax-m2.7and acceptsopenrouter/google/gemini-2.5-flashfor a faster smoke path.Verification
0.84.1and OMP17.2.15, both authenticated through OpenRouter and usable.run_20260812_164308_d2tasl3y/exec_20260812_164308_fp15z9ifsucceeded in 19.4s withopenrouter/google/gemini-2.5-flash;compare,pi_worker, and the provider-lessomp_workerall completed with structured output and native cost/token metrics.run_20260812_162041_fw7j8b54withopenrouter/minimax/minimax-m2.7.Compatibility
Two intentional default changes are called out here because they change behavior for callers that previously got a loud failure or a Claude-specific model:
No harness provider specifiedin all three SDKs. It now silently selects OMP (and makes a live model call). Callers who relied on that error to catch a misconfiguration are affected. Users who want another default can set it once inHarnessConfig; explicitprovider=...calls are unchanged.HarnessConfig.modeldefault changed from"sonnet"toNone. Python callers who omittedmodelpreviously got the Claude-specificsonnetfallback; they now get whatever model the selected CLI is configured with. Go and TypeScript had no model default and are unaffected.Explicit provider configurations are otherwise unchanged.