A --task builder whose PTY/shellper dies (e.g. across a Tower restart) has no supported path back to a live, Tower-managed session. Hit in production 2026-08-12 with a live lane blocked at its pr gate awaiting CI fixes.
Three paths all fail, one shared root cause — nothing maps an existing task id back to its worktree:
afx spawn --resume: the positional identifier only accepts issue-style ids, so both the builder id and the worktree name are rejected as 'invalid issue identifier'. Even via --task ... --resume, spawnTask calls generateShortId() unconditionally (spawn.ts:502-506), computes a fresh task-<newId> worktree name, and validateResumeWorktree then fails on a path that never existed. There is no way to pass the existing task id in.
afx workspace recover: derives the worktree path from the porch project id, which for task builders doesn't match the .builders/task-<shortId> directory → skipped as 'worktree missing' (both the original doubled id and a re-minted porch-native id miss).
afx spawn --task ... --branch <existing>: spawnTask never reads options.branch (only spawnSpec at spawn.ts:380 and spawnIssueDrivenBuilder at spawn.ts:741 honor it), so it silently creates a new branch instead of continuing the existing one.
spawnWorktree has the same unconditional-generateShortId defect on its resume path (spawn.ts:659).
Wanted: a resume path keyed by builder id or worktree name (e.g. afx spawn task-NHnJ --resume or afx spawn --task-id <shortId> --resume) that reuses the existing worktree/branch and the harness conversation-resume machinery, and a workspace recover worktree-resolution that matches task builders. Related known gap: afx spawn --task minting porch-incompatible ids.
A
--taskbuilder whose PTY/shellper dies (e.g. across a Tower restart) has no supported path back to a live, Tower-managed session. Hit in production 2026-08-12 with a live lane blocked at its pr gate awaiting CI fixes.Three paths all fail, one shared root cause — nothing maps an existing task id back to its worktree:
afx spawn --resume: the positional identifier only accepts issue-style ids, so both the builder id and the worktree name are rejected as 'invalid issue identifier'. Even via--task ... --resume,spawnTaskcallsgenerateShortId()unconditionally (spawn.ts:502-506), computes a freshtask-<newId>worktree name, andvalidateResumeWorktreethen fails on a path that never existed. There is no way to pass the existing task id in.afx workspace recover: derives the worktree path from the porch project id, which for task builders doesn't match the.builders/task-<shortId>directory → skipped as 'worktree missing' (both the original doubled id and a re-minted porch-native id miss).afx spawn --task ... --branch <existing>:spawnTasknever readsoptions.branch(onlyspawnSpecatspawn.ts:380andspawnIssueDrivenBuilderatspawn.ts:741honor it), so it silently creates a new branch instead of continuing the existing one.spawnWorktreehas the same unconditional-generateShortIddefect on its resume path (spawn.ts:659).Wanted: a resume path keyed by builder id or worktree name (e.g.
afx spawn task-NHnJ --resumeorafx spawn --task-id <shortId> --resume) that reuses the existing worktree/branch and the harness conversation-resume machinery, and aworkspace recoverworktree-resolution that matches task builders. Related known gap:afx spawn --taskminting porch-incompatible ids.