Skip to main content

Module budgets

Module budgets 

Source
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_end hook 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 announces Idle (announce_idle).
EXTENSIONS_READY_TIMEOUT
EXTENSIONS_READY_TIMEOUT_SECS
SessionActor::create bound on EngineHost::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 (finish STEP 3).
SAVE_TIMEOUT
SAVE_TIMEOUT_SECS
SESSION_END_TIMEOUT_SECS
Worst case of SessionActor::finish: cancel a running turn, one bounded save, the on_session_end hooks, the observability flush.
TEARDOWN_TIMEOUT_SECS
UNPARK_TIMEOUT
UNPARK_TIMEOUT_SECS
SessionActor::unpark bound (B3): journal load + runtime rebuild. Transports wait ATTACH_TIMEOUT_PARKED (25 s) for a parked attach.