Skip to content

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

Open

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions