Get an agent session
Returns one session and the status of its most recent run.
More details
More details
Headers
Accepted for client uniformity but IGNORED on this endpoint. It has no side effects, and a retry can legitimately return different results, so replaying a cached response would hand back stale data. Every request executes fresh: no 24h window, no replay, no Idempotent-Replayed header, and no key-reuse 422.
Response
The session.
Status of this session's most recent run, or null if it has never run.
QUEUED and RUNNING mean a turn is in flight — asking again is a 409. COMPLETED, FAILED, STOPPED and STALE all mean the session is free. STALE is assigned on read when a run stopped reporting past its threshold, which is how a session recovers from a worker that died without sending a terminal event.
QUEUED, RUNNING, COMPLETED, FAILED, STOPPED, STALE "COMPLETED"