Skip to main content

What a Session Is

An AgentSession 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

Pending → Initializing → Active → Completed / Failed / Declined / Revoked / Error
PhaseMeaning
PendingDurable session exists; live process not started
InitializingProcess spawning, initial artifacts loading
ActiveLive work being performed
CompletedFinished cleanly, outputs produced
FailedAttempted the work, didn’t achieve the result
DeclinedAgent legitimately refused (with structured reason)
RevokedExternally stopped (governance, parent, timeout)
ErrorInfrastructure 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 research
  • authority_insufficient — escalation to parent
  • ethical_objection — escalation to human
  • needs_decomposition — orchestrator re-plans
  • scope_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
Reflect is mandatory. The session cannot reach a terminal state without producing a reflect artifact.