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)
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.
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.
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.
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.
Classification
- Agent
- Claude Code
- Failure mode
- Destructive Action
- Root cause
- Other
- Domain
- Infra
- Source
- Github Issue
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.