← All posts

Agent Memory Products Remember Your Conversation. Nobody Is Remembering Your Codebase

Every memory tool shipped this year stores what you said. Measured sessions of Claude Code auto compaction reduced 132,000 tokens of accumulated state to roughly 2,300, a 98% reduction, and what survives is the transcript rather than the understanding. Multiply that by 40 engineers separately paying a model to work out what the same billing service does, and the cost of not writing the answer down becomes visible.

Agent Memory Products Remember Your Conversation. Nobody Is Remembering Your Codebase

Agent Memory Products Remember Your Conversation. Nobody Is Remembering Your Codebase

There is a whole category of tools now for agent memory. Session persistence, procedural memory, searchable prior work, reconstructable decisions, preserved handoff context. The framing that keeps appearing is that commits, pull requests and CI logs are engineering’s paper trail while agent sessions get thrown away, and that does seem obviously wasteful.

It is a real problem and the tools help. What almost all of them store is the conversation, meaning what you asked, what the agent replied, and what got decided.

The expensive thing that gets destroyed is a different thing, and the two are worth separating carefully.

What actually gets thrown away

Watch what happens inside a session. The agent reads a file, forms a hypothesis about what it does, searches to check it, reads three more files, revises, and eventually arrives at a working understanding of how this part of your system fits together. Then it does the task.

The task output gets committed. The understanding itself evaporates.

The compaction numbers make the scale of it visible. Measured sessions of Claude Code’s native auto compaction reduced 132,000 tokens of accumulated message state to roughly 2,300 tokens, a 98% reduction. The summary that survives necessarily loses most of the nuanced reasoning, architectural understanding and convention knowledge built up over that session. The next session then starts from nothing and pays to build all of it again.

That is the cost the bill never itemises. The token count after compaction is tiny, which makes the whole operation look like a saving. What was destroyed was hours of reasoning about your system, and somebody buys it again tomorrow morning when they open the next session.

Now multiply that by 40 engineers. Every one of them is separately paying a model to work out what the same billing service does, several times a week, and none of those answers is written down anywhere.

Why storing the conversation does not recover it

A memory layer that stores your session gives you back what was said. It does not give you back what was learned about the code, for three reasons.

The reasoning itself was always implicit. The agent never wrote down that the definition of an active subscription lives in the billing package rather than the API layer. It used that fact and moved on, so the fact is not in the transcript in any retrievable form.

It is scoped to one person’s session. Your memory of the payments service does nothing for the engineer in another team who asks the same question next Tuesday, and there is no mechanism by which it would.

It is not checked against the code. A stored decision from March stays stored after the code changes in June, and nothing announces the drift. This is the CLAUDE.md problem wearing a different hat, and it is the reason machine generated context files measured as roughly net negative in the ETH Zurich evaluation, lowering success rates and raising costs by about 20%.

The decay is measurable inside a single session as well. A 2026 study across 4,416 trials at six conversation depths found compliance with an agent’s own explicit constraints falling from 73% at turn 5 to 33% at turn 16 with no memory mitigation applied. Adherence to a loaded context file follows the same shape, running above 95% in the first two messages and landing between 50% and 60% by message ten.

The memory that should be shared and durable

ByteBell is a verification layer generated on top of a codebase of any size below 10 million files, and the right way to think about it is as memory of the code rather than memory of the conversation.

Cheap open source models read every file once at indexing time. An agent detects the boundaries of each language element, stores them separately, then analyses each one in the context of its file, its module, its repository and across every repository. For each file the layer stores what it does, why it exists in business terms, what users lose if it fails, the capabilities it provides, its edge cases, the contracts it provides, its preconditions, and the specific places where the behaviour is genuinely undecided. All of it in plain English with the file and the line kept on every claim.

Three properties follow, and they are precisely the three that session memory does not have.

It is organisational rather than personal. One index, so every engineer and every tool gets the same answer to the same question on the same commit. A review decision does not depend on whose session happened to contain the relevant context.

It cannot drift silently. The index re-derives on every commit and only what changed gets recomputed, so an answer reflects the branch as it stands rather than a decision somebody stored in March.

It is checkable. Every claim carries the file and the line it came from, so a statement you doubt takes about 10 seconds to confirm rather than an act of trust. A conversational memory offers no equivalent.

Retrieved rather than resident

The other difference is where it sits. A memory layer that loads into context at session start competes for the same budget it was meant to save, and files past a couple of hundred lines both consume more context and reduce adherence.

The verification layer is served over MCP, so an agent pulls the slice it needs at the moment it needs it. The same index feeds Cursor, Claude Code, Windsurf and the extension with no re-indexing per tool and no per session warmup.

A slice comes back as a dozen facts with a file and a line attached rather than as coherent prose about the codebase, and that shape appears to matter. Chroma found structural coherence consistently hurting retrieval across all 18 models tested, with the leading explanation being that flowing prose produces more plausible seeming distractors. The effect was slight though consistent, and the experiment ran on essays rather than source code, so it is worth treating as a supporting argument rather than as proof.

Then it does something memory cannot

Storing what your code means makes verification possible, and that is the step no memory product performs.

Because the layer holds what each file promised, a change can be compared against that promise. We trace what a change touches, generate tests for it, run them, then review each modified file against its indexed base rather than against what the diff claims it changed. Collateral damage is checked across the other repositories reading the same helper before anyone approves. A full pass came to 87,001 tokens at $0.11.

The economics of reading once

Indexing runs about 13per1,000files,once,withonlywhatchangesrederivedoneachcommit.Onatracedrun,tracingachangeendtoendacross32impactedfilesin4repositoriestook4minutes9secondsandcost13 per 1,000 files, once, with only what changes re-derived on each commit. On a traced run, tracing a change end to end across 32 impacted files in 4 repositories took 4 minutes 9 seconds and cost0.89, against roughly $30 for the same work by brute force.

Accuracy of code holds above 93% while token spend drops by roughly 80%. Those move together because a model reading pre-established meaning never runs the chain of dependent inferences that establishes it, and that chain is where both the cost and the errors accumulate.

Where session memory is still the right tool

Preferences, working style, the thread of a long piece of work, what you decided about a design last Thursday and why. None of that is derivable from the code, and all of it is worth persisting. The two are complementary rather than competing, and a setup holding both is better than either alone.

The point is only that they store different things, and the one nobody is storing is the expensive one.

The honest limitation

Persistence is not the same as currency. The index re-derives on every commit, which is fast, and there is still a window after a push where a claim can lag the branch. If your workflow depends on sub second freshness during active editing, test that specific behaviour rather than taking our word for it.

A derived layer can also be wrong about what code means in ways a parser cannot, which is why every claim carries a file and a line. We also do not cover every language, and Mojo is not indexed today.

This is what ByteBell builds

The arithmetic worth doing is simple. Count how many engineers on your team have separately asked a model to explain the same service in the last month, then multiply by what each of those sessions cost. That number is the price of not writing the answer down anywhere.

ByteBell is the verifiable context layer for code. We run the LLM compiler pattern, a one time pass where a model reads every file and lowers it into a verifiable code IR capturing purpose, business context and cross repository relationships, on your own infrastructure through Docker, with your source never leaving your environment. Every engineer, on any copilot, queries the same representation through a single MCP url, and every agent edit is checked against it before it lands, using per file SHA-256 diffing so only what actually changed gets examined again. Across 46 Kubernetes ecosystem repositories and 150,000 files we measured roughly 10% higher accuracy at 70% lower cost, on about a fifth of the tokens.

www.bytebell.ai

All posts