Blog / · 2 min

Why AI agents lose context between sessions, and what to do about it

By Archilas

Illustration of a broken timeline between two agent sessions with context falling into a gap

AI agents lose context between sessions because each run usually starts with a fresh prompt window. Unless you deliberately persist structured memory outside that window, and reload it on the next run, the agent cannot reliably remember decisions, constraints, or unfinished work from yesterday.

Watch an agent work for an afternoon and it can look almost continuous: plans, tool calls, corrections, a partial implementation left mid-flight. Close the session and open a new one, and that continuity often vanishes. The agent asks questions you already answered. It reopens decisions you already closed.

The prompt window is not a mind

Large language models are powerful within a context window. That window is still a temporary buffer. When the session ends, the buffer is gone unless something else saved the important parts in a form the next session can use.

Chat transcripts help, but they are a weak memory format. They are long, noisy, and ordered by conversation rather than by what is still true. Agents that “read the last thread” are doing damage control, not maintaining state.

What actually needs to persist

  • Stable preferences and working constraints.
  • Decisions and the reasons that still apply.
  • Open loops: unfinished tasks, blockers, promises.
  • Entity-level facts that other facts depend on.

Those items need a home outside the chat log: something durable, queryable, and small enough to reload without drowning the next prompt.

A practical response

Treat memory as infrastructure, not as a side effect of logging. Compress what matters. Keep conflicts visible instead of silently overwriting. Reload memory at the start of work the same way you would mount a volume before running a job.

That is the problem Archilas focuses on: a persistent memory layer that agents and everyday AI tools can draw on between sessions, so continuity is designed rather than accidental.

All posts