Session
Session
One continuous run of an agent, from start until it ends or is cleared
✓ Runtime & SessionWhat is a Session
A session is one continuous run of an agent: everything from the first message to the point it ends, pauses, or is explicitly cleared. Within a session, context accumulates, the system prompt, every user message, every tool call and its result, every reply the model gave. That accumulated history is what lets a session hold state and build on earlier turns.
A session is bounded by the size of its context window. As it grows, older material either stays, gets compacted into a shorter summary, or eventually has to be dropped to make room for new work. This is why long-running work often gets split into multiple sessions with a handoff between them, rather than one session running indefinitely.
A session is not the same as a single turn, a turn is one exchange within it. It is also not permanent: closing a session or starting a fresh one does not carry context forward automatically, unless something, a memory file, a handoff note, a resumed transcript, explicitly reconnects the two.
Most sessions do not end cleanly, they run until the context window forces a decision: compact, clear, or hand off to a fresh session with a summary carried forward.
Build your own agent skills, not just prompts.
We design, build, and ship the Claude Code skill libraries production teams actually run on.
Talk to AY Automate ↗