It Worked Once
  1. Posts
  2. Entry 002

Fifteen gigabytes of my own agents' downloads

I had agents build a disk alarm overnight. On day one I called it useless. Two days later it cleared 15 GB, and most of that was my own agents downloading the same tools over and over.

Filed
Revised
Reading
5 min
Outcome
Fixed

On 31 October my Mac was down to 7.2 GB free. The night before, I had gone to bed and told a few agents to build me a disk alarm. By morning it was installed and running. That evening I looked at the disk, looked at the alarm, and wrote this:

The Disk Alarm you’ve built is honestly useless. Because it doesn’t go deep enough. My disk is blowing up. First, fix my disk. Then optimize the app

It was a fair review. The alarm watched free space and had a button for a short list of safe caches. It never told me where the space went. Mine was going somewhere I couldn’t see.

It wasn’t the first time

On 17 October I wrote:

I’ve tried to cleaning up my Mac multiple times and failed each and every time. Now my storage is below 4GB. Run a clean up session.

An agent got it to 46 GB free that day. My notes say it started at 3.3 GB. Two weeks later, 7 GB again. Something was growing, and I had no idea what.

On 30 October I spent a day brainstorming personal apps with an agent. It pitched a “disk alarm with a clean button” as its seventh idea. I wrote back:

7th, loved it

That brainstorm is why the app exists.

The overnight build

I set the build up the usual way. One agent designs and reviews, two agents build, a cheap one does the chores. Then I wrote:

Don’t wait for anything on me. Gonna sleep.

The design was committed around two in the morning. The reviewer then said “Not ready to install” and listed three blockers, each rated 5 out of 10. My favourite: a clean could finish inside a menu that had already closed, so I’d see no result unless I opened the menu again.

Version 1 passed its tests, 124 of them by install time. I still called it useless.

Version 2, the same day

The same agent session fixed my disk first: 7.2 GB free became about 40.

What wentSpace
1,080 old copies of Chrome, hidden in a temp folder, from 4 versions I no longer had2.5 GB
Download caches (npm, pip, Homebrew and others) plus leftover installer folders8.3 GB
Docker leftoversabout 4.6 GB
A virtual machine from one desktop app. I approved this one.10 GB
node_modules in 36 idle project copies. I approved this too.4.3 GB
The Trash. Approved as well.2.7 GB

Then the app got three new parts. A “where is the space” view that measures every folder over 256 MB. An automatic clean of the safe stuff when free space drops under 15 GB. And a list of “needs your OK” items, which asks before it touches anything big.

There’s also one more piece. Another agent walks around read-only and suggests other things to delete. The app doesn’t trust it. The app measures each folder itself. Then a cheap model gives each folder a score for “could this hold something I can’t get back”. At 0.5 or higher the app holds it back. And I still get asked. The cheap model’s only job is to say no. That’s the part I’d copy.

That evening I opened the menu and wrote this:

Now I need your magic. This one’s ugly as hell. It doesn’t have icon. It looks like a MSDos thing :))

It got an icon and a proper header that night.

The 15 GB

Overnight on 2 November the automatic clean ran by itself and cleared about 15 GB. A few minutes later I wrote:

Something’s keep expanding in my storage when I work with you. What’s going on?

The agent looked, and blamed two growing folders: the history database of my agent app, and the chat transcripts. Both grow. Neither explained 15 GB. I told it so:

Nah, it was more than that. Clean Safe cleaned 15GB automatically

It went back and read the cleaner’s own log. 83,058 log entries. About 54,700 of them were Python package files, and most of those were around six near-identical copies of one Amazon library, about 7,270 files each.

The cause: one tool server was set to start with “@latest”. So every new session, and every agent my agents started, downloaded a fresh copy.

My own agents did that. The cleaner I called useless is the thing that showed it.

The rule

I asked the agent how to stop this for good:

How do we prevent that? Not limited to the AWS. As a general rule for the agents I mean

It wrote a “Downloads and caches” section into the file all my agents read. In short: reuse, don’t re-download. No @latest unless I ask for an update. Install a tool once if it runs more than once. Pin versions in anything that starts by itself. Throwaway files go in the scratch folder and get deleted after. Say so before a download over about 500 MB.

The fix · rule
Rule: downloads and caches.

Every session repeats what you set up, so one careless download turns into gigabytes over a month.
- Reuse what is already installed. Don't download a tool again if a copy exists on this machine.
- Never add @latest (it means "fetch the newest copy every time"), --refresh or --no-cache unless I ask for an update.
- If a tool will run more than once, install it once and call it by its installed path.
- Anything that starts on its own (background servers, plugins, scheduled tasks) gets a fixed version number, not "latest".
- Use the project's existing environment and packages. Don't create a second copy beside them.
- Temporary files go in one scratch folder. Delete only the big temporary files you created yourself when the task is done.
- Tell me before any download over 500 MB, and say what it is.

How to use it

Paste it into the instructions file your agent reads at the start of every session, in your project folder: CLAUDE.md for Claude Code, AGENTS.md for Codex and most other coding agents. If the file isn’t there, create it. In a chat app without files, paste it into the project’s custom instructions, or at the top of a new chat.

How you’ll know it works: free space stops shrinking week after week for no reason. To check the damage already done, ask your agent: “List the 20 largest folders in my user folder and in its cache folders, with sizes. Change nothing.”

I’ll be honest about how far that rule goes. It reaches agents working inside my projects folder. Agents started anywhere else don’t load it. So it covers most of my agents, not all.

Revision record

First draft.
Fact-checked: test count at install is 124, not 113; added the 2.7 GB Trash row; rule wording matches the real file.