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

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

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

opened this

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.ts defines 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.ts implements 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.ts and conversation.ts import the seam and none of them imports claude.ts. leftovers.ts, limits.ts, network.ts and run-cell.ts were 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.ts fails if any module under src/ other than the runner implementations imports claude.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.ts and tsc --noEmit are 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.ts and test/spawn-pipes.test.ts, come from src/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.ts found 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.

Closes #12122

commented

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.ts defines 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.ts implements 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.ts and conversation.ts import the seam and none of them imports claude.ts. leftovers.ts, limits.ts, network.ts and run-cell.ts were 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.ts fails if any module under src/ other than the runner implementations imports claude.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.ts and tsc --noEmit are 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.ts and test/spawn-pipes.test.ts, come from src/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.ts found 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.
Approved

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:

  1. 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 typeof annotation. 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.
  2. 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.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs