STUPID-2026-0106

Claude Code silently wiped its entire ~/.claude config directory four times in three weeks, including a secrets/ folder with 19 API token files (GitHub #93791)

6.8medium
September 12, 2026VerifiedReproducible
  1. Instruction given

    None — the user was running Claude Code normally on Windows 11 (native install, auto-update channel, version 2.1.269); no command touched ~/.claude directly, and no update ran at any of the four incident timestamps.

  2. Expected behavior

    Claude Code's config directory should persist across sessions. If an internal repair or sync mechanism ever needs to fix a corrupted config file, it should merge into the existing directory rather than deleting and recreating it — and it should never touch a secrets/ subfolder holding live API tokens.

  3. Actual behavior

    Across four separate incidents (roughly Aug 25-26, Sep 8, and twice on Sep 12, about two hours apart), the entire ~/.claude folder was deleted and silently recreated: folder creation timestamps changed, .claude.json came back blank, settings.json reverted to a stub missing most hooks, and prompt history/transcripts were zeroed out. The first incident destroyed roughly 3,572 transcripts, skills, plugins, and hooks; the third destroyed 7,462 transcripts; the fourth also took out the secrets/ subfolder, wiping 19 API token files. The most recent wipe happened mid-session while the user was actively working — the chat window went blank and the folder was found empty. The reporter ruled out antivirus, cloud sync (OneDrive, Google Drive), Windows scheduled tasks, and malware, and found a ~/.claude/backups/ folder containing timestamped .claude.json.backup files, suggesting an internal config-repair routine may be clearing directories instead of merging into them.

  4. Damage

    Four rounds of total config-directory loss over about three weeks, including one wipe that destroyed 19 live API token files and required regenerating credentials, plus repeated loss of months of session history, hooks, and settings needing manual reconstruction each time. The reporter linked the pattern to two older, still-open issues describing the same root behavior on other subfolders — #41415 (~/.claude/agents/ silently deleted by Claude Code's own node process) and #34330 (~/.claude/skills/ cleared within ~300ms of file creation) — meaning this bug class has gone unfixed for over five months and has now escalated from deleting agent/skill files to deleting the whole config directory, secrets included. Filed with labels area:core, bug, data-loss, has repro, and platform:windows; open with no maintainer response as of publication.

On September 12, 2026, a Claude Code user on Windows 11 filed GitHub issue #93791 documenting four separate incidents, over roughly three weeks, in which their entire `~/.claude` configuration directory was silently deleted and recreated from scratch. The first occurred around August 25-26 and wiped roughly 3,572 transcripts along with skills, plugins, and hooks. A second hit on September 8. A third, on September 12 at 07:29:35, destroyed 7,462 transcripts and the full config. A fourth, about two hours later that same day, repeated the wipe and additionally cleared a `secrets/` subfolder containing 19 live API token files. The most recent occurrence happened mid-session while the user was actively working: the chat vanished and the folder was found empty immediately after. Each wipe showed the same signature: the folder's creation timestamp changed, `.claude.json` came back blank, `settings.json` reverted to a stub missing most of the user's hooks, and prompt history was zeroed out. The reporter ruled out the usual external suspects — antivirus, OneDrive and Google Drive sync, Windows scheduled tasks, auto-update (none ran at any incident time), and malware — and instead found a `~/.claude/backups/` folder holding timestamped `.claude.json.backup.<timestamp>` files, suggesting an internal config-repair mechanism that clears the directory outright instead of merging a fix into it. The report ties this to two older, still-open issues describing the same underlying behavior on narrower parts of the same directory: #41415, where Claude Code's own node process silently deleted `~/.claude/agents/` twice, and #34330, where `~/.claude/skills/` was cleared within roughly 300ms of file creation. Both were reported months earlier and neither was fixed — #41415 was closed "not planned." Issue #93791 shows the same class of bug has since escalated from clearing individual subfolders to wiping the whole config directory, secrets folder included. It was filed with labels `area:core`, `bug`, `data-loss`, `has repro`, and `platform:windows`, and remained open with no maintainer response as of publication.

Classification

Failure mode
Destructive Action
Root cause
Other
Domain
Infra

Related incidents

Get told when an agent breaks something

We document AI agent failures daily, severity-scored against a published scale. When one lands at 7.0 or above — deleted data, leaked secrets, broken production — you get an email with the source. When nothing does, you get nothing.

This database is callable over MCP — query it from inside your agent.