Esteban | ˈe-stə-vən - /collection/context-dies-between-agents/

Your AI agent forgets everything when you switch

Jun. 10, 2025

Read time: 5 minutes and 24 seconds.

tags:

The memory belongs outside the assistant

Picture yourself late on a Tuesday, two hours into a good session with a coding assistant. It finally knows which service talks to which, and why the old payment module is off limits.

It even knows your test suite needs a local database running first. Then the chat hits its limit, or a colleague recommends a different tool, and your next window opens with a cheerful greeting and no idea who you are.

Everyone is shopping for the smartest coding assistant, as if the right one will finally understand their project. That search misses the point.

What made your last assistant useful wasn’t the model at all. It was everything you’d taught it about your code, and you threw that away the moment you switched.

Think about what a good session looks like. You explain how the project is laid out, which folder nobody should touch, why the tests are slow, what you tried that failed.

By the end of an hour the assistant is sharp, because you made it sharp. Then you open a different tool, or even a fresh chat in the same one, and it greets you like a stranger.

You start over. Every time.

It’s a hospital with no handover notes. The night nurse might be brilliant, but if the day nurse walked out without writing anything down, the patient gets the same questions and the same mistakes all over again.

Nobody blames the night nurse. They blame the missing notes.

Why the forgetting is built in

I’ve described these models before as a search engine that learned to make conversation, and I still think that’s the right frame for this problem.

A language model predicts the next likely words from whatever is sitting in front of it. Whatever you said in yesterday’s chat isn’t in front of it today unless something puts it there.

That’s simply how the tool works. Getting angry at it is like getting angry at a calculator for not remembering last week’s sums.

I’ve also spent plenty of hours pulling my hair out trying to get the perfect output from a prompt, and one pattern kept showing up. Instructions at the top carry far more weight than clutter buried in the middle.

So a notes file your assistant reads first puts your context exactly where the model pays the most attention. I wrote more about those limits in pulling your hair with AI.

Most people reach for loyalty as the fix. Pick one assistant, stay with it, and hope its memory features improve.

That’s a bet on a vendor you don’t control. It falls apart the first time a better tool shows up or your team uses something different from you.

A saner fix is boring. Keep the memory in plain files that live with the project, and make every assistant read them before it does anything.

Write a short note on how your code is organized. Add a list of decisions and why you made them, plus the commands that build and test the thing.

And write down the traps you’ve already fallen into, so nobody falls in twice.

Your tools already expect this

Good news: the tool makers have arrived at the same answer. Claude Code reads a CLAUDE.md file from your project and loads it into each session as standing instructions.

GitHub Copilot supports repository custom instructions in a file inside your .github folder, covering how to build, test and validate changes. Different file names, same idea: your project carries its own briefing.

You don’t have to pick one. Keep your real notes in one place and point each tool’s expected file at it, or copy the essentials across.

What matters is that your knowledge lives in the repository, under version control, where you can see who changed it and why.

For the decisions part, borrow an old and well-tested format. Michael Nygard proposed documenting architecture decisions as short, numbered records, each with the context, the decision and its consequences.

You’ll find templates and tools for it on the ADR community site. Those records were written for human teammates, and they turn out to be exactly what an assistant needs to stop reopening settled questions.

Once that exists, switching tools stops hurting. Your new assistant reads the same notes and starts from where the last one left off instead of from zero.

You can try a different model for a hard problem and come back without losing anything, because nothing important was ever stored inside the model in the first place.

Here’s a side effect you might not expect. Writing those notes forces you to say out loud how your project works, and half the time you discover you weren’t sure.

Your assistant gets better context, and you get a clearer head about your own code. New people on your team read the same file and get up to speed faster than any onboarding call would manage.

It takes discipline, though. Notes rot if nobody updates them, and stale notes are worse than none, because your assistant will follow them confidently into a wall.

Treat them like code. When a decision changes, the note changes in the same breath. When an assistant makes the same mistake twice, that mistake goes in the file.

What a first version looks like

Picture a small team with a web app and two developers who each prefer a different assistant. Their first notes file could be a single page.

It has a paragraph on what the app does and who uses it, and the commands for installing, running and testing. A short list of folders explains what lives in each.

Two or three decisions follow, such as why they chose one database over another. At the bottom sits a section called “don’t” that grows every time an assistant does something silly.

That page takes under an hour to write. From then on, either developer can open either tool and get an assistant that already knows the house rules.

Nobody has to re-explain the payment module, and nobody has to argue about which assistant is best.

None of this is clever, and that’s the appeal. You stop depending on whichever tool happens to be in fashion and start owning the part that compounds.

Models will keep changing under you. Your understanding of your own project shouldn’t reset every time they do.

It’s the same instinct I had to learn with no-code tools. Let the tool do what it’s good at, and stop expecting it to carry the parts that are really your job.

One thing to do this week

Open the project you use an assistant on most and create one notes file at its root. Write your build and test commands, a few lines on how the code is organized, and every mistake an assistant has made more than once.

Then point your assistant at it, using whichever file name it expects. Start your next session by asking it to summarize what it just read. If the summary is wrong, fix the file, not the chat.

Write it down where every tool can read it.