Deploy restarts production while a step waits on an agent question #32
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
On 2026-09-15,
openspec.apply[3]of run_01M2HF4SNRBVJ6TA8ZX11T2Z4H asked a "Status" question at 05:18:08. The deploy offd581bfrestarted Braid at 05:19:05, and the agent's opencode session went with it. The operator's answer at 05:19:27 came backgone(404).deploy/wait-for-idle.shreadsrunning_stepsfrom/api/status, and that counts onlyprovisioning,runningandinterrupting. A step parked on an agent's question tool isawaiting_approval, so it counted as idle. The script's comment says "a gate is a row, not a process". That holds for ahuman.*step, but not for an agent question, which is a live session inside a runningopencode serve.Expected: the deploy waits while any step is waiting on an agent question, the same as while one is running. A human-gate step still does not delay it.
Fixed in
d1923bb, deployed witha4f4ac7(archived asdeploys-wait-for-agent-questions).GET /api/statusnow also reportsbusy_steps: provisioning, running, interrupting, andawaiting_question, because an agent's question lives in its session and a restart ends it.running_stepskeeps its meaning.deploy/wait-for-idle.shwaits onbusy_steps, falling back torunning_stepsfor a build that predates the field. A human gate still does not delay a deploy.On production:
/api/statusanswersbusy_steps. This deploy itself ran against the old build, so it waited onrunning_steps; it hit the 60-minute limit while the run's steps kept running back to back, and deployed anyway at 07:14 UTC. Recovery completedopenspec.reconcile-tasksfor free (its predicate held), andopenspec.test.unitstarted on the new build.