Desktop app: projects and slash commands vanish from sidebar despite ~/.claude.json being intact

Resolved 💬 4 comments Opened Apr 19, 2026 by mghassanj Closed Apr 19, 2026

Claude Code desktop app: projects and commands appear to disappear from UI despite being present in config

Summary

On the Claude Code desktop app (macOS), a project I work in daily repeatedly appears to "disappear" from the sidebar — along with slash commands I created in that project. Investigation shows the underlying data in ~/.claude.json is intact and even growing; the issue is strictly in the app's UI layer. This has now happened twice to the same project.

Environment

  • OS: macOS (Darwin 25.3.0)
  • Claude Code desktop app (Electron-based)
  • Claude Code CLI alongside it
  • Project path: /Users/mghassan/alsaif-automation
  • Also actively using 3 git worktrees under .claude/worktrees/
  • Running inside Cowork sandbox (coworkd present in logs)

What I observed

The "alsaif-automation" project — where I actively work and commit daily — vanished from the desktop app's project sidebar, as did custom slash commands I had defined during that project's sessions. When I opened the folder again manually, it reappeared, but without the session/command history I expected.

Evidence that data is intact

~/.claude.json is being rewritten frequently (5 times today), and I compared the 5 backups in ~/.claude/backups/:

| Backup time | # projects | alsaif-automation present |
|---|---|---|
| 06:15 | 11 | yes |
| 10:38 | 11 | yes |
| 11:24 | 11 | yes |
| 11:49 | 13 | yes |
| 13:41 | 13 | yes |
| current | 14 | yes |

The project list is growing, not shrinking, and the project in question is present in every snapshot. The issue is therefore not data loss in ~/.claude.json.

Hypothesis

  • The app's sidebar appears to derive its list from Electron IndexedDB / LocalStorage state rather than (or in addition to) ~/.claude.json, and this state can get out of sync after updates/crashes/restarts.
  • Worktree projects register as separate entries (3 of mine do), crowding the parent project out of the visible list.
  • Project-level slash commands created through the app UI do NOT appear to be written to <project>/.claude/commands/ on disk (that folder doesn't exist for my affected project), so if they're only in Electron state, they're lost on any UI state reset.

Impact

  • Lost visibility into active projects in the sidebar
  • Custom slash commands I rely on appear unrecoverable
  • Confusing — made me briefly think my code had been deleted
  • Also causes duplicate project entries when the same repo is opened via two different paths (e.g. /Users/mghassan/Alsaif automations/alsaif-automation-app vs /Users/mghassan/alsaif-automation) — both are tracked as separate projects

Asks

  1. Persist project-level slash commands to <project>/.claude/commands/*.md on disk so they survive UI state resets.
  2. Make the sidebar render from ~/.claude.json authoritatively (or keep IndexedDB state a cache of it, not a separate source of truth).
  3. Distinguish worktree entries visually from parent projects so they don't push the parent out of view.
  4. Normalize project paths (case, trailing slashes, symlinks) so the same repo opened two ways doesn't register twice.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗