claude-code - 💡(How to fix) Fix Desktop app: projects and slash commands vanish from sidebar despite ~/.claude.json being intact [3 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#50749Fetched 2026-04-20 12:14:06
View on GitHub
Comments
3
Participants
3
Timeline
9
Reactions
0
Author
Timeline (top)
labeled ×4commented ×3closed ×1cross-referenced ×1

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.

Root Cause

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.

RAW_BUFFERClick to expand / collapse

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# projectsalsaif-automation present
06:1511yes
10:3811yes
11:2411yes
11:4913yes
13:4113yes
current14yes

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.

extent analysis

TL;DR

The issue can be mitigated by ensuring project-level slash commands are persisted to disk and the app's sidebar is rendered from a authoritative source, such as ~/.claude.json.

Guidance

  • Verify that the project-level slash commands are being written to <project>/.claude/commands/ on disk to ensure they survive UI state resets.
  • Check the Electron IndexedDB / LocalStorage state to see if it's getting out of sync with ~/.claude.json, causing the project to disappear from the sidebar.
  • Consider normalizing project paths to prevent duplicate project entries when the same repo is opened via different paths.
  • Investigate distinguishing worktree entries visually from parent projects to prevent them from pushing the parent out of view.

Example

No code snippet is provided as the issue is more related to the app's behavior and data storage.

Notes

The issue seems to be related to the app's UI layer and data storage, and the provided information suggests that the data is intact in ~/.claude.json. The mitigation steps focus on ensuring data persistence and consistency between different storage sources.

Recommendation

Apply workaround: Ensure project-level slash commands are persisted to disk and investigate rendering the sidebar from an authoritative source, such as ~/.claude.json, to mitigate the issue. This is because the root cause seems to be related to the app's UI state and data storage, and persisting data to disk and using an authoritative source can help prevent data loss and inconsistencies.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING