← Reddit

Claude disk use balloons - how to keep in check?

Reddit · 65-76-69-88 · April 26, 2026
A Claude Code user experienced excessive disk storage consumption on their SSD, with a single Claude folder in AppData/Local/Packages exceeding 13GB, primarily occupied by a virtual machine file named rootfs.vhdx. The cache-like storage continued to grow without decreasing, causing repeated out-of-disk-space errors during coding sessions and prompting questions about safe removal or relocation to external storage.

Detailed Analysis

Claude Code's disk space consumption has emerged as a significant pain point for users running the tool on storage-constrained machines, as illustrated by this Reddit post in which a Pro plan user reports a single `Claude_<id>` folder under `AppData/Local/Packages` swelling to over 13GB, with the vast majority of that space occupied by a virtual machine disk image (`rootfs.vhdx`). The user is operating on a 256GB Windows drive that is already heavily consumed by the operating system itself, leaving little room for Claude's ancillary storage demands. The core complaint is that the storage footprint appears to grow monotonically — never self-trimming or releasing space — suggesting that cache management and cleanup routines are either absent or not functioning as expected. The user is also asking whether the VM disk image is safe to delete or resize, and whether Claude's storage paths can be redirected to an external drive, neither of which are questions with straightforward answers in the current tooling.

The underlying technical causes of this disk bloat are well-documented across multiple user reports. Claude Code stores bash command output in memory and on disk throughout the entirety of a session, a behavior that can balloon storage consumption to 90GB or more in extreme cases. A separate but related issue involves debug data accumulating in hidden directories — on macOS, for example, the `~/.claude/debug` folder has been reported to reach 472GB on some machines. The `rootfs.vhdx` file the Reddit user identifies is the virtual hard disk for a Windows Subsystem for Linux (WSL) instance, which Claude Code spins up to execute shell commands in a sandboxed Linux environment. This VM image grows as packages are installed and command histories accumulate, but WSL does not automatically compact the `.vhdx` file even after files inside it are deleted, meaning the disk footprint only ever expands unless the user manually runs a compaction operation (via `wsl --compact` or Hyper-V disk tools). Anthropic has published a workaround — setting the environment variable `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=true` — which suppresses the accumulation of non-critical debug data, though this does not directly address the WSL disk image growth.

The situation points to a broader tension in how agentic coding tools are architected. Claude Code is designed to operate with high autonomy — spinning up environments, running commands, installing dependencies — which inherently requires a richer local runtime footprint than a conventional IDE plugin. The WSL-based sandbox is a deliberate security and isolation choice, but it carries storage overhead that is largely invisible to end users until it becomes a crisis. Unlike a traditional application that clearly delineates its cache from its operational data, Claude Code's footprint is spread across Windows package directories, WSL virtual disks, and hidden dot-folders, none of which are surfaced in standard Windows storage management tools. For users on consumer-grade hardware — precisely the audience most likely to be on a Pro plan exploring the CLI — this creates a frustrating experience where a tool meant to accelerate development instead threatens to halt it entirely due to disk exhaustion.

More broadly, this issue is symptomatic of a maturity gap in the agentic AI tooling ecosystem. Products like Claude Code, GitHub Copilot Workspace, and similar agent-driven development environments are moving extremely quickly from research prototypes to production tools, often before the operational hygiene concerns — storage management, log rotation, environment cleanup, resource quotas — that characterize mature software have been fully engineered in. Anthropic's own documentation and community responses currently rely heavily on manual interventions (deleting debug folders, compacting VHDX files, setting environment variables) rather than automated housekeeping. As these tools scale to wider audiences, including enterprise deployments where IT governance over disk usage is non-negotiable, the absence of built-in storage management will become an increasingly prominent friction point. The community's workaround knowledge is useful but fragile, and the lack of a first-party settings panel for configuring storage paths or caps leaves users on storage-constrained machines with limited recourse.

Read original article →