--max-turns
Restricts the total number of agent interaction turns allowed in print mode.
Syntax
--max-turnsExample
Terminal
claude -p --max-turns 3 "query"Progress will not be saved. This browser is blocking storage (often private browsing). You can still learn, but closing the tab loses your progress.
--max-turnsRestricts the total number of agent interaction turns allowed in print mode.
--max-turnsclaude -p --max-turns 3 "query"