session-lifecycle
Installation
SKILL.md
Session Lifecycle
A session is a durable conversation thread between user and agent. Manage it well and you avoid blown context windows, lost state, and confused users.
When to Use
- Designing multi-turn agent UX
- Debugging context-loss or context-overflow
- Choosing when to fork vs resume vs start fresh
- Setting retention policies for session storage
Session States
[idle] → [running] → [idle] # user sends → agent responds → waits
[idle] → [compacting] → [idle] # background context reduction
[idle] → [archived] # user/TTL-triggered