JohnnyCode.ai Blog

Prune Your Agent

Your AI assistant is taking notes on you. You didn’t write them. You should read them.

Published

Illustration for Prune Your Agent

I asked my agent what it remembered about me.

The list ran 30 entries long. Some of it was exactly what you’d expect. Writing rules, family context, products in flight. The kind of standing context that makes a working relationship with an AI feel like a working relationship rather than a fresh introduction every time.

The rest of it was noise. Notes from a side conversation about a personal creative project, sitting in global memory. References to a tool I don’t remember discussing. A drink recipe from a one-off chat months ago. Product-specific details from one of my side projects, leaking into every conversation I have on every topic.

I never asked the agent to record any of it. The system was just doing its job in the background, taking notes on what seemed like it might matter, putting everything in the most accessible drawer it had.

The drawer was the wrong drawer. Most of the notes belonged somewhere else, or nowhere at all.

The Memory Layer Is Running, Whether You Look or Not

Most readers of this post have an AI assistant they use regularly. Many of those assistants now have memory. ChatGPT, Claude, Gemini, the major IDE assistants, the major desktop and mobile apps. The feature got rolled out quietly across the industry over the last eighteen months. It’s on by default in most of them.

The default setting is “remember everything that seems useful.” The default scope is “global.” The default behavior is “no notification when an entry is added.”

The result is a memory layer running in the background of every conversation you have, accumulating context, with no maintenance practice attached to it. You’re building a working pair with your AI without ever auditing what the agent has been writing down about the relationship.

Most people have never opened the list. When they do, they discover their agent has been carrying around context they forgot existed, in scopes they never chose, leaking across domains they wanted kept separate.

Two Scopes, One Discipline

The memory systems on the major assistants give you two scopes. Global memory applies to every conversation you have. Project-scoped memory applies only when you’re working inside a designated project or workspace.

Git solved a version of this problem in 2007. Per-repo .gitignore for project-specific patterns. ~/.gitignore_global for the things that genuinely apply across all your work. The bleed-over case, where you stick a project-specific pattern in global because it was convenient at the time, is a known mistake. Every senior dev has lived it. Most have done it.

The same architecture exists in your AI assistant. The same mistake is available. Most people are making it.

The discipline is the same in both cases. Global is for things that apply universally. Everything else goes in a project. When you don’t have the right project yet, create one. When you can’t be bothered to create one, ask yourself whether the memory needs to exist at all.

The Three Layers of Memory Hygiene

The audit has three passes. You can run all three in one sitting or spread them out. They don’t take long. The work is in the noticing.

Scope hygiene. Walk through each entry and ask whether it genuinely applies across all your work. If a memory is tied to a specific product, codebase, side project, or personal interest, it belongs in a project. The signal is simple. Imagine you’re in a totally unrelated conversation. Would this memory be irrelevant or distracting in that context? If yes, it’s project-scoped. Move it.

Lifecycle hygiene. Memories age. Some go stale because the underlying fact changed. A job you no longer have, a product you sunset, a tool you stopped using. Some get superseded because a draft became a published piece, a hypothesis became a product, a side project became a real one. Walk through and remove anything that’s no longer true or no longer relevant. This is the easiest pass and the highest-leverage one. Stale memories don’t just take up budget. They actively misinform the agent.

Density hygiene. Multiple small entries on the same topic can almost always be consolidated into one dense entry. Eight memories about the same project become one well-structured paragraph. The dense version is easier to maintain, easier to audit later, and easier for the agent to use coherently. Some assistants do this consolidation automatically in the background. You can also just ask for it.

The Solution Is a Conversation

Here’s the part that surprised me most when I started doing this.

I expected memory hygiene to require special tooling. Settings menus, dashboard access, developer-mode features I’d have to dig for. Maybe a CLI for power users.

The actual solution is a conversation. The same kind of conversation you’re already having with your assistant for everything else. You ask it to show you what it remembers. You read the list together. You point at things that don’t belong. The agent helps you decide what to keep, what to move, what to delete. You watch it happen in real time.

This is the working pair from the maintenance side. I wrote earlier about how the developer and the AI form a compounding relationship over time, where the pair becomes the real unit of work and the real source of value. That post argued the relationship is an asset. This post is about the practice that protects the asset. Memory hygiene is one of those practices. You bring the judgment about what belongs where. The agent does the execution of viewing, moving, and deleting. The interface is the chat you’ve been using all along.

The moves you can make in your own conversation, today:

Ask the agent to display its current memories.

Look for entries that are project-specific sitting in global. Tell the agent to remove them or move them to the relevant project.

Look for entries that reference contexts you no longer have. Tell the agent to remove them.

Look for entries that contradict each other or duplicate the same fact. Ask the agent to consolidate them.

Add a standing rule that prevents the problem from recurring. Mine looks like this: before adding any memory to global scope, check whether the entry is genuinely cross-cutting or project-specific. Project-specific entries go in projects.

The whole audit takes ten minutes. The standing rule takes thirty seconds.

The Meta Beat

I had this conversation with my agent five minutes before writing this paragraph.

The agent showed me 30 memory entries. We went through them together. I told it which ones belonged in projects I’d create later. I told it which ones to remove entirely. It executed the moves. The list dropped to four entries.

What’s left is genuinely global. Two writing rules that apply to every piece of content I generate. Family context that applies any time I reference people in my life. One scope-check rule that governs my agent’s own future behavior.

The next conversation I open with this agent, on any topic, won’t be colored by context that has nothing to do with the topic. The agent’s memory now actually reflects what it should remember about me at the global level. Everything else is going to live in the right room of the house.

That’s the whole article in a paragraph. The fix is just looking. The tool you need is the tool you’ve been using to do everything else. You point it at itself.

What Most People Don’t Realize

Most people running AI assistants are accumulating memory debt and don’t know it. The agents are getting slowly worse at serving them and the cause is invisible. The cost is paid in subtly off responses, in context that bleeds across domains, in a working relationship that drifts away from accuracy without anyone noticing the drift.

The companies selling memory features want you to think more memory is always better. The opposite is true. Better-curated memory is what compounds. A small set of high-signal entries beats a sprawling list of low-signal ones every time. The agent that knows three true things about you is more useful than the agent that knows thirty things, twenty of which are stale.

The maintenance practice nobody markets is the one that compounds the most.

Go Look

The action item is one sentence long. Open your assistant. Ask it what it remembers about you.

Read the list. Most of you will be surprised by something on it. Some of you will be alarmed. A few of you will discover an entry from a context you wish your assistant had never recorded.

That moment of surprise is the audit beginning. The conversation that follows is the audit running. The four-entry list at the end is the audit complete.

Your agent already has the tool you need. It’s the same tool you’ve been using to do everything else. You just have to point it at itself.

First published April 28, 2026 on 42 Insights.

← All posts