Skip to content

0.1.2 HR: the OpenCode harness row on the local driver (opencode) #2462

Open

Description

@jparker2006

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 on adapters/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, and Live check: #<n>, the live ticket that this one blocks;
  • optional test_row.py for 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

Acceptance criteria

  • python3 -I adapters/local/test_harnesses.py fails on an empty opencode row first (red, saved in evidence/), 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.json and the README, that the host can't set effort, with the source
  • The pull request changes nothing outside adapters/local/harnesses/opencode/ and changes/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

  1. added this to the 0.1.2 milestone on Nov 22, 2026
  2. added
    ready-for-agent
    held
    and removed
    ready-for-agent
    held
    on Nov 22, 2026
  3. jparker2006 commented on Nov 23, 2026

    @jparker2006
    MemberAuthor

    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:

    It merges only after its live check #2464 records 5 of 5.

  4. jparker2006 commented on Nov 23, 2026

    @jparker2006
    MemberAuthor

    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

  5. added 2 commits that reference this issue on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agent

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions