Claude Code Self-Audit Finds 3GB of Cruft in ~/.claude — Here's How to Clean It

A Reddit user fed Claude Code a forensic audit prompt to investigate why it felt sluggish. The tool found 3GB of accumulated cruft in ~/.claude and project-level CLAUDE.md files. After cleanup, the directory shrank to under 200MB.
The Prompt Used
Do a forensic audit of my ~/.claude directory and any project-level CLAUDE.md files in my workspace. I suspect accumulated cruft is degrading performance. Report:
For each finding, explain WHY it impacts performance (disk I/O at startup vs. context-window bloat vs. retry loops) and give me safe find / rm commands to clean it up. Don't execute anything — just report.
Findings in the User's Environment
- 2.6 GB in
projects/— 9,318 JSONL session transcripts across 172 project dirs, never purged. Causes disk I/O at startup. - 170 MB in
telemetry/— 91 files of1p_failed_events.*from a silent retry loop where telemetry couldn't reach the endpoint and kept buffering. - 153 MB of file-history undo buffers.
- 3,095 stale todo JSON files — one per session/agent, ever.
- A 986-line
CLAUDE.md, plus a 346-line one insidenode_modulesthat loads whenever youcdnearby, causing context-window bloat. - Stacked
CLAUDE.mdfiles in nested backend dirs adding up to ~900 lines of context just by being in a subdirectory.
What to Do
The user didn't share exact cleanup commands, but the audit report gave safe find/rm suggestions. You can craft your own based on the findings: remove old session transcripts from ~/.claude/projects/, delete telemetry retry buffers, prune undo buffers, and collapse or truncate bloated CLAUDE.md files — especially those in node_modules or deeply nested directories.
📖 Read the full source: r/ClaudeAI
👀 See Also

Claude's /btw Command Enables Parallel Communication During Tasks
Claude AI now supports a /btw command that lets users communicate with the AI while it's actively working on a task, allowing questions, additional instructions, or clarifications without interrupting the current workflow.

Verification Harness Fixes Claude's Plan Execution Problem
A developer built a 30-50 line bash or Python verification layer that checks whether Claude actually executes each step of its own plans by verifying artifacts like file existence, API responses, and config changes.

7 MCP Gateway Bugs: Session Leaks, Dead SSE, and OAuth in Gateway Mode
A Reddit post details seven real-world MCP gateway bugs — session state leaking across clients, silent SSE disconnections, OAuth failures in gateway mode, and more — with fixes based on boring infra, not better prompts.

Field Report: Qwen 3.6 27B on an M2 MacBook Pro (32GB) – Painfully Slow but Smart Output
Running Qwen 3.6 27B IQ4_XS on an M2 MacBook Pro with 32GB RAM yields 7.9 t/s initially, degrading to 3.1 t/s at 52k context. Code quality impresses, but memory bandwidth is the bottleneck.