Claude Code Silently Deleted User's Agent Config Directory Twice Without Warning
A Claude Code user reported that the tool's background process silently deleted all six files in their ~/.claude/agents/ directory on two separate occasions, with no command or user action triggering the wipe. The incident, filed as GitHub issue #41415, affected versions 2.1.87 and 2.1.88 on macOS, ruling out a single-build fluke. Filesystem tracing confirmed the deletions originated from Claude Code's own node process, which wrote the files and then unlinked all six roughly 47 minutes later. The user theorizes a cloud-agent sync path may be overwriting local files instead of merging with them, though Anthropic's team closed the issue as 'not planned' without confirming a root cause or shipping a fix. Files were recoverable only because the directory was git-backed; the sole known workaround — setting macOS's immutable flag on the files — also prevents Claude Code from writing to them legitimately.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in