Why AI Coding Tools Fill Up Your System Drive (and How to Move Their Data Safely)

    AI coding assistants and AI-native IDEs can consume tens of gigabytes of system drive space even when you have installed very little software. This article explains where that space actually goes — model weight caches, code and vector indexes, session history and snapshots, and runtime files such as plugins, logs, and crash dumps — and why these files should be relocated rather than deleted. It walks through capacity mapping with du, find, and PowerShell, then shows how directory junctions and symbolic links decouple physical storage from logical paths so tools keep working unchanged. You will find a five-step migration procedure, pre-migration checks, verification steps, rollback and risk controls, troubleshooting for common failure modes, and longer-term growth control through default data directory settings, scheduled cleanup, index copy limits, and making session knowledge explicit. The article closes with a four-dimension framework for evaluating AI coding tools and a recommended decision order.

    1. The Problem: Your System Drive Runs Out of Space Even Though You Barely Installed Anything

    After using an AI coding assistant or an AI-native IDE for a while, many developers run into the same pattern: free space on the system drive slowly drops from tens of gigabytes, and at some point it hits zero. At that moment the tool can no longer create new sessions or save conversation history, indexes and caches stop refreshing, and the editor starts slowly or crashes outright. Yet if you check your installed programs list, there is not much there.

    The root cause of this contradiction is that the wrong perspective is being used to measure disk usage. Traditional software occupies disk as “installer plus a small amount of configuration,” usually on the order of hundreds of megabytes. AI coding tools, by contrast, occupy disk through runtime state, which can easily reach tens of gigabytes. These tools are essentially a small AI infrastructure stack running locally, and it maintains at least four layers of persistent state:

    Layer Typical Contents Growth Pattern
    Model layer Local weight caches, quantized variants, vocabularies, embedding indexes A single weight file can reach gigabyte scale, and old versions are often not reclaimed after an update
    Index layer Repository semantic indexes, vector indexes, full-text search indexes Scales with project size and the number of historical versions
    Session layer Conversation history, context snapshots, reasoning traces, patch backups Grows roughly linearly with usage; a single long session can contain many file snapshots
    Runtime layer Plugin and extension directories, language services, logs, crash dumps, temporary files Written to constantly; many small files that are hard to clean up

    Stack all four together, then apply the multiplier effect of “one index per project, one leftover model per upgrade,” and tens of gigabytes is only a matter of time.

    It is worth stressing that most of these files are required files and cannot simply be deleted. Deleting the model cache means the next conversation re-downloads it; deleting indexes means a large project must be fully re-parsed, turning a wait of seconds into a wait of minutes; deleting session records loses context assets outright. So the correct strategy is not “delete” but “relocate.”


    2. Locate First: Scan, Sort, and Aggregate to Find the Real Space Consumers

    Before migrating anything, do a capacity survey. The recommended order is:

    1. Scan: Scan only tool-related directories, so you avoid the IO jitter caused by traversing the entire drive. Common locations include hidden configuration directories under the user home directory, the system temporary directory, and the user data directory under the program installation directory.
    2. Sort: Aggregate and total sizes per directory rather than looking at individual file sizes. Real usage is usually hidden in “ten thousand small files,” not in “one large file.”
    3. Verify: For suspected target directories, record a baseline size (the commands below let you grab one quickly on different operating systems) and compare before and after the migration.
    1. # Linux / macOS: aggregate and sort by first-level subdirectory
    2. du -h -d 1 ~/.your-ai-tool 2>/dev/null | sort -h | tail -n 20
    3. # Inspect the distribution of a file class (for example logs and snapshots)
    4. find ~/.your-ai-tool -type f \( -name "*.log" -o -name "*.jsonl" \) \
    5. -printf "%s\t%p\n" 2>/dev/null | sort -rn | head -n 20
    1. # Windows: aggregate and sort by first-level subdirectory (PowerShell)
    2. Get-ChildItem -Path "$env:USERPROFILE\.your-ai-tool" -Directory |
    3. ForEach-Object {
    4. $size = (Get-ChildItem $_.FullName -Recurse -File -ErrorAction SilentlyContinue |
    5. Measure-Object -Property Length -Sum).Sum
    6. [PSCustomObject]@{ Dir = $_.Name; SizeGB = [math]::Round($size / 1GB, 2) }
    7. } | Sort-Object SizeGB -Descending | Select-Object -First 20

    The value of this step is that it turns “this tool feels like it eats disk” into an actionable conclusion such as “the model cache takes 18 GB, indexes take 9 GB, session logs take 4 GB.” Only then can the migration be prioritized, instead of moving everything blindly.


    3.1 How It Works

    A migration that stays transparent to the application relies on the operating system’s directory junction / symbolic link mechanism (also called a junction in the Windows ecosystem). The idea is simple: at the original path you place a tiny “pointer” that refers to the real directory on a larger drive. When a program accesses the original path, the kernel redirects the request automatically during path resolution, and the application notices nothing.

    This means:

    • No tool configuration, remembered path, or plugin scanning logic needs to change;
    • Uninstalling the tool will not accidentally delete the real data (deleting a junction does not delete the target contents);
    • The migration is reversible — you can move the real directory back and delete the junction at any time.

    A minimal manual implementation looks like this (run it in an administrator / elevated terminal):

    1. # 1) Fully exit the tool and its related background processes
    2. Get-Process | Where-Object { $_.Path -like "*your-ai-tool*" } | Stop-Process -Force
    3. # 2) Move the real directory to the target drive
    4. Move-Item "$env:USERPROFILE\.your-ai-tool" "G:\AI-Cache\.your-ai-tool"
    5. # 3) Create a directory junction at the original location (/J needs no developer mode, so it is more widely usable)
    6. cmd /c mklink /J "$env:USERPROFILE\.your-ai-tool" "G:\AI-Cache\.your-ai-tool"
    7. # 4) Verify: the path resolves to the target drive and costs only a tiny pointer
    8. Get-Item "$env:USERPROFILE\.your-ai-tool" | Select-Object LinkType, Target

    3.2 Why Administrator Rights Are Required

    Creating a link is a system-level object operation that involves writing a filesystem reparse point. Under normal privileges, a process has no right to create such objects in protected locations; this also explains why any automated migration tool asks to start elevated. Conversely, it points to a security boundary: what such a tool does is equivalent to “rewriting your user directory structure with high privileges.” For that reason, only use implementations that are traceable and rollback-capable, and keep a directory listing and size record from before and after the migration.

    3.3 Four Things You Must Do Before Migrating

    • Clear the field: The tool’s main process and all its backend helper processes (language service, indexer, file watcher, downloader) must exit completely. They may remain resident even after being “closed” in the foreground, and they may hold handles to cache files. On Windows, unreleased handles cause a move to fail partway and leave a broken state that is “half on the source drive, half on the target drive.”
    • Confirm target capacity and media: The target drive should have at least 1.5x the free space of the total being migrated, leaving room for index rebuilds and version updates. An SSD is a better fit than an HDD for index workloads with frequent random reads and writes.
    • Record a baseline: Note the size and file count of each subdirectory before migrating, as a basis for post-migration verification.
    • Prepare a rollback path: Know the full command sequence for “move the directory back plus delete the junction,” not just the forward path.

    4. Making the Migration Succeed the First Time: Five Steps and a Verification Checklist

    1. Survey: Produce a list of “directory → size → migratable or not.”
    2. Clear the field: Force-terminate all related processes and confirm no handles remain (the resource monitor built into the OS can show handle usage).
    3. Move: Relocate the target directory as a whole using a move rather than copy-then-delete, which preserves atomicity and consistency.
    4. Link: Create the directory junction at the original location and verify that LinkType and Target point where they should.
    5. Re-verify: Start the tool, create a new session, open a medium-sized project, and trigger an index. Confirm there are no path errors or permission errors, then check that the target drive’s usage has grown — proof that reads and writes are actually landing in the new location.

    One common mistake deserves a separate note: do not turn a “migration” into a “copy.” Copy plus manual delete is a classic half-failure mode. An interrupted copy, insufficient permissions, or a locked file — any of these can leave data existing in two places at once, or files missing locally, while the application still believes it has a complete cache.


    5. Rollback and Risk Control: A Safety Net for the Migration

    The strength of the symbolic link approach is that it is reversible, but reversibility depends on every step being recorded. Recommended practice:

    • Migration log: Write the target path, original path, size, and timestamp of each step into a manifest file stored at the root of the target drive (not mixed in with the cache).
    • One-step restore: Restore means stop processes → delete the junction at the original location (note: delete the junction, do not recursively delete the target) → move the directory back → start and verify. Before deleting the junction, confirm with Get-Item that LinkType is not empty, so you do not recursively delete real data as if it were an ordinary directory.
    • Upgrade protection: A major tool upgrade may rebuild the cache directory structure. Before upgrading, back up non-regenerable data such as “configuration and sessions” separately. Models and indexes are regenerable; losing them only costs waiting time.
    • Exception handling: If you see a startup error saying a directory cannot be found, check three things first — whether the junction was deleted by mistake, whether the target drive lost its drive letter, and whether the current user has read and write access to the target directory (a changed drive letter breaks the junction directly, and this is the most common failure source in removable and external drive scenarios).

    6. Less Hassle Than Migrating: Suppress Growth at the Source

    Migration adds capacity; governance reduces weight. Only the two combined are sustainable:

    1. Migrate the default data directory: Most tools support changing the user data directory through an environment variable or configuration setting. Pointing it at a large drive right after installation and before the first conversation is the cleanest approach, since it bypasses linking entirely.
    1. # Example: point the user data directory at a large drive (the variable name depends on the tool's documentation)
    2. export AI_TOOL_DATA_DIR=/data/ai-cache
    1. Set up a periodic cleanup policy: Model caches, logs, and temporary snapshots are regenerable; conversation history and project configuration are not. Set retention periods on the principle of “regenerable data first.”
    1. # Example: clean up logs and temporary files older than 30 days (Windows)
    2. $cut = (Get-Date).AddDays(-30)
    3. Get-ChildItem "$env:USERPROFILE\.your-ai-tool\logs" -Recurse -File -EA SilentlyContinue |
    4. Where-Object { $_.LastWriteTime -lt $cut } | Remove-Item -Force -EA SilentlyContinue
    1. Limit the number of index copies: Keep indexes only for active projects and rebuild historical ones on demand. The cost of an index is a one-time wait, not a loss of capability.
    2. Make session assets explicit: Export valuable conversation conclusions into in-project documents or rule files so that knowledge settles in the project repository instead of being locked inside the tool’s local cache. This solves both the capacity problem and the problems of team collaboration and knowledge reuse.
    3. Distinguish regenerable from non-regenerable data: Label each type of directory; this is the foundation for every automated cleanup policy that follows.

    7. Evaluating AI Coding Tools: Four Dimensions and One Decision Order

    Back to the original question — how do you tell whether an AI coding tool is good? Rankings detached from your context have limited meaning. A more reliable approach is a structured assessment along four dimensions, applied in a specific decision order:

    Dimension What to Examine Suggested Verification
    Understanding and maintainability Cross-file references, long-context consistency, ability to clarify requirements, coherence across multiple rounds of changes Use a real medium-sized project and make three progressively deeper change requests in a row
    Generation quality and engineering discipline Type safety, error handling, adherence to existing directory and naming conventions, tests and verifiability Ask for unit tests and actually run them, rather than judging code that merely “looks right”
    Response speed Time to first token, throughput on long tasks, index and retrieval efficiency Measure waiting time for the same task, distinguishing “network latency” from “slow local indexing”
    Cost and controllability Billing model, quota limits, where data is stored, team management Confirm whether data leaves the local machine and whether enterprise-grade permissions and auditing exist

    The recommended decision order is: compliance first (can the data leave the country or the internal network), then cost (the total expense per unit of work), then quality, and only then speed. The reasoning is straightforward — speed can be improved by changing machines or networks, while the rework cost of failing on quality or compliance far exceeds the waiting time you saved.


    8. Quick Reference for Common Issues

    • The tool reads old content after migration? Check whether a directory junction was created but points to the old target, or whether junctions are nested (a junction inside a junction).
    • A file is reported as in use during the move? The cleanup was incomplete; focus on background indexer and file-watcher processes.
    • Migration succeeded but space was not freed? Some implementations do “copy plus keep the original directory,” so confirm the source directory was actually moved or deleted.
    • The target drive is removable media? Not recommended. A lost drive letter disables all junctions at once, and the session database risks corruption if the media is pulled out unexpectedly.

    9. Conclusion

    When the system drive is quietly filled up by an AI coding tool, the problem is not really the tool. It is that data tiering in the development environment has not kept pace with the growth of runtime data. The solution is clear: start with a capacity survey, use symbolic links to decouple physical storage from logical paths, turn the four steps of clearing the field, moving, linking, and re-verifying into a rollback-capable process, and then do long-term governance from four directions — the default data directory, periodic cleanup, index copy limits, and making session assets explicit.

    For team scenarios, this approach can be engineered further: bring the data directory, cleanup policies, and capacity alerts into the environment baseline, distribute development environments uniformly through container platforms or images, and pair that with log services and monitoring alerts that flag disk usage thresholds. When “low disk space” becomes an alert that arrives early rather than a crash at the most critical moment, the stability of the development experience has genuinely been established.