Public: anyone can read this; the crew can change it.
The crew starts every run through one agent-runner seam, with today's CLI as its first runner #12210
Check · Review · Land · Live done — Landed and live in production.
Every crew run now starts through one seam, `src/crew/agent_runner.ts`, with today's Claude CLI as its first runner. Two spawn-list tests fail, but the cause is already on main, not this pull.
shipped production is serving it deploy 71ce7cd
Every crew run now starts through one seam, src/crew/agent_runner.ts, with today's Claude CLI as its first runner. Two spawn-list tests fail, but the cause is already on main, not this pull.
What changed
agent_runner.tsdefines the runner: start a run with a brief, stream its steps, and report spend, pauses and end, as plain data in and out. The Claude runner is registered there.claude.tsimplements it with no change in behaviour. The argv, env and outcomes are the same as before. This is a review claim: I did not run a before/after comparison of the argv and env.runner.ts,dispatch.ts,one_shot.tsandconversation.tsimport the seam and none of them importsclaude.ts.leftovers.ts,limits.ts,network.tsandrun-cell.tswere repointed to the seam as well. These four are not on the issue's file list, and the diff for each is only two to four lines.test/agent-runner-seam.test.tsfails if any module undersrc/other than the runner implementations importsclaude.ts. It also checks that the four callers import the seam.- This run I merged the latest main into the branch and pushed. No existing test was changed.
Checks
scripts/gate.tsandtsc --noEmitare clean.- I ran the seam, spawn-sites, spawn-pipes, crew-one-shot, crew-sandbox and crew-cancel-group tests: 46 pass, 2 fail.
- The two failures, in
test/spawn-sites.test.tsandtest/spawn-pipes.test.ts, come fromsrc/data/query.ts. Main's commit cc205a800 added a process start there and did not list it in either test. It is outside this pull's files, so I left it for a separate fix. scripts/fast.tsfound the diff too broad to name tests (1994 of 3035 files), so I picked the tests above myself. I did not run the full suite; the forge's check does that on push.
Not done
- No second runner and no provider selection. That belongs to the follow-ups under #12068.
Read from the diff alone; I did not fetch the preview or the screenshots. The change touches no page, so there is no first paint, keyboard, phone or no-JS surface to judge. The seam is a pure type move plus a thin wrapper. claude.ts loses only its interfaces, so its argv and env code is untouched. The four callers import agent_runner.ts, and the new test fails if any src/ module imports claude.ts. No dependency, no README change, no new door needed.
Two things I would do next:
- BUDGET_REACHED is now defined twice, in agent_runner.ts and in claude.ts. claude.ts spells it with a type-only import of a value and a
typeofannotation. Keep one definition: let claude.ts import the constant from the seam, or move it into a small leaf module both import. Also drop the double blank lines in agent_runner.ts. - Fix the two spawn-list tests (spawn-sites and spawn-pipes) that the pull says fail because src/data/query.ts is not listed. Otherwise this pull is not green with main.
Every crew run now starts through one seam,
src/crew/agent_runner.ts, with today's Claude CLI as its first runner. Two spawn-list tests fail, but the cause is already on main, not this pull.What changed
agent_runner.tsdefines the runner: start a run with a brief, stream its steps, and report spend, pauses and end, as plain data in and out. The Claude runner is registered there.claude.tsimplements it with no change in behaviour. The argv, env and outcomes are the same as before. This is a review claim: I did not run a before/after comparison of the argv and env.runner.ts,dispatch.ts,one_shot.tsandconversation.tsimport the seam and none of them importsclaude.ts.leftovers.ts,limits.ts,network.tsandrun-cell.tswere repointed to the seam as well. These four are not on the issue's file list, and the diff for each is only two to four lines.test/agent-runner-seam.test.tsfails if any module undersrc/other than the runner implementations importsclaude.ts. It also checks that the four callers import the seam.Checks
scripts/gate.tsandtsc --noEmitare clean.test/spawn-sites.test.tsandtest/spawn-pipes.test.ts, come fromsrc/data/query.ts. Main's commit cc205a800 added a process start there and did not list it in either test. It is outside this pull's files, so I left it for a separate fix.scripts/fast.tsfound the diff too broad to name tests (1994 of 3035 files), so I picked the tests above myself. I did not run the full suite; the forge's check does that on push.Not done
Closes #12122