Local ~/.claude directory (settings, skills, per-project memory) silently reset on disk, while ~/.claude.json history stays intact
Description
The ~/.claude directory (which holds settings.json, any custom skills/, and per-project memory/ files under projects/<hash>/) appears to have been silently recreated/reset locally, while the separate ~/.claude.json file (account/OAuth/project registry with usage history) remained fully intact.
Evidence
~/.claude.jsonshowsnumStartups: 209,firstStartTime: 2026-03-27, and a full registry of ~20 long-tracked project checkouts with per-project cost/session history — clearly untouched, long-lived data.~/.claude/(the directory itself) has a filesystem birth time of 13:29:16 local, today — i.e. it was empty/fresh as of that moment.settings.jsoninside it was reduced to just{"model": "opus[1m]"}, any previously-configured custom skills under.claude/skills/are gone (directory doesn't exist), and the per-projectmemory/folder for at least one long-worked-on project was completely empty.~/.claude/.last-cleanupcontains a timestamp of2026-09-10T18:33:13.541Z(14:33:13 local) — a marker apparently written by Claude Code's own internal housekeeping shortly after the reset.- I checked Windows Event Viewer (System, Application, Security, Symantec Endpoint Protection, AAD/device-management logs) around 13:29 local. No OS-level process, installer, security product, or management policy touched anything at that time. The device is also not MDM/Entra managed ("Machine is governed by none policy"), ruling out an external enterprise wipe policy.
- The only OS event near that time is a Modern Standby wake-up at 13:27:28 local, ~2 minutes before the
.claudefolder's birth time.
Since no external actor (AV, MDM, installer) shows up in the OS logs, and Claude Code itself wrote a .last-cleanup marker minutes after the reset, this looks like it originated from Claude Code's own local state/cleanup logic rather than anything the user did (no destructive command was run, and the separate ~/.claude.json file was left alone).
Impact
- Custom skills previously configured under
~/.claude/skills/were lost. settings.jsonwas reset to defaults.- Per-project memory files (
~/.claude/projects/<hash>/memory/*.md) for at least one actively-used project were wiped/empty, despite months of prior usage on the account (numStartups: 209).
Environment
- OS: Windows 11 Pro 10.0.26200
- Claude Code version: 2.1.267 (
lastVersionBasein~/.claude.json) - Install method: native (per
~/.local/share/claude,~/.local/state/claudelayout)
Request
Could someone from the team clarify what internal process writes ~/.claude/.last-cleanup and under what conditions it (or another startup routine) would reset/recreate the ~/.claude directory contents (settings, skills, per-project memory) while leaving ~/.claude.json untouched? This looks like a bug in local state handling that can silently destroy user configuration and memory data without any corresponding log trace or user action.
🤖 Generated with Claude Code
3 Comments
Hi!
I asked my Claude Code about session we have started working on around that time:
So, feels like "cleanup" in the
~/.claude/has happened after authentication into account.Thank you!
OK. Just opened a new Claude session today.
It asks for
/loginagain and what is bad it has cleaner~/.claude/directory. Nomemory, noskills. Projects are cleared, too.I don't know how to escalate this, but looks like
Claude Code v2.1.268is at fault.Perhaps just on Windows, but the problem is there.
Thanks
OK. I was able to restore my
memoryandskillsusing Claude advice forvssadmin list shadows /for=C:and thenmklink /d C:\ShadowCopy ....Still not clear what exactly removed content of that dir.
Will keep a pulse on it!