SIGN IN SIGN UP

sessions: fix worktree-created task dispatch (#317598)

* fix worktree-created task dispatch

Only dispatch worktree-created tasks for newly-created sessions once a concrete worktree is available. Keep restored sessions from re-running setup tasks on window open while still tracking pending untitled sessions created before the dispatcher starts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix worktree task replacement tracking

Avoid wall-clock restored-session checks and only allow committed replacements from still-pending tracked sessions. This prevents restored or already-dispatched sessions from re-running worktreeCreated tasks while preserving pending untitled session dispatch.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
C
Connor Peet committed
57ff4a00c798ed92edc7bdd0d8152b4f801aae2c
Parent: 83ab76d
Committed by GitHub <noreply@github.com> on 5/20/2026, 8:22:37 PM