Repository navigation
Description
Parent
Ticket HR3 of spec #2427 (0.1.2): OpenCode as a harness row on the local driver. Size: M.
What to build
The opencode row, under the harness-row contract adapters/local/harness-row.md (#2431), in its own folder adapters/local/harnesses/opencode/. Branch from #2431's approved head as a draft pull request that names that commit. Merge after #2431, and after this row's live check.
From the drivers census (private), to confirm against primary sources:
- Program:
opencode - Start:
opencode run --format json --model <provider/model> "<p>"(the JSON events carry the session id) - Wake:
opencode run -s <sessionID> "<msg>" - Stop: kill the process tree (the driver's own stop)
- Login:
opencode auth login, saved in~/.local/share/opencode/opencode.db
The CLI reports the session id in its output (json or pattern), and the fake prints it the way the real CLI does.
The census check to resolve: does run start the shared background service and leave it running? Find out from the source at the release you target, and from opencode run --help. The stop check must prove that whatever run starts has ended. If run attaches to a service the user started themselves, use the documented flag or variable that keeps it in-process, and put it in env or the args. If no such flag or variable exists, stop and ask on this ticket. Resolve it from the primary sources below: the CLI's own docs, source and --help at a named version. Then write the answer and its links in the README. Run no live test and sign in to nothing: the live run is the person's ticket.
Effort (J318): the user must always be able to set it. Find from primary sources how this CLI sets reasoning effort: a flag, a model variant, a config key or an environment setting. If it has one, map each effort value in the row's effort object to that exact flag or setting, and the runner shows the user's value reaching the fake's command line or environment. If it has none, write "effort": "none: <why, with the source>" and say so in the README. A start with an effort then refuses, and never falls back to a default.
Sources: commands.mdx, server, opencode run --help v1.19.6. Note that the dev-branch docs describe v2 and the released --help shows v1, so name the version you build against.
The folder:
row.json;fake: built onadapters/local/fixtures/fake_cli.py. It accepts only the documented command lines and exits 2 on anything else;README.md: it opens with where the login lives, then gives the commands, the modes, the resolved check with links, andLive check: #<n>, the live ticket that this one blocks;- optional
test_row.pyfor this CLI's own rules; evidence/with red and green.
Stop must end the background service. Its fake starts a stand-in for the background service the way the real CLI would, and the runner proves it has ended after stop. The README gives the primary source for how the real one starts and how it ends: it must be in the run's process tree, or never started at all. This is the spec's P3.
Owned paths
adapters/local/harnesses/opencode/(new)changes/2462.md(new: this row's one changelog line, kind added)
Relies on: adapters/local/harness-row.md, adapters/local/fixtures/fake_cli.py, adapters/local/test_harnesses.py
Links
- 0.1.2 HR1: the harness-row contract, the local driver's row loader and the kit check for rows #2431 real: the harness-row contract, the driver's row loader and the runner that this row must pass
Acceptance criteria
-
python3 -I adapters/local/test_harnesses.pyfails on an emptyopencoderow first (red, saved inevidence/), then passes: the five kit checks, wake reaching the same session id, and the env and stop checks - The fake exits 2 on a command line the real CLI's docs don't allow, and the row's argument lists match the cited docs at a named version
- The README resolves the census check with primary-source links, and says where the login lives. The driver never reads or passes a login
- Effort: the row either passes each effort value to the CLI (the runner proves it on the fake) or says plainly, in
row.jsonand the README, that the host can't set effort, with the source - The pull request changes nothing outside
adapters/local/harnesses/opencode/andchanges/2462.md - Merge gate: merges only after its live check records 5 of 5 at this pull request's approved head
Proof
P2 (the opencode row): the runner's red then green on fixtures. P3 (stop): the background service has ended after stop.
Activity
jparker2006 commentedon Nov 23, 2026
launch-fleet: started
launch-fleet: start checked, branch room/2462-opencode-row
Started at 08:18:45Z after the planner lifted the seal hold, on Claude Fable 5.2 Medium. The record is delayed by GitHub's write pacing. Hand checks read just before the start:
adapters/local/harnesses/opencode/, held by no other open PR or builder.It merges only after its live check #2464 records 5 of 5.
jparker2006 commentedon Nov 23, 2026
agent: builder
state: working
harness: Claude Code
model: claude-opus-5-5
skills: build-ticket@0.2.2
step: Claimed the ticket; the red run on an empty opencode row is pushed.
time: 2026-11-23T08:47:48Z
#2462: the opencode row at OpenCode 1.19.6, its fake, README and test…
#2462 green: the runner passes the opencode row and every planted row…