Skip to content

[Agents] Sessions from the same git repository are grouped separately, not per on-disk repository #312729

@cavokz

Description

@cavokz

This affects the VS Code Agents Sessions list (the session grouping view in the Agents window).

Describe the bug

When working in a git repository set up with the standard fork workflow — origin pointing to a personal fork, another remote (e.g. upstream) pointing to the canonical repo — the Agents Sessions list creates separate groups for sessions started from different worktrees, even though they all live in the same on-disk repository.

To reproduce

  1. Clone a fork of a repository (standard fork workflow: origin → fork, upstream → upstream).
  2. Create one or more worktrees with git worktree add.
  3. Start Copilot sessions from different worktrees.
  4. Open the Sessions list grouped by repository.

Expected behavior

All sessions from the same on-disk git repository appear in the same group.

Actual behavior

Sessions are split into separate groups — one per worktree — even though they all belong to the same repository on disk.

Note: This affects user-created worktrees in a standard fork-based workflow, not Copilot-managed worktrees.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions