Stateful
Something that carries information forward — the app, usually, not the model.
A system that preserves information across interactions. Chat applications are stateful because they store and replay the conversation; the underlying model is not.
Some hosted APIs now offer server-side conversation state, but conceptually the state still lives outside the weights. The model itself never updates from your usage.
The distinction to hold on to: statefulness belongs to the application and the harness, not to the model. Products that feel like they remember you are doing it by storing history and replaying it — and the quality of the illusion depends entirely on how well they edit that history.
Sessions as recoverable state
A long-running agent must survive a restart without losing its place.
Keep the session log durable and external so the model and harness can be replaced underneath it. That separation is what lets work resume after a crash instead of restarting from the original prompt.
- blogScaling managed agents: decoupling the brain from the hands ↗
Separates model, harness, durable session log and execution sandbox — the architecture that makes long-running agents survive crashes and tool boundaries.
- docsAgents ↗
Compares a managed hosted agent, an in-app SDK loop, and the raw Responses API, including sessions, handoffs, approvals, sandboxing and compaction.
Stateless
The model remembers nothing between requests.
Session
One continuous run of work with the agent, with its own accumulated history.
Memory System
Storage that gives an assistant continuity across sessions.
Context
Everything the model can currently see.