You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add operator-invoked resume flag for failed groups (re-spawn worker on the existing worktree) #201
When a group fails for a transient, operator-fixable reason after its round is over, there is no supported way to resume it on the same worktree. Real case 2026-12-05 (airunnerweb round): group w8 failed on OpenRouter HTTP 402 (per-key usage limit). The worktree had salvageable progress (2 commits on #439 plus uncommitted edits for #435/#437/#439/#441) and the fix was operator-side (raise the key limit). The iteration-cap continuation path (--max-continuations, same-worktree re-spawn with a *-continueN.md task file) already exists inside a live round, but once the round exits there is no CLI entry point to do the same thing - the operator must hand-roll run-worker.sh <worktree> <hand-written-task-file> --mode <slug> by reading cli.ts internals to replicate env/selection args.
Worse, the hand-rolled path is fragile: my first attempt exported the key slightly differently from what scripts/headlesscode-orchestrate.sh does and the worker died on iteration 1 with 401, which a first-party resume path would have avoided by reusing the round's own key resolution.
Refuses unless the group is terminal-failed in .orchestrator-state.json and its worktree still exists with salvageable progress (same check the max-iterations rule uses: not at the same commit as base, or human explicitly overrides).
Writes a *-continueN.md task file with the same builder the in-round continuation uses, noting the previous failure reason from the state file.
Re-spawns via the exact same spawn path/env as in-round continuations (same model, executor, iteration cap, key resolution) - no hand-rolled env.
Patches the group back to running so a subsequent orchestrate status --wait picks it up.
Acceptance
--help documents the flag; attempting it on a done group or a missing worktree errors clearly instead of spawning into the void.
The w8 case above is reproducible through the flag alone with no manual env assembly.
Done in PR #205 (commit 38901b2). headlesscode orchestrate --resume --retry-failed / --retry-group forces a continuation spawn on terminal-failed groups via the same handleIterationExhaustion spawn path/env as in-round continuations. Refuses done groups ('not terminal-failed'), missing worktrees, and empty worktrees (override with --force-retry); --help documents both flags. Verified: All 56 resume tests passed, tsc clean, zero NEW standards/arch findings in the touched files.
Activity
w4ffl35 commentedon Dec 6, 2026
Done in PR #205 (commit 38901b2). headlesscode orchestrate --resume --retry-failed / --retry-group forces a continuation spawn on terminal-failed groups via the same handleIterationExhaustion spawn path/env as in-round continuations. Refuses done groups ('not terminal-failed'), missing worktrees, and empty worktrees (override with --force-retry); --help documents both flags. Verified: All 56 resume tests passed, tsc clean, zero NEW standards/arch findings in the touched files.
Merge pull request #205 from Capsize-Games/issues/w11-2026-12-05