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
Sessions sidebar should restore and show sessions from the repo's git worktrees, not just the launch directory #5683
Describe the feature or problem you'd like to solve
sidebar.showResumableSessions restores only the launch directory's remembered sessions. Sessions that run in a different git worktree of the same repository have a different cwd, so they are not restored and do not appear in the Sessions sidebar of the window that manages them.
Parallel work on one repository normally means one worktree per session, so that sessions don't edit the same files. The sidebar is meant for observing several sessions side by side, but it leaves out exactly those sessions.
Proposed solution
When restoring sessions, include persisted sessions whose cwd is any worktree of the launch directory's repository (as reported by git worktree list), not only the launch directory itself.
Let /resume and --resume bring such a session into the current CLI and sidebar.
Optionally, add a setting to choose between 'launch directory only' and 'all worktrees of this repo'.
Example workflow
Create a worktree per ticket and start a session in each.
Close a session, or restart the CLI.
Launch from the main checkout. Expected: the worktree sessions are listed in the sidebar as resumable. Actual: none are listed, and copilot --resume <id> opens a separate process that the sidebar doesn't show.
Activity