
Do AI Coding CLI Tools Destroy SSDs? Investigating Disk Write Issues with Codex, Claude Code, and Claude Desktop
This page has been translated by machine translation. View original
Introduction
In June 2026, a bug was reported and gained attention in which OpenAI's Codex CLI was writing 640TB of data annually to SSDs, potentially exhausting a drive's lifespan in under a year.
As a developer who uses AI coding CLI tools daily, this is not someone else's problem. In this article, I'll summarize the details of the Codex CLI issue, then share the results of my own investigation into whether similar problems are occurring with Claude Code and Claude Desktop in my environment.
The Codex CLI SSD Write Bug
What Is Happening
Summarizing the contents reported in GitHub Issue #28224:
- Codex CLI continuously writes TRACE-level logs to
~/.codex/logs_2.sqlite - Approximately 37TB of writes occurred over 21 days (roughly 640TB annualized)
- Even when
RUST_LOG=warnis set, the SQLite sink continues writing at TRACE level (ignoring the environment variable) - SQLite's WAL (Write-Ahead Logging) mode causes write amplification
Why This Is Serious
General consumer 1TB SSDs have a manufacturer-specified total write limit called TBW (Terabytes Written). For the Samsung 990 PRO 1TB, the TBW is approximately 600TB. This single bug alone would consume the SSD's warranted lifespan in under a year.
As of June 23, 2026, three PRs have been merged with an expected ~85% reduction in logging, but a complete fix has not yet been reached.
Workaround
macOS/Linux users can redirect the log file to a RAM disk using a symbolic link:
ln -sf /tmp/codex_logs.sqlite ~/.codex/logs_2.sqlite
Since this file contains no conversation data, there is no problem if it is lost upon restart.
The State of Other AI Coding Tools
I investigated whether similar issues have been reported for tools other than Codex CLI.
| Tool | SSD Write Issue | Notes |
|---|---|---|
| Codex CLI | Severe (640TB/year) | TRACE-level SQLite logging |
| Claude Code | Previously reported | Debug log infinite loop, file history bloat |
| Claude Desktop | Previously reported | 8–13GB of writes in one hour |
| Gemini CLI | Not reported | - |
| Aider | Not reported | - |
| Cursor | Not reported | - |
| GitHub Copilot | Not reported | - |
Past Issues with Claude Code
Two related issues have been reported with Claude Code:
-
Debug log infinite loop (#16093): The logger records operations that take more than 75ms, but as the debug log file grows large, the writes themselves begin to take more than 75ms, causing an infinite loop where it writes a "log write was slow" entry. One case saw
.claude/debug/balloon to 42GB over 7 days. -
Disk exhaustion from file history (#10107): One case saw 300GB of disk usage from file history tracking.
Claude Desktop Issues
A separate issue has also been reported with Claude Desktop (#43390):
- 8–13GB of disk writes in one hour
- macOS flagging the system disk write limit as exceeded (threshold: approximately 99KB/s over 86400 seconds)
- Actual write rate of 2,000–5,000KB/s (20–50 times the threshold)
Investigating My Own Environment
I actually checked the state of Claude Code and Claude Desktop in my own macOS environment.
Investigating Claude Code
Debug Log Directory
$ du -sh ~/.claude/debug
2.8M /Users/username/.claude/debug
$ wc -l ~/.claude/debug/* | tail -1
18431 total
2.8MB, approximately 18,000 lines total. There are 114 debug files, with the largest being only 207KB. This is on a completely different scale from the 42GB / over 500 million lines reported in the infinite loop bug (#16093).
File History
$ du -sh ~/.claude/file-history
12M /Users/username/.claude/file-history
12MB. This is a normal value, incomparable to the 300GB from the file history exhaustion bug (#10107).
Breakdown of .claude/ as a whole
$ du -sh ~/.claude/*/ | sort -hr | head -10
866M plugins/
434M projects/
266M security/
12M file-history/
2.8M debug/
532K telemetry/
1.5GB total. Plugins and projects make up the majority, both within normal range.
Investigating Claude Desktop
Overview of the Application Support Directory
$ du -sh ~/Library/Application\ Support/Claude/
9.2G
At first glance 9.2GB looks large, but let's check the breakdown:
6.2G vm_bundles/
1.1G local-agent-mode-sessions/
1.1G Cache/
240M Code Cache/
225M claude-code-vm/
206M claude-code/
175M Claude Extensions/
10M pending-uploads/
What vm_bundles/ Is (6.2GB)
I checked the contents of the largest item, vm_bundles/:
$ ls -lh ~/Library/Application\ Support/Claude/vm_bundles/claudevm.bundle/
-rw------- rootfs.img 10G (apparent) → 5.6G (actual)
-rw-r--r-- sessiondata.img 749M (apparent) → 634M (actual)
rootfs.img is a sparse file that appears to be 10GB but only uses 5.6GB of actual disk space. This is the Linux VM root filesystem used for Claude Desktop's agent mode, and is necessary for running code in a sandbox.
Rather than accumulating new bundles with each version, only a single bundle existed, so there was no version bloat issue.
Agent Mode Sessions (1.1GB)
$ ls ~/Library/Application\ Support/Claude/local-agent-mode-sessions/
26e16885-.../
├── 45517894-... 89M
└── 5c883d62-... 984M (1,120 conversations)
Approximately 3 months of conversation history data from March through June. This is normal accumulation, not a bug. It can be deleted to reclaim space if no longer needed.
macOS Disk Write Warnings
$ log show --predicate 'process == "dasd" AND eventMessage CONTAINS "Claude"' --last 7d
(no output)
No excessive disk write warnings from macOS were detected.
Investigation Results
| Check Item | Result | Status |
|---|---|---|
| Claude Code debug logs | 2.8 MB | Normal |
| Claude Code file history | 12 MB | Normal |
| Claude Desktop logs | 52 MB | Normal |
| Claude Desktop VM bundle | 6.2 GB (VM itself) | Normal (base cost) |
| Claude Desktop sessions | 1.1 GB | Normal (accumulated, deletable) |
| macOS disk write warnings | None | Normal |
In this investigation, no impact from the known bugs was found.
Recommendations for Regular Monitoring
Even if there are no issues right now, the situation may change with future updates. I recommend regularly checking with the following commands:
# Check the size of Claude Code debug logs and file history
du -sh ~/.claude/debug ~/.claude/file-history
# Check the overall size of Claude Desktop
du -sh ~/Library/Application\ Support/Claude/
# Monitor macOS disk writes (real-time)
sudo fs_usage -w -f diskio | grep -i "claude"
If you see abnormal growth, check the GitHub Issues for each tool.
Summary
- The 640TB/year disk write bug in OpenAI Codex CLI is a genuinely serious problem
- Similar issues have been reported in the past for Claude Code and Claude Desktop, but they appear to have been fixed in current versions
- No impact from known bugs was detected in my own environment
- No similar reports were found for IDE-based tools (Cursor, Copilot) or lightweight CLIs (Aider, Gemini CLI)
- Tools that perform TRACE-level SQLite logging locally tend to be particularly at risk
- Regular monitoring of disk usage is an effective preventive measure
AI coding tools are convenient, but it's also important to understand what they're doing in the background. In particular, issues related to SSD lifespan may already be too late to address by the time you notice them, so make a habit of proactive monitoring.

