feat(opencode): add OpenCode as a third harness alongside Codex/Claude#23
Open
d180 wants to merge 2 commits into
Open
feat(opencode): add OpenCode as a third harness alongside Codex/Claude#23d180 wants to merge 2 commits into
d180 wants to merge 2 commits into
Conversation
6d3c1ee to
434ca3e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
opencode serveprocess management, an HTTP client, event/part mapping, and setup wizard + transcript discovery integration.glob/read/bash) have no internal timeout and can hang forever.harness.modelconfig validation from a fixed allowlist to aprovider/modelshape check, since OpenCode is a router that accepts any provider the user has authenticated — unlike Codex/Claude, which genuinely only offer a fixed handful of models and keep their allowlists.append_event/emit_result, which had drifted into three separate copies across the Codex/Claude/OpenCode harnesses, into one shared module.start_opencode_server()never resolved theopencodeexecutable throughPATH/PATHEXT, so an npm-installed shim would passcheck()'s version probe but fail every real run.Why
OpenCode was the one harness planned but not yet built (tracked in issue #9). Building it surfaced a real reliability gap (OpenCode's tool layer can hang indefinitely with no error), which needed a fix beyond just wiring up the adapter, or the harness would be unusable on any real repo.
Verification
Also live-tested end-to-end against a real project and a real opencode serve instance (not just fixtures): init and garden both completed cleanly with a healthy resulting wiki (codealmanac health reports zero orphans/dead refs/broken links).
Docs and wiki
Notes for reviewers
status=runningindefinitely after subprocess exits — pipe FD leak in spawn anomalyco/opencode#29294 (shell tool staysstatus=runningindefinitely after subprocess exits — pipe FD leak in spawn anomalyco/opencode#29294), Bug: Glob tool hangs indefinitely with chutes provider anomalyco/opencode#2102 (Bug: Glob tool hangs indefinitely with chutes provider anomalyco/opencode#2102). If you see a run fail with an error like OpenCode's "glob" tool call has been stuck for 240s+ with no response (session ses_...) — this is a known upstream OpenCode reliability issue (...), not specific to this run., that's this — the watchdog in integrations/harnesses/opencode/progress.py caught it and killed the run rather than hanging indefinitely; it is not a bug in this codebase, and there's nothing further to debug on our side beyond confirming the stuck tool/session in the error message.Closes #9