{"version":"2.1.295","anchor":"headless-session-adds-a-turn-and-budget-limiter","canonical_anchor":"headless-session-adds-a-turn-and-budget-limiter","heading":"Non-interactive runs set up a new tracker for turn and spending limits","tier":"internal","area":"Headless Mode","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.295\/e\/headless-session-adds-a-turn-and-budget-limiter","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.295","markdown":"### Non-interactive runs set up a new tracker for turn and spending limits\n\nWhen Claude Code runs without its interactive screen, it now builds a new tracker from the maximum-turns and maximum-budget limits\n\n**Unclear.** It is not known whether this changes when or how a headless run stops at its turn or budget limit.\n\n**What**\n\nClaude Code can run headless, which means without its interactive screen, for example from a script. In that mode it can be given two limits:\n\n- a maximum number of turns, where a turn is one round of Claude working and replying\n\n- a maximum spend in US dollars\n\nThe headless run now creates a new tracker from these two values when it starts.\n\n**Why**\n\nIf your scripts use `--max-turns` or `--max-budget-usd`, this is the part of Claude Code that handles those limits. Check that runs stop where you expect.\n\n- Area: Headless Mode\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}