[BUG] All Cowork projects lost — local-agent-mode-sessions recreated empty after macOS update/reboot; separately, cleanupPeriodDays=30 default silently deleted session transcripts
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?
Two separate failures on 2026-08-12 destroyed my entire Cowork project list and months of session history on a single Mac. Neither produced a warning, a prompt, or any notification afterward.
Environment
- Claude desktop 1.28929.0
- macOS 26.6.1 (25G76), Apple Silicon
- Max plan
---
Event 1 — Cowork project store recreated empty at 20:36:54 local
A macOS 26.6.1 update rebooted the machine at 20:33. When the app came back up, ~/Library/Application Support/Claude/local-agent-mode-sessions/ had a birth timestamp of 20:36:54 — it was created new. Every Cowork project was gone from the sidebar.
This included projects I had been actively working in earlier the same day, so the transcript cleanup below does not explain it.
There is no server-side copy. The API exposes no cowork projects endpoint (/api/organizations/{org}/cowork_projects → 404), so there is nothing to restore from. The folder bindings for 37 projects were simply gone.
Event 2 — Automatic transcript deletion at 19:12 local
Separately, cleanupPeriodDays defaults to 30 and the cleanup runs on app launch. It ran at 19:12 and deleted every local session transcript older than the cutoff.
~/.claude/.last-cleanup records the run. Every affected directory under ~/.claude/projects/ carries an identical mtime of Aug 12 19:12. The survived/deleted boundary lands exactly on 30 days:
| Newest content in folder | Age at cleanup | Result |
|---|---|---|
| Aug 10 | 1 day | survived |
| Aug 8 | 4 days | survived |
| Jul 16 | 27 days | survived |
| Jul 11 | 32 days | deleted |
| Jul 7 | 36 days | deleted |
| Jun 28 | 45 days | deleted |
| May 19 | 85 days | deleted |
Roughly 16 project folders were emptied. The directories remained; the transcripts inside were unlinked. No trash, no undo, no notification.
Impact
- Complete Cowork project list: 37 folders, 104 sessions
- Session transcripts spanning May–July 2026, unrecoverable
- Months of accumulated working context on a paid top-tier account
Underlying user files were untouched. What was destroyed was the session history and the project structure.
Partial recovery — undocumented, may help others
The session index survives in a store neither event touches:
~/Library/Application Support/Claude/claude-code-sessions/<account>/<org>/*.json
Each JSON carries cwd, title, createdAt, lastActivityAt. That is enough to reconstruct which projects existed and what folder each pointed at, even after the Cowork store is wiped. I found this only by accident; it is in no documentation I could locate.
Workaround for the cleanup
// ~/.claude/settings.json
{ "cleanupPeriodDays": 36500 }
This must be set before the next app launch — the cleanup runs on startup, and once it runs the files are gone.
Steps to reproduce
Event 2 is deterministic:
- Leave a project folder untouched for more than 30 days
- Launch the desktop app
- Transcripts under
~/.claude/projects/<folder>/are deleted with no prompt or notice
Event 1 I cannot reproduce on demand, but the directory birth timestamp of 20:36:54 immediately following the 20:33 reboot is unambiguous.
What Should Happen?
Cowork projects should survive an OS reboot and app restart. The project store should never be reinitialized empty without a migration path or a backup.
Session transcripts should not be deleted on a silent default. Retention should be opt-in, or the app should prompt before the first cleanup and notify afterward with a list of what was removed. cleanupPeriodDays should be visible in the UI — most users do not know it exists. Deleted transcripts should go to trash rather than being unlinked immediately, so there is a recovery window.
Error Messages/Logs
Steps to Reproduce
Event 2 (transcript deletion) is deterministic and reproducible:
- Leave a project folder untouched for more than 30 days, so its transcripts under
~/.claude/projects/<encoded-folder>/are older than the retention cutoff - Do not set
cleanupPeriodDaysin~/.claude/settings.json(i.e. leave it at its default of 30) - Launch the Claude desktop app
- Observe: the transcripts in that folder are deleted. The directory remains but is empty.
~/.claude/.last-cleanupupdates to the launch time, and the emptied directories all carry that same mtime.
No prompt is shown before deletion. No notification is shown after. The files are unlinked rather than moved to trash, so there is no recovery.
Verify the boundary by comparing folders on either side of 30 days — in my case a folder last written 27 days prior survived and one last written 32 days prior did not.
Event 1 (Cowork project store) — observed, not reproducible on demand:
- Have an established set of Cowork projects bound to local folders
- Install a macOS update and reboot (macOS 26.6.1 in my case, reboot at 20:33)
- Relaunch the desktop app
- Observe:
~/Library/Application Support/Claude/local-agent-mode-sessions/has a fresh birth timestamp (20:36:54 for me — confirmed withstat -f '%SB'), and the Cowork project list is empty
Check with:
stat -f '%SB birth %N' "$HOME/Library/Application Support/Claude/local-agent-mode-sessions"
If the birth time is after your most recent reboot, the store was recreated rather than migrated.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.107 (Claude Code) — desktop app 1.28929.0
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗