Skip to main content

Module tool_limits

Module tool_limits 

Source
Expand description

Shared execution-loop budgets and planning safety bounds.

Constants§

APPROVED_PLAN_MIN_TOOL_CALLS_PER_TURN
Minimum per-turn tool-call budget for executing an approved plan.
APPROVED_PLAN_TOOL_LOOP_INCREMENT
One-time internal allowance applied when an approved plan enters execution. This is not a user-facing configuration field and remains bounded by the ordinary tool-loop hard cap.
DEFAULT_FULL_AUTO_MAX_TURNS
Default maximum number of turns in full-auto execution.
DEFAULT_MAX_CONVERSATION_TURNS
Default conversation-turn retention limit. This is a context-retention limit, not a tool-execution budget.
DEFAULT_MAX_TOOL_CALLS_PER_TURN
Default maximum number of tool calls in one agent turn.
DEFAULT_MAX_TOOL_LOOPS
Default maximum number of tool-loop iterations in one agent turn.
DEFAULT_SAFETY_MAX_TOOL_CALLS_PER_SESSION
Default safety-gateway session fuse when no run-specific budget is loaded.
MAX_CONTROL_PLANE_TOOL_CALLS_PER_TURN
Per-turn cap on budget-exempt control-plane exec calls (blocking wait and bounded inspect of running sessions or spooled output).
MAX_SESSION_AUTO_GRANT_TOTAL_HEADROOM
Total auto-granted session headroom per session (tool calls).
MAX_TOOL_LOOP_CAP_MULTIPLIER
Multiplier used to derive the ordinary extension hard cap.
MAX_TOOL_LOOP_INCREMENT_PER_PROMPT
Maximum ordinary tool-loop extension accepted from one prompt.
MAX_TOOL_LOOP_LIMIT_ABSOLUTE_CAP
Hard cap for ordinary tool-loop extensions.
PLANNING_WORKFLOW_MAX_TOOL_LOOP_INCREMENT_PER_PROMPT
Maximum planning tool-loop extension accepted from one prompt.
PLANNING_WORKFLOW_MAX_TOOL_LOOP_LIMIT_ABSOLUTE_CAP
Hard cap for planning tool-loop extensions.
PLANNING_WORKFLOW_MIN_TOOL_CALLS_PER_TURN
Minimum per-turn tool-call budget while planning research is active.
PLANNING_WORKFLOW_MIN_TOOL_LOOPS
Minimum tool-loop budget while planning research is active.
PLANNING_WORKFLOW_TOOL_LOOP_CAP_MULTIPLIER
Multiplier used to derive the planning extension hard cap.

Functions§

session_auto_grant_increment
Increment a full-auto run grants itself against the session headroom cap.
tool_loop_hard_cap
Absolute ceiling for per-turn tool-loop extensions derived from a configured base limit. Values at or above the absolute cap are returned unchanged so an already-generous configuration is never shrunk.