Skip to main content

DEFAULT_MAX_TURNS

Constant DEFAULT_MAX_TURNS 

Source
pub const DEFAULT_MAX_TURNS: usize = 100;
Expand description

Default per-run turn cap for LoopConfig::max_turns. Generous enough for long agentic tasks, low enough that a runaway tool loop can’t burn tokens unbounded. Unlike cancellation, hitting it is a clean, resumable stop.