Part of the OpenCode enhancement-parity track (see #113 for the baseline + progressive-enhancement model; per-enhancement wiring guide in docs/progressive-enhancements.md).
harnesses/opencode.toml currently declares no [dispatch] block and no [model] table, so run --harness opencode prints generic manual-opencode run guidance and --agent-model/--judge-model are recorded as provenance only (README support table footnote ¹).
Work
Add a [dispatch] block (exec_template, parallel_command_template, judge_command_template, next_steps_template, manifest_template, capture_prefix = "opencode") plus [model] flag = "-m" to harnesses/opencode.toml. These must land together: descriptor validation ties judge_command_template's $model_arg to a declared model flag.
Verified CLI facts (opencode v1.18.3 docs + packages/opencode/src/cli/cmd/run.ts)
opencode run --dir <dir> resolves the project instance against <dir> and chdirs there, so staged .opencode/skills in the env are discovered.
- Piped stdin is appended to the message (
Bun.stdin.text() when stdin is not a TTY) — recipes must detach with </dev/null>, same as codex.
- Headless permission asks are auto-rejected unless
--auto is passed. The dispatch prompt lives outside the task env dir, and external_directory defaults to ask, so recipes need --auto (explicit deny rules are still enforced under --auto — relevant once the write guard lands).
--format json streams raw JSON events (tool_use / text / step_finish / error) to stdout; there is no --output-last-message — the final message is recovered from text events by transcript ingest.
-m takes models in provider/model format; the value passes through verbatim.
Proposed template shape
opencode run --dir <eval-root> --format json --auto{model_arg} \
"Read the file at <dispatch_prompt_path> and follow its instructions exactly. When you finish, make your final response your closing summary." \
</dev/null \
> <outputs_dir>/opencode-events.jsonl \
2> <outputs_dir>/opencode-stderr.log
(parallel + judge variants per the codex descriptor's structure; next_steps_template points at eval-magic ingest --harness opencode.)
Acceptance
Sequenced after the transcript-ingest work so next_steps_template can reference ingest (avoids blessing the handoff text twice).
Part of the OpenCode enhancement-parity track (see #113 for the baseline + progressive-enhancement model; per-enhancement wiring guide in
docs/progressive-enhancements.md).harnesses/opencode.tomlcurrently declares no[dispatch]block and no[model]table, sorun --harness opencodeprints generic manual-opencode runguidance and--agent-model/--judge-modelare recorded as provenance only (README support table footnote ¹).Work
Add a
[dispatch]block (exec_template,parallel_command_template,judge_command_template,next_steps_template,manifest_template,capture_prefix = "opencode") plus[model] flag = "-m"toharnesses/opencode.toml. These must land together: descriptor validation tiesjudge_command_template's$model_argto a declared model flag.Verified CLI facts (opencode v1.18.3 docs +
packages/opencode/src/cli/cmd/run.ts)opencode run --dir <dir>resolves the project instance against<dir>andchdirs there, so staged.opencode/skillsin the env are discovered.Bun.stdin.text()when stdin is not a TTY) — recipes must detach with</dev/null>, same as codex.--autois passed. The dispatch prompt lives outside the task env dir, andexternal_directorydefaults toask, so recipes need--auto(explicitdenyrules are still enforced under--auto— relevant once the write guard lands).--format jsonstreams raw JSON events (tool_use/text/step_finish/error) to stdout; there is no--output-last-message— the final message is recovered fromtextevents by transcript ingest.-mtakes models inprovider/modelformat; the value passes through verbatim.Proposed template shape
(parallel + judge variants per the codex descriptor's structure;
next_steps_templatepoints ateval-magic ingest --harness opencode.)Acceptance
[dispatch]+[model]declared;eval-magic harness lint opencodecleanGOLDEN_BLESS=1 cargo test golden_) covering RUNBOOK/dispatch-manifest/next-steps for--harness opencodeopencode runper the recipe in a scratch env verifies: staged skills discovered, events file ingests cleanly, model flag honoreddocs/opencode-notes.mdupdated; README support table flips Dispatch recipes and Model flag to ✅ and footnote ¹ is removedcargo test,cargo clippy --all-targets -- -D warnings,cargo fmt --checkgreenSequenced after the transcript-ingest work so
next_steps_templatecan referenceingest(avoids blessing the handoff text twice).