A fully-cleared exit bar does not advance the work item: the scheduler keeps re-dispatching implementation sessions until the item parks #523
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
toasterson/Anima!523
Loading…
Reference in a new issue
No description provided.
Delete branch "claude/wi-019fdd2a-a-fully-cleared-exit-bar-does-not-advanc"
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?
Anima work item
019fdd2a-205d-7451-9de9-fcd7e706dd87.Symptom
A work item whose exit bar is fully satisfied for its current phase is never moved to the next phase. Instead the scheduler keeps dispatching fresh implementation sessions against it until the retry budget runs out and it parks as
retry-budget. The item is finished; the pipeline just never notices.Evidence (WI-404, PR #485)
work_item_exit_bar_statefor WI-404 phaseImplementation:machine_cleared=t,ai_gate_cleared=t, updated2026-08-06 23:48.workflow_phasesforImplementation:exit_bar_type='ai',ai_gate_enabled=t,machine_clearedandhuman_review_acceptedNOT required. So the bar was fully satisfied at 23:48.ed873c90(23:16).session.started(executorclaude-code) fired at 00:17, 00:55, 01:42, 02:16, 02:53, 03:29 — each an implementation session that re-read the task, produced no diff, and endedstop_reason: end_turn.retry-budget.update_work_item(current_phase=testing)thenapprove_and_merge, which merged first try.Roughly 8 wasted Opus sessions on an item that was already done, overnight, on one item.
Not the same as #500
#500 gave implementation sessions
workitem.writeso a session that knows it finished can advance itself. This defect is the case where the session does not know: it re-reads a task that is already implemented, correctly concludes there is nothing to do, and ends the turn. Nothing on the server side consults the exit bar and promotes the item, so "nothing to do" loops forever.Blast radius
Five items are sitting in this state right now, all with
machine_cleared AND ai_gate_clearedonImplementationand all parked rather than in testing: WI-384, WI-455, WI-453, WI-454, WI-402. Any item that clears its bar between reconciler passes lands here.Expected
The phase-advance decision must be driven by the exit bar, server-side, not by a session volunteering to advance itself:
submit_review_verdictapprove, CI green, human accept), advance the item to the next phase in the same transaction.Acceptance criteria
assemble_and_sendrefuses (and logs loudly) when the current phase's exit bar is already cleared.6478d012b5to26bcbbd1b6WIP: A fully-cleared exit bar does not advance the work item: the scheduler keeps re-dispatching implementation sessions until the item parksto A fully-cleared exit bar does not advance the work item: the scheduler keeps re-dispatching implementation sessions until the item parks