Repository navigation
Description
Parent
What to build
harness opencode runs a Command's sessions on OpenCode, with MiMo-V2.6-Pro, or any other Model the user's OpenCode providers route, wherever the other Harnesses can be chosen, including [harness.opencode] and Setup. It reuses three earlier pieces: the instruction-file fallback link (agy), skill-tool loading and the read after exit (Muse), and the tree-stop.
Facts: the harness candidates research note, §6. Flags and environment: ADR 0013.
Acceptance criteria
-
Each session runs
opencode run --standalone --format json --auto, with the prompt on stdin, never as an argument, andOPENCODE_DISABLE_AUTOUPDATE=1. The same applies to every Resume and to the check. -
The Model and Effort are passed as
-m <provider>/<model>#<effort>. -
Before any work, the Model and Effort are checked with a minimal standalone test call. A
provider.no-routeerror is reported as a bad Model or Effort. Setup checks its answer the same way and proposes no default Model. -
The Factory skills are linked into
.agents/skills/. The prompt tells the model to load the skill with its skill tool, and a warning is written when the stream has notool_useof theskilltool for that skill. -
When the worktree root has
CLAUDE.mdand noAGENTS.md,AGENTS.mdis linked toCLAUDE.mdthere and kept out of git. -
Once the session exits,
opencode session export --standalone <id>is read:- an outcome of
failedfails the session whatever the exit code; - the final message is the last assistant message's last text part;
- the usage is the sum over the assistant messages.
When the export fails, the final message falls back to the stream's last
textand no usage is shown. - an outcome of
-
The session id comes from the stream. A Resume runs
-s <id>, only ever with an id read from the stream. -
Interrupting a Run stops the session and its shell command, and nothing is left running.
-
A fake
opencodein the test harness reads its prompt from stdin, sometimes drops its laststep_finish, and answerssession export. A sessions scenario test covers the above, including an exported outcome of failed with exit 0. -
The docs list OpenCode: it never reads
CLAUDE.mdor~/.claude/,--standaloneadds 2–3 s per session, and it takes the Model id from the user's provider config.
Activity
JacobStephens2 commentedon Oct 6, 2026
Closed by #447, merged into issue-432 by a thirdshift Merge run.