Your AI agent isn’t forgetful. It’s checkpointed wrong.
A “fix” for the forgetting was quietly costing about $8,800 a month — nobody had checked.

A “fix” for the forgetting was quietly costing about $8,800 a month — nobody had checked.
Cold open
Dana got the Slack message at 9:50am, forwarded from the support lead with three exclamation points at the end.
#support-eng “customer escalation — the bot handled her billing dispute PERFECTLY on Tuesday, recalled the refund exception and everything. she came back today to follow up and it asked her to explain the whole thing from scratch. didn’t we ship memory for this in October???”
They had shipped memory in October. That was the part that didn’t make sense yet.
The instinct that was wrong
Her first guess was a bad deploy. Something between Tuesday and today must have broken the context-loading code — that’s usually how this kind of bug shows up, a small change that slips past review. She checked the deploy log. Nothing in it touched memory, retrieval, or the system prompt.
Her second guess was the model. Long conversations can sometimes trip up a model’s recall, so she checked for a version change or a routing update that might explain it. Nothing there either.
Then she asked a simpler question: had the bot even seen Tuesday’s conversation? Not “did it forget” — had it ever seen it in the first place?
It hadn’t. That changed everything. This wasn’t a model problem. It was a question of where October’s memory fix had actually put the data.
What was actually broken
LangGraph splits memory into two pieces, and most teams don’t realize this the first time they wire it up. A checkpointer saves a thread’s state. It’s short-term memory, scoped to one thread: it keeps a conversation going, lets you resume after an interruption, and survives a crash. A store is different. It saves data outside the graph entirely, so any thread can read it — even one that doesn’t exist yet. Most production agents need both. October’s fix only built one of them.
Tuesday’s conversation lived in thread support-8841. Inside that thread, the bot’s memory really was good — the refund exception, the plan tier, the whole back-and-forth, checkpointed and recalled correctly every turn. Today’s conversation opened in a new thread, support-9002, the way the support widget always starts a fresh session. A checkpointer doesn’t cross that boundary. It was never built to. Whatever the team wrote into Tuesday’s graph state was still sitting inside support-8841 — and support-9002 had no way to find it.
Nobody had built the other half: a store, keyed to the customer instead of the conversation, read at the start of every new thread. The fix turned out to be almost embarrassingly small — write the few facts worth keeping (refund exceptions granted, plan tier, past resolutions) to a store keyed by customer ID, and read it back before the bot’s first reply. One write, one read. The bug was never a missing feature. It was one quiet assumption: the team built something “stateful” and assumed that meant it would “remember.”
The other bug hiding behind this one
That would’ve been a tidy post on its own. But it’s not the whole story. While Dana was tracing the thread_id mismatch, she checked the team’s Bedrock usage out of habit and found something unrelated to Tuesday’s customer: input tokens on the support bot had nearly tripled since August, with no matching rise in conversation volume.
It turned out another engineer had hit a smaller version of the same problem back in August, and fixed it the wrong way. Some long support cases — dozens of messages back and forth in one sitting — seemed to “lose the thread” partway through. The bot would stop referencing something said forty messages earlier. Instead of touching the checkpointer, his fix was to pull the whole conversation log from the database on every call and stuff it back into the prompt, so nothing could slip away again. It worked: the bot stopped losing track of long cases. But now every call carried the full transcript of that case so far — and that transcript only ever grew.
The math nobody had done
Nobody had priced out what “everything, every time” actually costs as a case runs long. So she did the math herself.
Say one turn — a customer message, a tool call, the model’s own reasoning — runs about 500 tokens on average. That’s a working guess, not a measurement, and it’ll vary case to case. The result doesn’t depend on getting it exact. If you resend the full transcript every step, your input tokens at step N aren’t N × 500. They’re the sum of every step before it, because each new call carries all the old ones too: 500 × (1 + 2 + 3 + … + N), or 500 × N(N+1) ÷ 2. That’s quadratic growth. A case that runs twice as long doesn’t cost twice as much — it costs about four times as much.
The fix isn’t complicated. Keep a rolling window of the last couple of turns in the prompt, and pull anything older from the store only when you need it. That holds input tokens at a steady 1,000 tokens a step — about two recent turns’ worth — no matter how long the case runs. Linear, not quadratic.
Run both out to a 50-step case — a realistic length for one of the long disputes that triggered the August fix — at Claude Sonnet 4.6’s on-demand Bedrock rate of $3 per million input tokens:
- Full resend: 500 × 50 × 51 ÷ 2 = 637,500 input tokens ≈ $1.91 for that one case
- Rolling window + store: 1,000 × 50 = 50,000 input tokens ≈ $0.15 for that one case
A dollar ninety won’t show up in any postmortem. What matters is the shape: the two curves cross at step three, not step forty. This isn’t a long-tail problem that only hits unusually long cases. It starts almost right away, and it keeps compounding for as long as the case runs.
Now scale it to the team’s real case volume — say 5,000 of these multi-step cases a month, each about 50 turns long — and the gap stops being a rounding error:
- Full resend, 5,000 cases/month: ≈ $9,560/month in input tokens alone
- Rolling window + store, 5,000 cases/month: ≈ $750/month
Call it an $8,800-a-month bill for a fix that didn’t even solve the real problem. Tuesday’s customer still hit a blank slate on Thursday, because August’s fix never touched the cross-thread gap. It just made one thread more expensive to run.
Three shapes of the same problem
After finding two bugs that looked like one, the easy instinct is to think the team just needs to “do persistence properly” everywhere. That’s too simple. The right fix depends on the shape of the task.
A short, single-session task. A one-off question, a quick lookup, a conversation that’s done before the customer closes the tab. A checkpointer alone is right here. There’s no thread boundary to cross, because there’s only ever one thread. Adding a store would just be extra overhead.
A long single-session task. The August case — one thread, but dozens of turns long. The checkpointer is doing its job; the conversation really is being saved. The problem isn’t missing persistence. It’s stuffing all of it into every call instead of trimming it down. The fix is a rolling window, and if the bot needs to recall something from much earlier in that same thread, a short summary — not a new checkpointer, just less force-fed into every prompt.
A task that spans sessions. Tuesday to Thursday. This is the only one of the three that actually needs a store, because it’s the only one where the information has to outlive the thread it was created in. No amount of clever windowing inside one thread fixes this. The data has to live somewhere a brand-new thread can find it.
Three different shapes, three different fixes — and the team had spent real engineering time solving the wrong one twice before landing on the right one.
What the bug had actually been hiding
The mistake wasn’t that nobody thought about memory. They thought about it twice, and shipped something both times. The real mistake was treating “the agent has persistence” like one checkbox, instead of two separate questions: forgetting within a session, which is usually a windowing problem, and forgetting across sessions, which is the only one that actually needs a store. A framework that calls itself “stateful” just tells you state exists somewhere. It doesn’t tell you which kind, where, or whether anyone’s built the part that answers what your users will actually ask.
The decision guide that came out of it
Use a checkpointer alone when:
- The task happens entirely in one thread and ends when the thread does
- You need crash-resume or human-in-the-loop pauses within that one session
- Nothing needs to be remembered once the conversation is over
Add a store when:
- Any fact needs to outlive the thread it was created in — preferences, past resolutions, account-specific exceptions
- Users come back through a new thread (a new tab, a new day, a new device) and should still be recognized
- You catch yourself building a workaround that re-fetches “everything about this user” from your own database on every call — that workaround is a store, just without the namespacing and lookup discipline that makes it cheap
Don’t fix forgetting by resending more. If a single thread is losing context, the fix is almost always windowing and selective recall — not handing the model an ever-growing transcript. Run the cost math above with your own numbers before assuming the gap doesn’t matter for your workload. The curve is the point, not the exact dollar figure.