[BUG] Sidebar session groups flattened to "Ungrouped" after git pull — likely thrown error from stale/missing project directory

Status Open
Maintainer reply None cached
Activity 0 comments · opened Sep 1, 2026

What's Wrong?

Code tab sidebar sessions are not being automatically grouped by project at all. Every session shows under a flat "Ungrouped" list, including brand-new sessions started just now in existing, healthy, unmodified git repositories. Fully quitting (Cmd+Q) and relaunching the app does not fix this.

The only sessions that display grouped are ones I manually created a group for and assigned myself — that's a separate, working, persisted mechanism. Automatic derivation of groups from project directory does not appear to run at all.

Environment

  • Desktop App: 1.40609.0 (macOS)
  • Platform: macOS

Data integrity check

Session data itself is confirmed 100% intact — this is a grouping/display bug, not data loss:

  • 229 session wrapper files in ~/Library/Application Support/Claude/claude-code-sessions/<userId>/<profileId>/local_*.json
  • 0 JSON parse errors
  • Every wrapper has cwd and originCwd populated
  • 13 distinct originCwd project roots represented

Steps to Reproduce (confirmed trigger sequence)

  1. Start a new session in Claude Code on the web (claude.ai/code) for a project that has no local clone yet — this session has no local cwd/originCwd.
  2. Open Claude Code desktop: the new cloud session correctly appears, bucketed under a special "Others" group (for sessions lacking a local folder).
  3. Separately, in a different existing local project, start a new local session and run git pull in that repo.
  4. While that's in progress, rename the cloud-created session (the one grouped under "Others") to a new title via the desktop sidebar.
  5. At that point, all sidebar groups flatten into "Ungrouped" at once — not just the "Others" group or the repo that was pulled, but every previously-working automatic group.
  6. Fully quitting (Cmd+Q) and relaunching does not restore the groups. The only way to get a session to display under a named group again afterward is to manually create the group and assign sessions to it by hand — automatic grouping does not resume, even for brand-new sessions started later in perfectly healthy, unmodified git repos.

This points at the rename action on a folder-less ("Others"-bucketed) session as the likely trigger — possibly hitting a code path that clears or corrupts shared grouping state rather than just updating that one session's title, with the concurrent git pull elsewhere being coincidental or a secondary factor.

Expected Behavior

  • Sessions should be automatically grouped by project (e.g. by git root / originCwd) without requiring manual group creation, as this feature worked in earlier versions.
  • Renaming a single session (especially a folder-less one bucketed under "Others") should not affect grouping for any other session.

Impact

No data loss — all sessions remain reachable via sidebar search and claude --resume. But multi-project navigation is broken: every project is flattened into "Ungrouped" unless the user manually recreates the grouping by hand.

Related

  • #79156 (closed, COMPLETED 2026-07-21) — same "groups flattened" symptom (confirmed data-intact / rendering-only) on an earlier app version (1.22209.3). This report is on a much newer version (1.40609.0), suggesting either a recurrence or that automatic grouping was never fully restored after that fix.
  • #51722 (open) — "Sidebar session grouping uses git root instead of session subdirectory" — may share root cause.

Is this a regression?

Likely — automatic grouping is a feature that has worked before (per #79156), and is not currently functioning at all on this build.

View original on GitHub ↗