AI Agents Drained 500 GB of MacBook Disk in One Week: Swift Weekly #160
Agent-heavy development now consumes disk as fast as it consumes tokens, and Apple's per-gigabyte upgrade pricing turns that into an expensive failure mode instead of a cheap fix, so storage governance (backup exclusions, snapshot cleanup, temp-dir hygiene) has become part of running agents at all. Shared Simulators and DerivedData can also silently invalidate another agent's test results, which breaks trust in parallel workflows.
AI coding agents turned a MacBook that normally holds 500–600 GB of free disk into a machine that ran completely dry twice in one week. The first outage traced to an agent generating data inside directories Time Machine was still backing up: local snapshots kept accumulating blocks as files churned, and clearing them plus adding exclusion rules brought the space back. A second incident came from a test script the agent wrote, which called `mkdtempSync` to make a temp directory but no cleanup, so each QA run unpacked the entire 5.7 GB Design repo onto the drive.
Because agents push development forward in a more aggressive, parallelized way than humans do, storage now shares billing with CPU and RAM for AI workflows. Apple's famously expensive storage pricing makes buying a bigger disk an unattractive fix, so the practical answer is behavioral: strict environment boundaries and cleanup rules for agents, or no disk survives brute-force consumption.
Elsewhere in the issue: Instruments-based SwiftUI redraw diagnosis, the iOS 27 Now Playing framework's unified media session model, fold-aware layout for iPhone Duo, and szt, a Swift disk analyzer that scans 667,000 files across 123 GB in 2.4 seconds versus du's roughly 17.
Storage is the failure mode AI workflows hit late: agents exhaust CPU and RAM loudly, but a disk fills quietly until some unrelated process fails, so disk monitoring and cleanup rules belong in the same loop that reviews generated code.
Agents caused both of the week's disk crises and then helped clean them up, which frames AI workflows as self-generating overhead: the same parallelism that accelerates development also produces messes at a rate humans alone would never hit.
Git worktrees split the source tree but not the runtime, so the shared-Simulator failure generalizes: any environment state shared between agents is a place where one agent's green result can be silently poisoned by another.
SwiftUI deprecating Text's + operator from iOS 26 is an API-design lesson: keeping the full localizable sentence inside interpolation is what lets translators reorder content, and that outweighs the convenience of concatenation.
Anyway, I don't know where the disk went. There are clearly only a few projects left, but everything is dedicated to AI. I often use AI to help me analyze and troubleshoot, but it just never suffices.
AI occupies, AI checks, AI deletes.
AI spent your tokens.