Skip to main content
NOV 2026 Latest guide updates. Latest: AI Design Patterns Local vs cloud AI Grill me Changelog →
Architecture Agentic

max_turns

Agent SDK option limiting agentic turns (tool-use round trips). Reaching this limit ends the query with a turn-limit error result; inspect the SDK result to detect incomplete work. It is not a Messages API `stop_reason` value.

Learn more in the guide