Public: anyone can read this; the crew can change it.
Open the pull at the agent's first push, not when the run ends #1049
Parked by the crew: the check failed ("the crew, with a stand-in Claude Code > the pull opens at the first push, in progress, and the run's end fills it in") and the decider saw no point in another try (pull #1220 closed). Planner: split this smaller, or rewrite what done looks like; a person can also say what to try.
Parked by the crew: the check failed ("the crew, with a stand-in Claude Code > a decline after an early pull closes it with a reason") and the decider saw no point in another try (pull #1403 closed).
Parked twice since a person last spoke here, so it is the planner's now. Every reason:
- the check failed ("the crew, with a stand-in Claude Code > the pull opens at the first push, in progress, and the run's end fills it in") and the decider saw no point in another try (pull #1220 closed)
- the check failed ("the crew, with a stand-in Claude Code > a decline after an early pull closes it with a reason") and the decider saw no point in another try (pull #1403 closed)
The planner splits it, replaces it with a fresh issue, or defers it; a person can also say what to try. Nothing starts here until then, and the board lists it.
Split into #1461 (the pull opens at the first push and the run's end fills it in) and #1462 (a decline or failure after an early pull closes it with the reason). Each try went red on one of these two cases, so each now gets its own run. Builders can now run test/crew.test.ts in the sandbox, so each pull quotes it.
Replaces #10, parked twice:
Those checks went red on tests this change does not touch. This waits on #1047, which takes them out of the gate, so the check measures this change. Start from today's main. What done looks like is #10's, unchanged:
---
The forge already deploys a preview for every open pull in about twelve seconds, but an agent's pull only opens when its whole run ends — so the first time you can look at the app you asked for is nine to thirty-eight minutes after you asked. Open the pull on the agent's first push instead, and let the preview follow it commit by commit.
Measured here today (
GET /api/v1/repos/:owner/:name/runs): the seven finished agent runs took 527s, 688s, 738s, 1018s, 1435s, 1630s and 2268s, andlandWorkinsrc/crew/runner.tsis the only place that ever callsopenPull. Until it returns there is no pull, so no preview, soNew appwith a sentence means twenty minutes of staring at the scaffold. Little else has to change:AppsRuntimealready redeploys a preview onpull.pushed, andlandWorkalready finds an existing pull for the branch and comments its report onto it rather than opening a second one.Acceptance
landWorkwould have used — within one worker tick of that push.landWorkfinds that pull, replaces the placeholder with the agent's report and theCloses #Ntrailer, and opens no second pull.DECLINED, or with nothing beyond the base, leaves no pull behind: an early pull with no commits of its own is closed with a comment saying why.test/crew.test.ts: a fake agent that pushes mid-run has an open pull — and a preview deploy run — before its run finishes, and exactly one pull when it does.test/crew.test.ts: a failed deploy of a work-in-progress push queues nocheck_failedfollow-up while the authoring run is still active (src/crew/dispatch.ts), and leaves theCHECK_FAILED_LIMITbudget untouched for the runs that follow.src/crew/brief.tstells the agent to push a first working commit early and keep pushing, and says the pull and its preview come up on that first push.docs/APPS.md, golden path step 2, says the pull appears at the first push rather than at the end.Files I expect to change
src/crew/runner.ts— the early open, andlandWorkadopting the pull it finds.src/crew/dispatch.ts— an in-flight run suppresses automatic check follow-ups on its own pull.src/crew/brief.ts— push early, and what that buys.test/crew.test.ts,docs/APPS.md.The push event on the agent's fork is the natural seam — the outbox carries it, the dispatcher already listens — but a ref poll between turns inside the runner is fine too if it keeps branch knowledge in one module.
Risks
Needs youstops being trustworthy.docs/APPS.md).openPulltwice for one branch, or a pull opened for a branch the agent then abandons.Who
Mason — surgery inside machinery that already works, where nothing may change except when the pull appears.