Context

Session

Also called: conversation, thread

A session is one continuous conversation with an agent that accumulates history in the context window. Resetting or ending it clears that history and starts the agent from a blank slate.

James Phoenix
Understanding Data Updated July 2, 2026

A session is one continuous conversation with an agent, from the first message until you end it or reset. Everything that happens inside it (your instructions, the model's replies, the files it read, the commands it ran) piles up in the same context window and travels along with every request. That accumulating history is what lets the agent remember a decision you made ten turns ago without you repeating it.

The session holds the memory, not the model

The model itself is stateless. It forgets everything the moment a request finishes. The sense of continuity you feel comes entirely from the session replaying the whole conversation back to the model each time. End the session and that history is gone, and the next one starts fresh. This is why "just start a new chat" fixes a confused agent: you are throwing away the accumulated context, not resetting some hidden internal state.

Why session length matters

A session is a mixed blessing:

  • Longer sessions carry more shared understanding. The agent has seen your codebase, your preferences, and your earlier corrections.
  • Longer sessions also fill the window. Old, finished work crowds out room for the task in front of you and can start to distract the model.

The skill is knowing when a session has earned its keep and when it has turned into noise. Once a conversation has drifted across three unrelated tasks, a fresh session is usually cleaner than steering the cluttered one.

Tip
Treat one session as one coherent piece of work. When you switch to something unrelated, start fresh rather than dragging the old context along for the ride.

Related terms

Building with AI agents?

This dictionary is part of how I think about agentic engineering. If you want the same thinking applied to your codebase, that is what I do.

See how I can help