Skip to content

Sessions sidebar should restore and show sessions from the repo's git worktrees, not just the launch directory #5683

Backlog

Description

@agon252009

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

  1. Create a worktree per ticket and start a session in each.
  2. Close a session, or restart the CLI.
  3. 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.

Additional context


🤖 Agent-authored by GitHub Copilot CLI

Activity

  1. added
    area:sessions
    and removed on Dec 5, 2026
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

    area:sessions

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions