Desktop app and CLI store sessions in different project directories — history not synced
Resolved 💬 3 comments Opened May 8, 2026 by mke1ms Closed Jun 8, 2026
Summary
The Claude Code CLI and the desktop app mangle the project path differently when determining the session storage directory under ~/.claude/projects/. This means sessions created in the CLI don't appear in the desktop app's sidebar (and vice versa), even when both are opened to the same directory.
Steps to reproduce
- Open the CLI from
~/Projects/— sessions are stored in~/.claude/projects/-Users-johndoe-Projects/ - Open the desktop app and set the working directory to
~/Projects/ - The desktop app creates a different directory:
~/.claude/projects/-Users-johndoe--claude-projects--Users-johndoe-Projects/ - No CLI session history appears in the desktop sidebar
Root cause
The CLI mangles /Users/johndoe/Projects → -Users-johndoe-Projects.
The desktop app appears to resolve the path through ~/.claude/projects/ itself (or similar), producing the double-encoded path -Users-johndoe--claude-projects--Users-johndoe-Projects.
Attempted workarounds (none worked)
- Restarting CLI in the project directory (hoping it would rebuild the index)
- Manually creating a
sessions-index.jsonin both directories - Copying
.jsonlsession files + index into the desktop app's directory - Fully quitting and relaunching the desktop app
Environment
- CLI version: 2.1.133
- macOS 26.1 (25B78)
- Desktop app: latest (as of 2025-05-08)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗