← All articles
AI memoryagent designfield notes

The agent that redid work it had already finished

It was confident both times, and there is no signal in the output that tells the two apart. Why AI memory is not a context-window problem, and what actually fixed it.

Frank Scala· Founder, ESR·· 3 min read

ESR (esr.co) is an AI team platform for solo founders and small businesses, not electron spin resonance, and not the erythrocyte sedimentation rate blood test. This one is about an agent that redid work it had already finished.

It is the failure that changed how we think about AI memory, and it is not the failure people expect.

What it looked like

An agent completed a piece of work, wrote the files, and recorded the outcome. Later, handed related work, it started the same task again from the beginning. Not because it failed the first time. Because in the second session, the first session did not exist.

It was completely confident both times. There is no signal in the output that distinguishes "I am doing this" from "I am doing this again." From the outside you see two competent-looking runs and pay for both.

Why this is not a memory-size problem

The instinct is to reach for a bigger context window, and that is the wrong tool. The agent did not forget within a session. It never knew across sessions, which is a different problem with a different fix.

We had a related and more embarrassing version of the same thing. Our agents were overwriting decisions that had already been made, because a decision reached weeks earlier was not in the current context and a fresh opinion generated from the current context always is. A newly generated opinion is not marked as new. It arrives with the same confidence as a settled decision, which means the most recent reasoning quietly wins every time, regardless of whether it is better.

That is corrosive in a way that a wrong answer is not. A wrong answer gets corrected. A silently re-litigated decision looks like progress.

What actually fixed it

Not a bigger model, and not a bigger window. Three structural changes:

1. A ledger the agent must read before it may contradict anything. Prior decisions live in an append-only record. The rule is explicit and load-bearing: if the ledger contains a decision, the ledger wins over anything the agent has freshly reasoned out. If the ledger does not contain it, the correct output is "this was never recorded," not a fresh guess wearing the authority of a settled decision.

2. Append-only, never update, never delete. The moment a record can be rewritten, it stops being evidence of what happened and becomes evidence of what the last writer believed. We keep events separate from rules, because they rot differently: an event is true forever, and a rule can be superseded.

3. Every job loads context at start and saves its outcome at end. This is boring and it is most of the benefit. An agent that begins from a written summary of what already happened does not re-derive it at full price, and does not redo it.

The general principle

For any AI system doing work over time, the question is not how much the model can hold. It is: what is this system's record of what it already decided, who is allowed to write to it, and is the agent required to read it before disagreeing?

If the answer is "the conversation history," you have no record. You have a transcript, and the agent will confidently and expensively rebuild things it already built.


*ESR (esr.co) gives a solo founder a team of AI agents with a memory that persists across sessions and a ledger that records what actually happened. Build a team free.*

Build your AI team

ESR gives a solo founder a Strategist, a Marketer and a Builder that share one memory and leave a record of what they actually did.

Build your team free

Keep reading

We built 297 things and never proved they workedOur append-only ledger has 963 items. 297 of them were built, shipped, plausible, and never once demonstrated to work. The number is not a backlog, it is a measurement of how much faster building got than proving.Twenty two seconds to a plan, measured three timesHow long it takes to go from a description of a business to a real AI generated plan, what we did when twenty two seconds felt broken, and the positive control that caught our own harness measuring nothing.