Claude Code silently filled a user's SSD overnight with junk files

A user reported that Claude Code, an AI coding agent, generated huge amounts of unnecessary files overnight and nearly filled their entire SSD. The incident highlights a real risk of running AI agents unattended for long periods.

Claude Code is an AI tool that writes and runs code automatically on your computer. This user woke up to find their SSD almost full, and traced the cause to Claude Code producing large amounts of temporary or log files during an overnight autonomous session.

For anyone building or running AI agents over long periods, this is a practical warning: always monitor disk usage and restrict where the agent is allowed to write files. In cloud or paid storage environments, runaway file creation can also translate directly into unexpected storage costs — making disk hygiene part of cost control, not just system hygiene.

Key points

  • Claude Code generated enough files in one night to nearly fill an entire SSD
  • Always monitor disk usage when running AI agents in autonomous or long-running mode
  • Explicitly restrict the working directory and temporary file paths for any AI agent
  • On cloud storage, uncontrolled file creation can add surprise storage costs
  • Prepare a cleanup script to remove temporary files after each agent run

Quick term guide

AI coding agent
An AI tool that can write, edit, and run code from your instructions.
coding agent
An AI tool that writes or edits code from a person’s instructions.
AI agents
AI agents are AI tools that can carry out steps toward a goal, not just answer once.
AI agent
An AI program that can inspect information and suggest what to do next.
compute
The server power and chips needed to run AI systems.
autonomous
The ability of an AI to complete tasks or make decisions without constant human guidance.
session
A continuous period of interaction between a user and a computer program.
cloud storage
An online service that lets you save and access files over the internet from anywhere.

Sources covering this story (2)

Read original