Files
fusion/.changeset/fn-4917-incomplete-worktree-auto-recovery.md
Fusion (runfusion.ai) 5aeb7645ee feat(FN-4917): complete Step 6 — document recovery contract and changeset
Fusion-Task-Id: FN-4917
Fusion-Task-Lineage: 1422a545-f4b5-4e1f-a347-8be2a4202f45
2026-05-17 14:10:46 -07:00

664 B

@runfusion/fusion
@runfusion/fusion
patch

Prevent and auto-recover "Refusing to start coding agent in incomplete worktree" session-start failures. The worktree-acquisition layer now classifies pool-returned and resume worktrees before handing them to the executor, and the executor's two createResolvedAgentSession call sites catch the three assertValidWorktreeSession variants in in-progress, emit worktree:incomplete-detected + worktree:auto-recovered run-audit telemetry, and requeue the task to todo via the shared autoRecoverWorktreeSessionStartFailure helper instead of surfacing the error to the user. Bounded by MAX_WORKTREE_SESSION_RETRIES = 3.