New here? Start this series at Part 1: Autonomy is a runtime decision, not a model decision
- Part 1: Autonomy is a runtime decision, not a model decision
- Part 2: Your tool registry is an access control list wearing a different name
- Part 3: Four kinds of agent state, and only one of them is memory
- Part 4: A retried agent job is a second chance to send the same email
- Part 5: The 3am agent run that nobody is watching
The first state store is always one table called sessions with a JSON blob in it. It works, right up until someone asks how long a customer's uploaded invoice is retained, and the honest answer is "the same as everything else, because it is all in the blob".
Agent systems store at least four distinct things. They are routinely treated as one because they arrive through the same code path.
What you are actually storing
| State type | Typical lifetime | Safe to reuse on resume? | Deletion driven by |
|---|---|---|---|
| Conversation state | The session | Yes, it is the transcript | User or session expiry |
| Task state | The run | Only the committed steps | Run completion plus a debug window |
| Durable memory | Indefinite | Yes, but re-verify facts | Explicit user action or policy |
| Artifacts | Longer than the run | Read yes, rewrite no | Workspace lifecycle plus retention rules |
Once the columns differ, the argument for a single ungoverned store disappears. A transcript that lives as long as a session and a customer document that must be purgeable within thirty days do not belong in the same bucket just because the same request created them.
Splitting them makes deletion harder. A request now has to reach every store under its own rule, so keep an index from each user and workspace to the records that hold their data. Without it, erasure turns into a search.
Resume is where the mixing hurts
A resumed run has to decide what it is allowed to trust.
A run that dies mid-flight and restarts will happily reload its cached plan, its earlier tool results and its intermediate reasoning. Some of that is still true. The plan probably is. A tool result captured ninety seconds before a timeout probably is not, because the world moved while the job was dead.
So mark state as durable or ephemeral at write time rather than deciding at read time. Committed steps and their idempotency keys survive a resume. Cached reads and half-finished intermediates get discarded and re-fetched. Getting this wrong makes no noise, because the run completes, the output looks plausible, and nobody realises it was computed against a stale snapshot.
Store artifacts with their provenance
Files, plans, generated reports and exported data outlive the run that produced them, which means someone will eventually hold one and need to know where it came from.
Store every artifact with the run ID that created it, the identity the run acted under, the workspace it belongs to, and the inputs it derived from. That is four fields, and they turn an unexplained file into something you can audit, attribute, expire or delete on request.
An artifact you cannot trace back to a run is a liability you are storing on purpose. Before the traffic arrives, decide for each state type how long it lives and who may reach it.
Terms in this piece
About this explainer
- Format
- Explainer
- Level
- Practitioner
- Read
- 2 min read
- Published
- Aug 3, 2026
- Disciplines
Short mental models: one idea, why it matters, what to do about it.
More on these topics
Deep dive · · 7 min read
Adding a second agent does not add intelligence, it adds a contract
Six posts on multi-agent systems, and the failures were never inside an agent. They were between two of them.
Explainer · · 2 min read
Shared agent memory is an access-control problem
Once agents share memory, the question is who may read and write what, and that is access control.
Explainer · · 2 min read
Agent memory is several stores, each with its own rules
Useful memory is separated, scoped and governed, not one database the agent writes everything into.
Discussion