Skip to main content

Module execution

Module execution 

Source
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_ORCHESTRATOR_MAX_RETRIES
Default maximum retry attempts for orchestrator operations.
DEFAULT_ORCHESTRATOR_RETRY_INITIAL_DELAY_MS
Default initial delay between orchestrator retries (milliseconds).
DEFAULT_ORCHESTRATOR_RETRY_MAX_DELAY_SECS
Default maximum delay between orchestrator retries (seconds).
DEFAULT_ORCHESTRATOR_RETRY_MULTIPLIER
Default backoff multiplier for orchestrator retries.
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).
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.

Functions§

resolve_timeout
Resolve timeout with deterministic bounds (never returns 0 or unbounded) This pattern ensures execution always has a bounded duration.