Skip to content

agent start: a signal after worktree creation can leave the created worktree behind #672

Closed

Description

@tps-flint

Follow-up from #648 (merged d981d48).

tps agent start creates the agent's worktree before launch and removes it in the launchAttested finally (packages/cli/src/commands/agent.ts ~1349). The launcher's SIGINT/SIGTERM/SIGHUP handlers (~1100) remove the private config snapshot and re-raise the signal, which can end the process before that finally runs, so a signal after worktree creation can leave the created worktree behind.

Want: the signal path removes a worktree this launch created (and only one it created), or the next launch reconciles it; a test that signals the launcher after worktree creation and asserts the created worktree is gone (or reconciled) while a pre-existing worktree is untouched. Related: #668 (forward the signal to the released agent), #667 (stale snapshot sweep).

Refs #648

Activity

  1. moved this to Triage in Office queueon Oct 19, 2026
  2. self-assigned this
    on Nov 9, 2026
  3. moved this from Triage to In review in Office queueon Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions