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
afx: builder state.db row can vanish while Tower terminal + shellper + worktree survive → uncleanable SPLIT state #1101
A builder's state.dbbuilders row can disappear while its runtime artifacts survive — the Tower terminal session (in global.db terminal_sessions), the shellper + PTY child processes, the .builders/<id>/ worktree, and the local + remote branches all remain. This leaves an uncleanable SPLIT state.
Observed
A bugfix builder whose PR had merged and issue closed:
global.db terminal_sessions: row still present (type=builder, with pid).
shellper + bash processes: still alive (cwd = the worktree).
worktree + local branch + origin/<branch>: all still present.
Tower UI: still lists the builder ALIVE ("Blocked: PR review", no owner).
Why it matters
Uncleanable:afx cleanup resolves a builder only via the state.builders row (cleanup.ts:196/235 → fatal("not found")), and every teardown step is keyed off that row. No row → no sanctioned teardown.
Find and fix whatever removes the builders row while the terminal/shellper/worktree persist (a partial cleanup, a race, or a premature row delete). The row should not be deleted until the runtime artifacts are torn down (or vice-versa — make teardown atomic). Companion issue covers a row-less cleanup escape hatch.
Receipt from a production workspace (2026-08-02), IDs scrubbed per policy: a worktree-type registry row (spawned via afx spawn --worktree, owner column empty) has been sitting in afx status since July with no way to remove it — afx cleanup exposes only -p (project), -i (issue), and -t (task) selectors, none of which match a worktree-type row. It survives every cleanup sweep and inflates the builder list indefinitely. Confirms the need for a cleanup path covering this row type.
Activity
waleedkadous commentedon Aug 2, 2026
Receipt from a production workspace (2026-08-02), IDs scrubbed per policy: a
worktree-type registry row (spawned viaafx spawn --worktree, owner column empty) has been sitting inafx statussince July with no way to remove it —afx cleanupexposes only-p(project),-i(issue), and-t(task) selectors, none of which match a worktree-type row. It survives every cleanup sweep and inflates the builder list indefinitely. Confirms the need for a cleanup path covering this row type.