Summary
Once a task is in rework_required, there is no autonomous transition back to a state where Stage B can be re-dispatched. The tool's own remediation is a human-only command.
Version
opencode-swarm@7.179.1 on OpenCode 1.18.21, Windows 11. The relevant files are byte-identical on the 7.180.0 release branch.
Reproduction
- Task 1.1 reaches Stage B with correct code (reviewer
APPROVED).
test_engineer returns a non-PASS verdict for a tool-argument reason (see the companion issue on SKIPPED). The task moves to rework_required.
- Architect re-dispatches
test_engineer. Refused:
TASK_WORKFLOW_STAGE_A_REQUIRED: cannot dispatch test_engineer for task 1.1 from rework_required.
Stage B (test_engineer) requires the task to be at pre_check_passed (or later) - a state written only
by the stage_a_passed transition, which is emitted when pre_check_batch completes with the task
correctly attributed. Remediation: run pre_check_batch on the task's changed files first. If
pre_check_batch passes but the task remains coder_delegated (typical after /swarm reset-session),
run /swarm recover 1.1 to repair Stage A attribution, then re-dispatch.
- Architect runs
pre_check_batch on the task's changed files. It returns gates_passed: true, but check_gate_status still shows "workflow": { "state": "rework_required", "generation": 1 }. The stage_a_passed transition does not fire from rework_required.
- Re-dispatching
test_engineer is refused again with the identical error.
- The remaining remedy in the error text is
/swarm recover 1.1, which is not available to the architect.
The architect had no legal move left. In our run it stopped correctly (kept the deliverables, wrote a blocked report), but the run could not complete.
Where it happens
src/hooks/delegation-gate.ts (around line 4459): TASK_WORKFLOW_STAGE_A_REQUIRED for Stage B from a non-pre_check_passed state.
src/hooks/gate-evidence.ts (around lines 647-655): from rework_required the reducer requires a new coder mutation (TASK_WORKFLOW_CODER_MUTATION_REQUIRED), so a passing pre_check_batch alone does not advance the state.
Expected
One of:
- a passing
pre_check_batch from rework_required re-emits stage_a_passed so Stage B can be re-dispatched, or
- an architect-facing repair tool (the analogue of
approve_plan_critic / repair_gate_evidence) that performs what /swarm recover <task> does for this case, or
- the error text stops recommending a command the architect cannot run.
Impact
A single tool-argument mistake by a subagent strands a task with correct, reviewed, passing code, and only a human can free it. For unattended runs this is a hard stop caused by state bookkeeping, not by the work.
Related: #2664 (Stage A attribution routes), #2703 (a gate with no recovery tool).
Summary
Once a task is in
rework_required, there is no autonomous transition back to a state where Stage B can be re-dispatched. The tool's own remediation is a human-only command.Version
opencode-swarm@7.179.1on OpenCode 1.18.21, Windows 11. The relevant files are byte-identical on the 7.180.0 release branch.Reproduction
APPROVED).test_engineerreturns a non-PASS verdict for a tool-argument reason (see the companion issue on SKIPPED). The task moves torework_required.test_engineer. Refused:pre_check_batchon the task's changed files. It returnsgates_passed: true, butcheck_gate_statusstill shows"workflow": { "state": "rework_required", "generation": 1 }. Thestage_a_passedtransition does not fire fromrework_required.test_engineeris refused again with the identical error./swarm recover 1.1, which is not available to the architect.The architect had no legal move left. In our run it stopped correctly (kept the deliverables, wrote a blocked report), but the run could not complete.
Where it happens
src/hooks/delegation-gate.ts(around line 4459):TASK_WORKFLOW_STAGE_A_REQUIREDfor Stage B from a non-pre_check_passedstate.src/hooks/gate-evidence.ts(around lines 647-655): fromrework_requiredthe reducer requires a new coder mutation (TASK_WORKFLOW_CODER_MUTATION_REQUIRED), so a passingpre_check_batchalone does not advance the state.Expected
One of:
pre_check_batchfromrework_requiredre-emitsstage_a_passedso Stage B can be re-dispatched, orapprove_plan_critic/repair_gate_evidence) that performs what/swarm recover <task>does for this case, orImpact
A single tool-argument mistake by a subagent strands a task with correct, reviewed, passing code, and only a human can free it. For unattended runs this is a hard stop caused by state bookkeeping, not by the work.
Related: #2664 (Stage A attribution routes), #2703 (a gate with no recovery tool).