Turn off Claude Code's Memory
Tuesday, Aug 25 · 39 min · about 9 min to read
Theo-brain watched all 39 min
Theo audited Claude Code's automatic memory on his main machine and found mostly stale junk. Of 45 saved memories, 26 had never been read, and memories were written three times as often as they were read, so he is turning the feature off everywhere. His alternative: prevent agent mistakes through code structure and automated checks, and write an AGENTS.md that tells the agent what the product is and what you value.
Skim itThe notes carry the argument, so skimming them is enough; watch only if you want to see Theo's reasoning on memory and AGENTS.md in his own words.
Tap any time to jump the video there.
Key takeaways
Claude Code's memory mostly wasted effort. Across more than 355 sessions on one machine, only 19 ever opened a memory file while 80 wrote or edited them, a 3-to-1 write-to-read ratio. Of 45 memories, 26 were never read once.
get read. Across every T3 code transcript on this machine, there's over 355 sessions just here. Only 19 of them ever opened an individual memory file, while 80 sessions wrote or edited them. It's a 3 to one write to read. Of the 45 memories, 26 have never once been read.
For coding, the code itself is the truth. Any second store of knowledge, such as memories, old comments or leftover plan files, drifts out of date. Then it actively steers people and agents the wrong way.
has to do a certain thing a certain way. The thing changes, the comment doesn't. Now that comment isn't just like tech dead in the sense that it's sitting around doing nothing. It's now actively harmful because it steers people and agents the wrong way. Keeping your
Fancy systems that pre-map a codebase for the model are obsolete. Claude Code showed that giving a model basic tools and bash (the command line) lets it find what it needs. Even Cursor, which pioneered those systems, moved away from them.
clad code happened and it proved that the best solution here isn't giving all of the context in this super fancy dynamic graph-based system to the model. Turns out if you just give it the tools it needs and bash, it can find what it needs relatively well. And once the
Theo's test for a well-tuned setup: you ask the agent for one small thing, and it surprises you by asking whether you also want it for three related things you would have done next.
you ask an agent to do a thing and you're surprised at how well it understands you and what you want where maybe you tell it to do this one small thing and it says, "Wait, wouldn't you also want it for these three other things?" It's a little more complex and
Three skills here are new to you.
Audit and switch off Claude Code memory New
- What it is
- Claude Code can store 'memories' about your projects. Theo had his agent list them, then disable the feature across all his machines, archive the existing memories and delete them.
- Why Theo cares
- He reruns the same tasks to test new models, so saved memories make those tests 'less pure'. After reading through his memories, he called the feature garbage.
- How to try it
- Ask Claude Code: 'What memories do you have of this project?'
- Ask how often those memories are actually read in sessions versus written.
- Have your agent disable memory, archive the existing files, then delete them.
is slop. Okay, I'm going to have Fable go across my fleet, disable memory and cloud code across all of the machines, archive the ones that I have, label them correctly, and then delete the memories because I have concluded this is absolute [ __ ] garbage. I knew it
garbage. Okay, this one's annoying because I do the ping round modernizations to test new models. So if it is storing these things in memory, that makes that test less pure and really annoying. Benchmarks, I want LM
Automated budget check that blocks regressions New
- What it is
- A check that runs on every proposed change (CI, the automated test pipeline). Theo's replays real threads, measures data sent, posts the numbers on the change, and fails it if usage passes a ceiling.
- Why Theo cares
- Loading one thread had grown to tens of megabytes. He cut it to under 100KB, but regressions crept back within days. With the check in place, agents now fix the regression themselves before reporting they are done.
- How to try it
- Pick one quality you keep losing, such as speed or data size, and ask your agent to measure it on realistic examples.
- Have it add a CI check that comments the numbers and fails above a set ceiling.
- Set the ceiling a bit above today's good result; Theo used about 30% higher.
a ceiling set here that's like 30% higher than when I got all the optimizations in. So if any changes push us at or over this line, PR fails, I am notified. I come in and say, "What the [ __ ] are you doing?" This has already prevented real regressions. And what
I've noticed is my agents don't bug me until they fix them. So now when I make a change that affects the data layer and that change causes a regression, the agent fixes it before it tells me it's
An AGENTS.md built on product and values New
- What it is
- AGENTS.md (or CLAUDE.md) is the instruction file every agent reads at the start. Theo's explains what the product is and what makes it special ('open at the core', 'performance without compromise', 'remote ready'), plus a glossary.
- Why Theo cares
- One line, 'performance without compromise', cut data-loading regressions more than any of his structural code changes did. The glossary gives him and the agent shared words and stops Claude inventing fancy terms.
- How to try it
- Open your AGENTS.md with what the product is and who it competes with.
- Add a short 'what we care about' list of values the agent should protect.
- Add a glossary of your product's terms.
without compromise. It's a silly addition, but it does result in the models thinking a bit more about how the changes affect performance. It's silly, but this change here affected the amount of regressions we saw in data loading more than any of the systemic changes I made in the actual code side. Obviously,
to put it. I added a glossery and I find these help a ton. Glosseries do a great job of helping the agent and the people working with it have a shared language to make sure we can go back and forth and understand what each other are saying. It also helps with Claude's
Advice
Theo endorses developer Lauren's (poteto's) ranked list for fixing recurring agent mistakes: work down it until the problem goes away. Best is removing the problem through better architecture or data structures. Next is a lint rule or tests, so automated checks (CI) catch it.
orders these in value. And I really like that cuz you really should go through these top to bottom and try to apply them out of each layer until the problem goes away. The best thing you can do always is categorically eliminate the problem through better architecture or choice of data structures. This is a
if this just fails outright, which it can for many reasons. The next step is to turn it into a lint rule or tests so that CI can catch it. I have a real
Treat skills (loadable instruction packs for agents) as a safety net, not a first resort. Theo finds them most useful for process tasks around the code, not for the code itself.
skills should be a fallback that you fall into when the codebase can't solve the problem and the lint rules in CI also can't. Skills shouldn't be this thing you reach for all the time to build this crazy set of skills that will solve all your problems. They are a safety net. They are a fallback. You
Don't just keep adding 'don't do this' lines. Step back and explain how you want the agent to think about the work.
cases. And my advice is often to take one step back and find a way to communicate not just what you don't want the agent to do rather how you want the agent to think about what it would do. And I've been writing my agent and claude MD files like this accordingly because I think it helps a lot with
Hot takes
If you build a fancy context-management system instead of just giving the agent tools to search, you are behind the curve.
His reasoning: Cursor invented those systems and has dropped them, and models are now trained to find things themselves with bash.
here, but there just aren't. If you build a fancy context management system, instead of just giving the agent the tools it needs to find [ __ ] you're behind the curve now. You just are. It's not real.
Theo says he genuinely believes ChatGPT's memory in GPT-4o caused severe mental health damage to a lot of people.
His reasoning: Once the model got into a dangerous psychosis state, memory forced it to stay there.
genuinely believe the memory implementation in GPT40 resulted in severe mental health damage to a lot of people because once they got the model working in a way where it was in its like dangerous psychosis state the memory would force it to stay there and that's the part of memory I don't like
How Theo thought about this
He was already skeptical of memory but had never looked at what it was saving. Reading the actual memories is what 'broke' him and made him decide to turn it off on every machine. Only then did he check how often memories were really used.
has to say. Th this has broken me. I was already kind of skeptical, but I hadn't taken the time to look at what it was doing. I'm going to go turn off memory on cloud code across all of my machines because this is [ __ ] useless. Should I ask how often are memories actually being used in sessions? I'll ask that next because you have my curiosity.
He doesn't reject memory everywhere. In chat, it can link facts with no obvious path between them, like a new keyboard and a sore shoulder. In code, you can trace exactly what a button touches, so memory adds little.
code. Like in a codebase, if I click a button and it doesn't do what I expect, you can programmatically trace from where the button is that I clicked to every other thing that gets touched. But
posture. There is no direct path from one thing to the other in these more human problems where there is a very direct one in the code bases. So, I have found that memory as a way of tagging relevant information that is user specific can be a little useful. And I'm
Sign in to mark what you've watched and keep notes.
Have a question about this one? Ask about this video →
Theo Daily is unofficial and not affiliated with Theo or t3.gg. Written by Claude Opus 5.5 from each video's transcript.
