[BUG] Claude Code Desktop (macOS) — full day of session work lost; app silently restarted with no persisted Code session
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
I will past Claudes bug report below, but here it is in my own words.
I was working until about 4:30pm in Claude Code on the desktop app yesterday (Macbookpro). Woke up the next day and resumed work. Around 1pm I added a screenshot from my phone to the same Claude Code session to explain a design issue and when I went back to the laptop the all sessions were wiped.
I quit the desktop app (stupid) and then used regular Claude chat to diagnose. Was running the most recent desktop app. The mobile ap still shows the session but can't access from desktop.
Here is what claude said:
Title: [BUG] Claude Code Desktop (macOS) — full day of session work lost; app silently restarted with no persisted Code session
Summary
I worked in Claude Code in the Claude Desktop app on macOS from approximately 6:30/7:00 AM on April 28, 2026 in a single large session. By the afternoon, the Claude Code section of the app showed no sessions at all (Chat sessions were unaffected). Investigation shows the app process silently restarted at 1:35 PM with no log of an earlier startup that day, and no .jsonl or local_*.json session file from the morning's work was ever written to disk.
The most recent Claude Code session file on disk is from the previous afternoon (April 27 at 16:18). A full working day of context — decisions, files read, code discussed — appears unrecoverable.
Environment
- macOS (MacBook Pro, Intel/Apple Silicon: [fill in])
- Claude Desktop app version: 1.4758.0 (from the running process args)
- Account/org session paths exist under both:
~/Library/Application Support/Claude/claude-code-sessions/<account>/<org>/~/Library/Application Support/Claude/local-agent-mode-sessions/<account>/<org>/(legacy)- VM-based architecture in use:
~/Library/Application Support/Claude/vm_bundles/claudevm.bundle/withrootfs.img,sessiondata.img,efivars.fdactively written
What I observed
- Worked in Claude Code in the desktop app starting ~6:30–7:00 AM on April 28.
- Later in the day, the Claude Code sidebar showed no sessions at all (Chat sidebar still listed sessions correctly).
- Inspecting
~/Library/Application Support/Claude/claude-code-sessions/<account>/<org>/: most recent file islocal_5e2b2be1-...jsonfrom April 27 at 16:18. No file from April 28. - Inspecting
~/Library/Application Support/Claude/local-agent-mode-sessions/<account>/<org>/: most recent session JSON is from April 24. Arpm/manifest.jsonwas created today at 13:35 (51 bytes) but no session payload. ~/.claude/projects/(CLI path) contains no entry from April 28 either — confirming this is desktop-app-only and not a CLI session.
Diagnostic info
Log excerpt (~/Library/Logs/Claude/main.log)
No "Cannot save session" or "Failed to read sessions directory" errors. The only persistence-related log lines from today:
2026-04-28 13:35:53 [info] Loaded 12 persisted sessions from .../local-agent-mode-sessions/<account>/<org>
2026-04-28 13:35:53 [info] Loaded 0 persisted sessions from .../local-agent-mode-sessions/<account>/<org>
2026-04-28 13:35:53 [info] Loaded 12 persisted sessions from .../claude-code-sessions/<account>/<org>
Previous startups in the same log: April 27 at 11:32 and April 27 at 16:18. There is no logged app startup between April 27 16:18 and April 28 13:35, despite active use during that window.
The second "Loaded 0 persisted sessions" line on each startup looks suspicious — same path as the line above it, but loading 0 instead of 12.
Process state
Claude.app started 1:35 PM (PID 73442)
Claude Helper x N all started 1:35 PM
com.apple.Virtualization.VirtualMachine started 1:36 PM
App is still running at the time of this report. I have not quit it in case the morning session is held in VM memory.
VM image timestamps
rootfs.img 28 Apr 13:51 (10 GB)
sessiondata.img 28 Apr 13:36 (107 MB)
efivars.fd 28 Apr 13:36
All VM files first touched today at 13:35–13:51 — consistent with a fresh VM boot at 1:35 PM.
Filesystem sweep
find ~/Library/Application\ Support/Claude/ -mtime -1 -type f returns VM bundle files, caches, IndexedDB, Session Storage, and Preferences — but no Claude Code session payload file modified within the last 24 hours.
Expected behavior
- Claude Code sessions persisted incrementally to disk during a working session, so a crash, silent restart, or VM reset doesn't lose hours of work.
- App startups logged to
main.log— the missing 6:30–7:00 AM startup entry suggests either log rotation (no rotated file present) or a logging gap during/after the apparent silent restart. - The Claude Code sidebar reflects the session files actually present on disk (currently it shows zero, even though
local_5e2b2be1-...jsonfrom April 27 exists).
Actual behavior
- An entire working day of Claude Code conversation never persisted.
- The app silently restarted (or never logged its earlier startup) at 1:35 PM.
- The Claude Code sidebar shows no sessions despite at least one valid session file from the previous day being on disk.
Possibly related issues
- #27463 — Claude Desktop sessions lost on restart;
claude-code-sessionsdirectory persistence failure (Windows; my symptoms match but on macOS, and without the explicit "Cannot save session" log line) - #29172 — Claude Code sessions disappear from desktop app sidebar after restart (macOS)
- #29373 — Claude Desktop update loses Code session history (
local-agent-mode-sessions→claude-code-sessionsmigration). The presence of both directories on my system, with the legacy one still being read at startup, may be relevant. - #25524 — Previous sessions not showing in desktop app sidebar (macOS)
Impact
A full day of in-flight context — architectural decisions, files read, code discussed — is not recoverable. Code changes Claude actually wrote to my repo are still on disk (visible via git status/git diff), but the conversation context that produced them is lost. This makes the desktop app unsafe to rely on for sustained work until persistence is fixed and verified.
What Should Happen?
should be able to add a photo to the same chat session from mobile
Error Messages/Logs
Steps to Reproduce
I guess try and shut a laptop and let it go to sleep, reopen and see if the session still logs
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
Claude 1.4758.0 (fb266c) 2026-04-24T20:22:30.000Z
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗