What a Session Is
AnAgentSession is the live governance boundary. It binds an Agent (what kind of worker) to a Task (what work) through a Harness (how it runs).
The session is the unit of accountability. “Who did this?” is always answerable with a session UID.
Lifecycle Phases
| Phase | Meaning |
|---|---|
| Pending | Durable session exists; live process not started |
| Initializing | Process spawning, initial artifacts loading |
| Active | Live work being performed |
| Completed | Finished cleanly, outputs produced |
| Failed | Attempted the work, didn’t achieve the result |
| Declined | Agent legitimately refused (with structured reason) |
| Revoked | Externally stopped (governance, parent, timeout) |
| Error | Infrastructure failure prevented execution |
Declined is Not Failure
An agent that declines is performing its governance function. Decline reasons flow back to the orchestrator as structured data:insufficient_context— workflow may route back to researchauthority_insufficient— escalation to parentethical_objection— escalation to humanneeds_decomposition— orchestrator re-plansscope_mismatch— orchestrator reassigns
The Reflect Step
After completing (or failing, or declining), the agent assesses:- What went right and wrong at the task level
- Whether the decomposition was correct
- Whether the orchestration could improve
- What the system should learn from this session