One big problem that all major labs are working on is agent “Memory.” Their solution so far is to write A LOT of comments in code and keep around as many files as possible on your hard drive.
As users, we also have the same problem. How can we provide the right context about our project. So it’s tempting to have the agent write more handoff files and documents to document everything.
Unfortunately, this approach has several very negative consequences:
Stale information: Remember when we were told not to leave comments in code as normal programmers before AI?!!! But we still kept our //TODOs and //FIXMEs in the code instead of addressing the issues haha. Well, the same problem happens with AI. It just leaves random comments and TODO items and issues in your code that just become stale, but faster, and without you encountering it and feeling bad about it. Instead, you are simply unaware.
Old decisions, new context: I got to admit, this one is super annoying. The agent keeps track of every decision you made at random parts of the project only to bring it up to you as “Decision #8” in your new context. This could be a month later, when you’re working on something completely different and don’t even remember what decision you made or why. Yet, despite the new context of the project, you have to find out what that decision was, why it was made, and decide to override it instead of just going with what needs to be done in the moment.
Old patches for new models: The labs optimize what the agent keeps “in memory” based on the current model you’re using. This helps patch issues with the model. However, when you upgrade to a more powerful model, it doesn’t need the patch. Yet, it still stays. There are many stories of people who remove all skills as they upgrade to a new model, and the model performs better. Why? The skills were meant to patch a weakness in the old model that the new model can now perform well. If you consider that we’ve been now using Claude or ChatGPT for ~3 years, that’s a lot of random “memories” that no longer apply!
BIG FILES: Claude ends up storing literally GIGABYTES of files on your computer without ever cleaning it all up, to the point where your computer stalls and you have no idea why. I recently asked it to do a full clean sweep, and it found 93!! Simulators?!!!! that it made for my older sessions back before I realized that I need to clean up.
Context Bloat: Every time your project loads in a session, you agent now has to go through literally hundreds of these huge random files. This not only wastes a lot of tokens, it also creates confusion at conflicting and unrelated information. The result is serious context bloat that continues to follow you even across tiny changes.
I think the labs are trying to “solve” this issue by simply forcing you to run your project “in the cloud.” Their VMs can then write and keep around even more files without you noticing (b/c your machine will no longer get bricked to warn you!).
I don’t like where this is going, so I’ve defaulted to a few of my own natural solutions to this problem that I want to share. And they all follow one very stupidly simple principle.
YOUR CODE IS THE MEMORY
That’s it. The agent can keep track of decisions during a feature build session, but those decisions will all become code. If a “rule” needs to be added, then it should be added in code (with a test if needed). If a “TODO” needs to be added, then it should just be done right away (or decided that it’s not a todo after all).
It is no longer a challenge and a whole thing to get a TODO feature done like it was before. Worst case - if you’re using a project management tool like Linear, then just add it to your todo there to keep track of it.
Using this principle, I use the following tools religiously now that I highly recommend:
ptack:no-comments
No more comments in code! I was actually surprised when I ran this skill on an older agent-written codebase and it found a ton of TODO items that I didn’t even know about! I had the agent immediately create a plan-flow plan for it so I could make decisions about each task and have it work through the relevant ones. Oops!
One aside: If you haven’t checked out pstack, make sure you do! It’s compiled by SpaceX / Cursor / GrokBot engineer @poteto who is one of the lucky few in the world who gets unlimited tokens (think $500K - $1M PER MONTH!!). So she can really stress test these agentic systems to a level that none of us can. I’m super grateful to her for sharing her knowledge with us all.
However, note that her skills can be “token-hungry” as she does get unlimited tokens, so test them out for yourself. They now do come as a Claude plugin! I personally had Claude analyze them for me and come up with only a few that would work for me for now. This no-comments skill is truly a treasure!
openclaw:test-audit
Just like with comments, agents tend to write A LOT of useless tests. Think a test for what a constant says! Yes, that bad! It’s not a surprise given that most projects that agents are trained on don’t have good tests either.
So while the agent adding “tests” feels good and “productive,” it actually creates a much longer test suite that is mostly useless and increases development time as a result, with long wait times for the tests to pass.
Well, just like @poteto, OpenClaw’s @steipete also has unlimited tokens! So he’s a good person to follow for skills and tips. Anyway, the test-audit skill is another treasure. It makes sure the agent writes useful end-to-end tests. Less tests, but more useful, faster runs.
For Swift apps, I also made Swift Unit Tests for Agents: it helps your agent write unit tests that catch real bugs and run only the tests each change needs.
context-cleanup
I used ptack’s no-comments skill to generate my own context-cleanup skill which works in Claude and Codex. I run it after each feature build and have the Sweeper clean out research, plans, decision records, handoffs, logs, TODO lists, drafts, probes, scratch scripts, screenshots, debug output, etc! It’s aggressive, but I’m very happy with it! I want my code to be the context for future sessions.
Note: Paid subscribers will automatically get it. If you don’t want to subscribe, you can get it here or build your own!
Bonus: Deleting Stale Sessions
When ChatGPT came out, I never thought to delete any session. And the product never prompts you to. Same with Claude. Well, knowing how much that adds in “scratchpad” costs and context bloat, now, as soon as each session completes it’s purpose, I just go ahead and delete it. Once the code is on main, all my context is in git.
Note that in Claude, you can bulk delete only on the web. Super annoying, but I’m happy to keep my sessions only as the very current ones. That also helps me stay organized as I only see what my agent is currently working on and nothing else.
Final
One final note - while I use the rule “YOUR CODE IS THE MEMORY” because I mostly use AI for coding, this applies to any output that AI creates. If you make a video, the video is the memory that holds all the decisions that you made to make that one video. So apply it across the board.
Do any of you have cleanup skills or tricks that you use with your agent? I’d love to know more about them in the comments!


This is such a useful post. I've observed Claude doing all the things you mention and had somehow just come to accept it that way. Time for some housekeeping!
Natasha, this is SO true! I've been dealing with exactly this, and honestly, it's getting ridiculous.
I've been using Codex for quite a while, but a few weeks ago I decided to give Claude another try after experiencing some pretty significant degradation with Codex.
I wear a lot of hats at work, including development, accessibility, and testing. Testing is a huge part of my job, and that means capturing a LOT of logs from Macs, iPhones, and other devices.
Originally, capturing logs meant going through Xcode or Console, finding the relevant errors, saving everything to files, and uploading those files to our internal testing platform, Start Testing. As someone with multiple disabilities who relies on assistive technology, that process can be incredibly tedious. So naturally, I turned to AI agents to help automate it.
And that's where things got interesting.
When I went back to Claude, I had it inspect my Mac, and it discovered approximately **600 GB of logs** left behind from my earlier agent-assisted testing workflows. SIX HUNDRED GIGABYTES! More than half my hard drive was being occupied by logs that an agent had apparently decided should live there permanently.
One of my agents had left log capture running for over a month without stopping it. Nobody was cleaning anything up, and I had no idea how bad things had gotten until I ran out of storage.
I've actually reached the point where I rely on CleanMyMac regularly, and I even created an agent skill to help me use its CLI to inspect and manage the mess. The important distinction is that I want the agent to assist with cleanup, not indiscriminately delete files.
I've also built a collection of skills to make these workflows more manageable, because otherwise the agents just keep accumulating things.
Eventually, I decided to change my entire testing workflow. I built a custom MCP connector called Mac Bridge that runs through a service connected to my Mac. It can manage testing sessions, capture logs, extract the relevant portions, and attach them to issues in Start Testing.
Now I can handle much of my testing through ChatGPT and always-on agents rather than burning through Claude Code or Codex usage just to move logs around. The logs stay on my Mac unless I specifically need to export or attach them.
I actually wrote about the whole experience, including the 600 GB disaster, here:
[I Got Tired of Babysitting Log Capture, So I Turned My Mac Into an MCP](https://taylorarndt.substack.com/p/i-got-tired-of-babysitting-log-capture)
But your post also raises another question I've been thinking about: **What happens when we introduce always-on agents into this equation?**
I use Meta's Muse and ChatGPT's Dots, and these agents are supposed to maintain context and help us over time. But how do we prevent them from accumulating outdated decisions, remembering the wrong things, or repeatedly bringing back information we've already corrected?
Here's a perfect example from yesterday. I was using my Muse agent to help find a new dentist. It recommended someone who wasn't covered by my insurance. I corrected it repeatedly and explained that I'd already scheduled an appointment elsewhere.
And what happened today? It reminded me to call the dentist I'd already rejected!
That's exactly the kind of stale context you're describing, except now it's following us beyond coding and into everyday life.
I genuinely love what agents make possible. They help me do things that would otherwise be much more difficult or time-consuming because of my disabilities. But the trade-off is that I sometimes spend almost as much time managing the agents, cleaning up their files, and correcting their memories as I would have spent doing the original work.
I really think this is one of the biggest problems we need to solve as agents become more autonomous.
I'm definitely going to check out the skills you mentioned. Unfortunately, I don't have unlimited tokens either, so I'll have to be a little selective! I'm also subscribing, because this is exactly the kind of discussion we need more of.
Thanks for writing about this. I'm glad somebody is bringing attention to it!