memcell

docsguidesforgetting

Why does my coding agent forget everything between sessions?

Because a model call is stateless. Everything the agent "knows" rides inside the context window of the current session; when the session ends, that context is gone. Nothing is saved unless something outside the model saves it — and in a stock setup, nothing does.

what is actually happening there was never anywhere for the knowledge to be

An LLM has two kinds of knowledge: weights, frozen at training, and context, assembled per session. Your project's decisions live only in the second. Close the terminal and the model does not "forget" — the knowledge had no home. The next session reconstructs understanding from whatever files it happens to read, which is why it re-asks questions you answered yesterday and re-proposes designs you already rejected.

why "just ask it to remember" fails memory that depends on cooperation is not memory

Asking the model to maintain its own notes makes memory depend on the model's attention, every turn, forever. In practice models route around instructions: they summarize when you wanted verbatim decisions, skip saving when the turn ran long, and write notes the next session never reads. In a week of live sessions where the model actively routed "remember" to its own note files, deterministic turn-end capture still filed every durable decision — the lifecycle carried what cooperation dropped.

what a real fix has to do four properties, none optional

capture at turn endfrom the session's own record, deterministically — not requested from the model
distill, don't transcribeatomic claims with provenance — a future session recalls one decision, not a wall
serve at session startranked and floored, before the first line is written
move confidence with outcomeswrong memory falls out of service instead of being repeated

That is the loop memcell runs on hooks — recall before the turn, remember after it, report when outcomes land:

npx memcell connect