Expand description
Execution boundary constants (inspired by OpenAI Codex agent loop patterns)
Constants§
- DEFAULT_
AUTH_ FLOW_ TIMEOUT_ SECS - Default OAuth / auth-flow timeout in seconds.
- DEFAULT_
MAX_ OPEN_ CIRCUITS - Maximum number of simultaneously open tool circuit breakers before the agent pauses.
- DEFAULT_
MAX_ RECENT_ ERRORS - Maximum recent error records kept per agent session for recovery diagnostics.
- DEFAULT_
TIMEOUT_ SECS - Default timeout for agent loop execution (10 minutes) Used when no timeout is specified or when 0 is passed
- DEFAULT_
TOOL_ TIMEOUT_ SECS - Default tool execution ceiling in seconds (matches TimeoutsConfig::default_ceiling_seconds).
- IDLE_
TURN_ LIMIT - Maximum number of consecutive idle turns before the agent runner aborts.
- LOOP_
THROTTLE_ BASE_ MS - Base throttle delay (ms) for the agent runner loop between repeated identical tool calls.
- LOOP_
THROTTLE_ MAX_ MS - Maximum throttle delay (ms) ceiling applied to both the runner loop and the registry facade.
- LOOP_
THROTTLE_ REGISTRY_ BASE_ MS - Base throttle delay (ms) for repeated calls inside the tool registry execution facade.
- MAX_
RATE_ LIMIT_ WAIT_ SECS - Maximum wait in seconds when a tool is rate-limited before surfacing an error.
- MAX_
TIMEOUT_ SECS - Maximum allowed timeout (1 hour) Any user-specified timeout above this is capped
- MIN_
TIMEOUT_ SECS - Minimum timeout (10 seconds) Prevents unreasonably short timeouts that would cause failures
Functions§
- resolve_
timeout - Resolve timeout with deterministic bounds (never returns 0 or unbounded) This pattern ensures execution always has a bounded duration.