Expand description
Teardown budgets shared by every session host (values copied from
agent-tui/src/tui/signals.rs; signals.rs re-exports these on day 2).
SAVE_TIMEOUT_SECS— session save + index end record (data safety first)HOOKS_TIMEOUT_SECS—on_session_endhook emit (concurrent, fail-open)TEARDOWN_TIMEOUT_SECS= their sum.
Constants§
- CANCEL_
DRAIN_ TIMEOUT - CANCEL_
DRAIN_ TIMEOUT_ MS SessionActor::cancel_turn: how long a cancelled turn’s stream is drained for the engine’s cancel-path history, final Usage and any in-flight context-head checkpoint. The engine’s provider/tool awaits are cancellation-first, so the tail normally arrives in milliseconds; on expiry the actor keeps its last adopted (valid) history. Also the grace a driver-revoked turn gets (revoked_turn_deadline).- CANCEL_
DRAIN_ TIMEOUT_ SECS - Whole-second ceiling of the drain, for the budget sums below/elsewhere.
- CANCEL_
TURN_ TIMEOUT_ SECS - Worst case of
cancel_turn: the drain, then the bounded wait for the interrupted turn’s save before it announcesIdle(announce_idle). - EXTENSIONS_
READY_ TIMEOUT - EXTENSIONS_
READY_ TIMEOUT_ SECS SessionActor::createbound onEngineHost::extensions_ready(): the loader guard should make this unreachable; it exists so a session can never hang on a loader that never reports (warns, then proceeds).- HOOKS_
TIMEOUT - HOOKS_
TIMEOUT_ SECS - OBSERVABILITY_
FLUSH_ TIMEOUT_ SECS - Session end’s bounded observability flush (
finishSTEP 3). - RELOAD_
ABORT_ SEND_ SECS - Delivering
ReloadAbortedto a session whose command queue is full. - RELOAD_
ANNOUNCE_ WAIT_ SECS - Other connections’
Bye{Reloading}writers, after the announce. - RELOAD_
BYE_ FLUSH_ SECS - The requesting connection flushes its own
Byebefore the exec. - RELOAD_
CHECKPOINT_ BUDGET_ SECS - Per-session
Checkpoint{Reload}wait:cancel_turn(the drain + its bounded save) + stopping the session’s workers + the checkpoint’s own bounded save + 1 s margin. Sessions checkpoint concurrently. - RELOAD_
EXT_ REDISCOVERY_ SECS - A failed exec re-discovers the extensions before the sessions resume.
- RELOAD_
EXT_ SHUTDOWN_ SECS - Extension sidecars shut down for the exec.
- RELOAD_
FENCE_ TIMEOUT - RELOAD_
FENCE_ TIMEOUT_ SECS - Longest a reload checkpoint fences its session (no queue-wake turns,
keep-warm pings, driver ticks or parking) waiting for the
execvor for the daemon to report it failed (ReloadAborted). Both normally come within seconds; this only bounds a reload that never reports back (a daemon bug: clients cannot send a reload checkpoint). - RELOAD_
FENCE_ WORST_ CASE_ SECS - Longest a session stays fenced before its process is replaced or it is told the exec failed: the slowest other session’s checkpoint, the announce, the flush, the sidecar shutdown, then (failed exec) the re-discovery and the abort delivery.
- SAVE_
TIMEOUT - SAVE_
TIMEOUT_ SECS - SESSION_
END_ TIMEOUT_ SECS - Worst case of
SessionActor::finish: cancel a running turn, one bounded save, theon_session_endhooks, the observability flush. - TEARDOWN_
TIMEOUT_ SECS - UNPARK_
TIMEOUT - UNPARK_
TIMEOUT_ SECS SessionActor::unparkbound (B3): journal load + runtime rebuild. Transports waitATTACH_TIMEOUT_PARKED(25 s) for a parked attach.- WORKER_
RELOAD_ STOP_ TIMEOUT - WORKER_
RELOAD_ STOP_ TIMEOUT_ SECS SessionActor::checkpointfor a daemon reload: how long the workers it stopped get to finish stopping (cancel → the runtime’s cancel-path history → the finalizer’s resume archive) before the exec destroys them. Cancellation is cooperative and normally takes milliseconds; a worker blocked in a tool that ignores cancellation is abandoned with whatever archive it already had.