Repository navigation
Description
Problem Statement
The local driver runs only claude and codex. People run many other agent CLIs that start a headless run, resume it by a session id, and stop when their process ends. The drivers census (private) found nine of them buildable today: Pi, OpenCode, GitHub Copilot CLI, Cursor CLI (agent), Goose, Gemini CLI, Kimi Code, Qwen Code and Cline CLI. Each one, copied into its own driver, would repeat the local driver's supervisor, its permission-mode rules and its stop logic nine times.
Solution
Each of the nine CLIs becomes one harness row on the one local driver (adapters/local/), not a copied driver (J316 (a), a two-way door). A row is a small data file in its own folder. It gives the CLI's headless start, its resume by session id, the permission modes the owner may approve and where its login lives. The driver keeps doing everything else the same way: the clone, the approvals, the supervisor, and the stop that ends the whole process tree. A user who has signed in to Pi picks "harness": "pi" and gets a fleet builder on Pi.
Changelog headline
The local driver now runs nine more agent CLIs, each through your own sign-in: Pi, OpenCode, GitHub Copilot CLI, Cursor CLI, Goose, Gemini CLI, Kimi Code, Qwen Code and Cline CLI.
User Stories
- As a Pi (or OpenCode, Copilot, Cursor, Goose, Gemini, Kimi, Qwen or Cline) user, I start a builder on my ticket with that harness, and it uses the login I already have on my machine.
- As a user, a wake reaches the same agent session: the CLI resumes it by its session id and edits its own status note.
- As a user,
stopends everything the run started, including any background service or hub that the CLI started for it. - As an owner, I approve one permission mode per repository and harness, as today, and the driver passes only that mode's fixed arguments from the row.
- As a row author, I add one folder and touch no shared file. The contract's check tells me exactly what my row breaks.
- As a reviewer, I can trust a row, because the kit's five checks pass against it on fixtures with a fake CLI that accepts only the real CLI's documented command line.
Implementation Decisions
- The contract,
adapters/local/harness-row.md(HR1): a row isadapters/local/harnesses/<harness>/row.json, read with standard-library JSON, never run as code. Its fields:harness: the start field's value, equal to its folder name;program: the command found onPATH;startandwake: argument lists, where each placeholder fills a whole argument:{prompt},{model},{session}and{mode};session: how the driver knows the session id:{"chosen": "uuid"}(the driver makes a UUID and passes it at start),{"json": [<key path>]}(the first JSON line of the run's output that has that path), or{"pattern": "<regex with one group>"}. A session id must match[A-Za-z0-9._:-]{1,100}and must not look like a credential by the kit's check;modes: each mode value the owner may approve, mapped to the fixed arguments it adds where{mode}is;env: fixed, non-credential variables the turn gets, such as a CLI's local-backend switch;login: one line saying where the CLI's own login lives;daemon:none, or one line naming the background process the CLI may start and how stop ends it.
- The driver (HR1) loads a row only for the harness that a start names. Claude and codex stay built in and unchanged, and no row may use either name. Wake substitutes the saved session id. When a reported id hasn't been seen yet, wake refuses with a D3 error and starts nothing. Stop is unchanged: it ends the whole process tree. Approvals, the fleet.md row per harness, the first-turn watch and the credential check all apply to rows unchanged.
- The kit check for rows,
adapters/local/test_harnesses.py(HR1): for every row folder it checks the row against the contract, then runskernel/driver-kit/kit.pyon fixtures with the row's own fake CLI. It needs the kit's five checks, and also: the wake turn got the same session id as the start turn; everyenvvalue passes the kit's credential check; and the fake's background process, when the row declares one, has ended after stop. The kit's files are not changed. - The fake CLI per row is
harnesses/<harness>/fake. It is built on the shared libraryadapters/local/fixtures/fake_cli.py(HR1), and it exits 2 on any command line that the real CLI's documentation doesn't allow. - Effort (J318): a user must always be able to set effort. Every row either passes the user's effort to the CLI, through a named flag or setting in its
effortmap, or says plainly inrow.jsonand in its README'sEffort:table line that the host can't set effort. The local driver'sversionlistseffortincan, because claude and codex take it, and carries no per-row note, because its schema is fixed. A start with an effort never silently falls back to a default: a row that can't take it refuses. Theeffortstart field comes from driver v1's change in 0.1.2 spec: Effort everywhere: every driver passes the user's effort, or says plainly it can't #2471. HR1 builds the row field, the refusal and the runner check below that field, and the runner proves the value reaches the fake CLI's command line or environment. - Disjoint rows: each row ticket owns only
adapters/local/harnesses/<harness>/. That folder holdsrow.json,fake,README.md(the login line, the commands, the census check resolved from primary sources, with links), an optionaltest_row.py, which the runner also runs, andevidence/. No row edits the driver, the local README, CI or the release lists:adapters/local/**is already covered there. - Merge gate: as driver v1 section 3 sets it for any new host, a row merges only after its live check records 5 of 5 at the row pull request's approved head. HR1 merges on fixtures and review, after polish F (#2292: 0.1.1 polish F: the boat and local drivers #2321), whose approved head it stacks on.
Testing Decisions
-
Seam 1: the contract runner against planted rows under
adapters/local/fixtures/rows/, red first. Each planted row must fail with a named reason:- a wake with no
{session}; - a placeholder inside a larger argument;
- a credential in
env; - a background process that survives stop;
- a fake that is handed a different session id on wake;
- a row named
claude; - a row that claims effort but never passes it;
- a row with no effort form.
One good example row passes.
- a wake with no
-
Seam 2: each row passes the runner with its own fake, red first, against an empty row.
-
Prior art:
adapters/local/test_driver.pyand its fake harness, and the kit's planted drivers.
Proof
- P1 (contract): the runner's red and green on planted rows, in
adapters/local/evidence/, plustest_driver.pystill green. - P2 (each row): its runner pass on fixtures, red first, in the row's
evidence/. Its README resolves the census check with primary-source links. - P3 (stop): OpenCode's background service and Cline's hub, each simulated by its fake and backed by primary sources, have ended after stop.
- P4 (live): each row's live 5-of-5 on a real signed-in CLI, a person's ticket.
Checkpoints
- One-way door: no
- User-visible: yes
Live check
For each row, a person signs in to that CLI on their own machine and runs the kit against the local driver with that harness, on one throwaway ticket, at the row pull request's approved head. 5 of 5 is recorded on that pull request.
Out of Scope
- Copying a driver for each CLI.
- Changing claude's or codex's behaviour.
- Cloud products and daemon-only hosts.
- Harness wave 2, census rows 10 to 15: those are spec 0.1.2 spec: Harness wave 2: Kilo Code, Crush, Mistral Vibe, Auggie, Kiro and Junie as local harness rows #2424, built on this contract.
- Any change to the kit's files.
Further Notes
The source is the drivers census (private), rows 1 to 9. J316 (a) is the ruling: local CLIs become harness rows on the one local driver, a two-way door. The go is J314.
Activity
11 remaining items
jparker2006 commentedon Nov 22, 2026
Plan change since revision 3: #2431 (HR1) body only, by the planner's ruling.
signed_out(fixed patterns that mean the CLI isn't signed in) andlogin_command(the sign-in command named in the not-signed-in D3next).row.jsonfails the contract check.HR1's builder is running and was told. The row bodies, the arrows and the picture are unchanged, and no ticket without a builder is touched.
jparker2006 commentedon Nov 22, 2026
Machine plan approval, 2026-11-22, revision 4: links, relies, sizes, width and owned paths passed.
Grill confirmed: https://github.com/jparker2006/ClosedWiz/issues/3065#issuecomment-7087025217
Checks: 19 tickets; links 18; relies 10; sizes S 9, M 9, L 1; width: chain 3, widest 9; owned paths 10.
Changed since revision 3: #2431 body: the optional signed_out and login_command row fields, and the missing row.json check (planner ruling).
Fingerprint:
c20d53641ff3bf7fbb05168a27cc42d5150678b98986e6174d4e7efc66393db1Revision text
jparker2006 commentedon Nov 22, 2026
Plan change since revision 4: #2431 (HR1) body only. A row's
signed_outpatterns match anywhere in a log line, including inside JSON, and an exit-0 turn that matches fails start. This came from a row whose signed-out output is a JSON line with exit 0. The driver's built-in check keeps its line-start rule. Nothing else changes, and the builder was told.jparker2006 commentedon Nov 22, 2026
Machine plan approval, 2026-11-22, revision 5: links, relies, sizes, width and owned paths passed.
Grill confirmed: https://github.com/jparker2006/ClosedWiz/issues/3065#issuecomment-7087025217
Checks: 19 tickets; links 18; relies 10; sizes S 9, M 9, L 1; width: chain 3, widest 9; owned paths 10.
Changed since revision 4: #2431 body: signed_out patterns match anywhere in a line, and an exit-0 match fails start.
Fingerprint:
95e565a3efcb28519b2ce391603d4f81d9aa81bd25b95715ef2c114433dc3d14Revision text
jparker2006 commentedon Nov 23, 2026
Plan change since revision 5: #2538 (row commands: the declarative
precheckandstoprow fields, size M) joins this spec, natively blocked by #2431 (merged). The planner ranked it 12th and released it from the seal hold. Its body now names its parent, and astopmay use only{session}, with a fixed timeout. No other ticket, arrow or body changes.jparker2006 commentedon Nov 23, 2026
Machine plan approval, 2026-11-23, revision 6: links, relies, sizes, width and owned paths passed.
Grill confirmed: https://github.com/jparker2006/ClosedWiz/issues/3065#issuecomment-7087025217
Checks: 20 tickets; links 19; relies 10; sizes S 9, M 10, L 0; width: chain 2, widest 10; owned paths 10.
Changed since revision 5: #2538 (row commands: precheck and stop row fields) joins the spec, blocked by #2431 (merged).
Fingerprint:
b343902cf94955a3d8605f56cf8cbb86c8363d99e80bc3c5de26b4a6c1021456Revision text
jparker2006 commentedon Nov 23, 2026
Plan change since revision 6: each harness row ticket (#2449, #2462, #2467, #2473, #2483, #2506, #2515, #2523 and #2530) also owns its own
changes/<ticket>.md, a one-line changelog entry of kind added. A row is a product change, so the changelog check requires the entry. The row PRs passed that check earlier only because GitHub kept a stale base that still carried HR1'schanges/2431.md. No arrow, spec body or other line changes. The rows' builders are done and archived, so none is held. The entries are added after each review, with a delta re-check.jparker2006 commentedon Nov 23, 2026
Machine plan approval, 2026-11-23, revision 7: links, relies, sizes, width and owned paths passed.
Grill confirmed: https://github.com/jparker2006/ClosedWiz/issues/3065#issuecomment-7087025217
Checks: 20 tickets; links 19; relies 10; sizes S 9, M 10, L 0; width: chain 2, widest 10; owned paths 10.
Changed since revision 6: each row ticket also owns its changes/.md changelog line.
Fingerprint:
06f2b0004b0d890ca26706ba3a63adb2e62b42d0b5993d107638b58f67655a65Revision text
jparker2006 commentedon Nov 24, 2026
Plan change since revision 7: MG1 #2904 joins this spec, natively blocked by #2431 (merged). By the planner's ruling, driver v1's
modelfield accepts provider-qualified ids (/-separated segments). Reviews found the gap on the Pi, Kimi and OpenCode rows. Pi #2449 and Kimi #2515 keep their model finding disputed as blocked on MG1. No other ticket, arrow or body changes.jparker2006 commentedon Nov 24, 2026
Also since revision 7: SG1 #2918 joins this spec, natively blocked by #2431 (merged). It adds an optional
login_envrow field, so a row's not-signed-in error can also name a key's environment variable. The case came from wave 2's Kiro and Junie rows.jparker2006 commentedon Nov 24, 2026
Plan change, before revision 8: to keep the owned paths disjoint, #2538, MG1 #2904 and SG1 #2918 now name exact paths. #2538 names its nine planted-row folders, #2904 each driver's
schema.jsonandchanges/2904.md, and #2918 its fivelogin-env-*rows andchanges/2918.md. No scope changes. All three builders are running and were told.jparker2006 commentedon Nov 24, 2026
Machine plan approval, 2026-11-24, revision 8: links, relies, sizes, width and owned paths passed.
Grill confirmed: https://github.com/jparker2006/ClosedWiz/issues/3065#issuecomment-7087025217
Checks: 22 tickets; links 21; relies 12; sizes S 9, M 12, L 0; width: chain 2, widest 12; owned paths 12.
Changed since revision 7: MG1 #2904 (driver v1 model grammar) and SG1 #2918 (login_env row field) join the spec, each blocked by #2431 (merged); #2538, #2904 and #2918 now name exact owned paths.
Fingerprint:
9871f47bd50aa4734dc9c48aadbba8a1043ddfa54132ebca0724f518f9d8ece3Revision text