Desktop Code tab: after a project folder is moved/renamed, the sidebar keeps grouping old sessions under an environment that points at the old path; no way to re-point sessions
Status Open
Reported on v2.1.295
Maintainer reply None cached
Workaround ✓ Mentioned in description ↑
Activity 0 comments · opened Oct 15, 2026
Environment
- Claude desktop 2.37337.1 (macOS 27.0.1, arm64), bundled Claude Code 2.1.295
- Sidebar grouped by project/environment
Steps to reproduce
- Use the Code tab for a few weeks with ~40 sessions in folder A (
~/Downloads/Grobit, not a git repo). - Move the folder to B (
~/My Drive/Project/iOS/Nana) in Finder (outside the app). Folder A no longer exists. - Quit the app, update every session record's
cwd/originCwd/gitAnchorsFolderRealpathin~/Library/Application Support/Claude/claude-code-sessions/<org>/<user>/local_*.jsonfrom A to B, copy~/.claude/projects/<A-key>/to<B-key>/, relaunch.
Expected
All sessions appear under one environment for folder B, or the app offers a way to point an environment (and its sessions) at the moved folder.
Observed
ccd_session_mgmt list_sessions/get_sessionreportcwd= B for every session, so the main process has the new path.- The sidebar still shows the 39 old sessions under an environment "Grobit" whose target is folder A. Restarting the app does not change this. New sessions started in B land under a second, separate environment "Nana", so the project is split in two.
- Environments live in
~/Library/Application Support/Claude/ccd-session-presets.json(presets[].target.cwd); the stale entry keeps path A. The per-session mappersisted.ccd-started-environmentswas empty, so I could not tell from the data why the renderer still matched those sessions to the old environment. - The app only notices the missing folder when a session is started ("{name} can't start: {path} no longer exists"). There is no "folder moved / locate folder" or "move sessions to environment" affordance.
Workaround that worked
Right-click the stale environment → Edit environment → change the folder to B and rename it, then delete the duplicate environment. I did not test deleting the stale environment first; the delete confirmation only says sessions started from it are kept.
Suggestions
- When an environment's folder no longer exists, show that in the sidebar header and offer "Locate folder…".
- Group sessions by their current
cwd, or expose "Move to environment…" for selected sessions. - Document the supported way to move a project folder without losing sidebar grouping (which files to update, in what order).