Code tab "Group by Project" collapses distinct local clones into one group; no way to group by cwd
Description
The Code tab sidebar offers Group by: Project, which derives project identity from the git origin remote. When I have multiple local clones of the same repo (e.g. ~/dev/repo, ~/dev/repo2, ~/dev/repo5, etc., all with the same origin URL), they all collapse into a single group labeled repo · <org>. There's no way to keep them visually separated.
Why the existing options don't solve this
Group by: None— flat list, loses all grouping.Group by: Custom groups— manual, has to be maintained per session, doesn't auto-bucket new sessions by their cwd.- There is no
Group by: Directory/Group by: Working directory.
Repro
git clone <url> ~/fooandgit clone <url> ~/foo2(same remote).- Start a Claude Code session in each.
- Open the Code tab. Both sessions live under one group.
Expected
An option like Group by: Working directory (or have Project distinguish by cwd when the git origin matches multiple roots), so each clone gets its own group.
Extra observation (possibly a separate bug)
One of my older clones shows up in its own group labeled by bare directory name (no · <org> scope), even though git remote -v returns the same origin as the other clones and its session JSONs at ~/Library/Application Support/Claude/claude-code-sessions/.../local_*.json contain the correct "prRepository" value. Looks like project identity is cached at first registration and never refreshed when the remote changes — so two clones of the same repo can land in different groups based purely on the order/state when they were first opened.
Environment
- macOS (Darwin 25.4.0)
- Claude Desktop app (Code tab)
- Claude Code 2.1.128
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗