Stateful
Carries information forward. Sessions are stateful across turns; agents can be made stateful across sessions.
Stateful means carrying information forward. A session is stateful across turns: the context accumulates as the session runs, which is why long sessions drift into the dumb zone. An agent can be made stateful across sessions by adding a memory system that persists information into the environment and reloads it at the start of future sessions. The model is never stateful, and any apparent continuity is the harness re-feeding context.
Where the state lives at each layer:
The model is never stateful, because its parameters are frozen and it sees only what is in each request. The session is stateful across turns, because the harness appends every message and tool result to the context. The harness is stateful across sessions, through memory files, AGENTS.md, and handoff artifacts that are written down and reloaded later. The environment is always stateful, because files persist whether or not a session is running.
Each layer's statefulness is built by re-reading something stored a layer below. The session feels continuous because the harness re-sends the history to the stateless model, and the agent remembers across sessions because the harness re-loads files from the environment. No state is ever stored in the model itself.
State is not always wanted. Everything carried forward influences what comes next, so a wrong assumption made early in a session is carried forward too. Clearing is the deliberate act of throwing session state away and starting from what is written down.
Related terms
Stateless
Carries no information forward. The model is stateless across requests; an agent is stateless across sessions by default.
Memory System
A system that makes an agent stateful across sessions by persisting to the environment and reloading at session start.
Session
One bounded run of work with an agent, from the first message to the end.
Context
The relevant information the agent has access to right now. A measure of quality, not quantity.
Clearing
Ending the current session and starting a fresh one. The next message begins with an empty context.
Want this working inside your team?
It starts with one conversation about your workflow.