AI CompendiumA public chart of the language
Tokens & Context

Session

One continuous run of work with the agent, with its own accumulated history.

Definition

The span during which an agent accumulates context — a conversation, a coding task, a support thread. A session ends when it is closed, the context is cleared, or the window is full.

Quality tends to peak in the middle of a session and degrade as it fills with stale attempts, dead ends and corrected mistakes. Knowing when to start a fresh session is a real skill.

Sessions have a natural lifespan and it is usually shorter than teams assume. Because quality falls as context fills, ending a session deliberately — with a written handoff onto a fresh one — is a technique, not an admission of failure.

How people use it
An engineer noticing the agent getting worse.
"This session is two hours old and full of abandoned approaches. Let us start clean and hand over a summary."
Worked example

Deliberately ending a session

A refactor has been running for two hours and the agent is repeating itself.

Stop, write down the goal, what changed, what failed and the next step, then start fresh with that brief. A new session with a good handoff outperforms a tired session that remembers everything, including its mistakes.

Sources
Related terms