{"version":"2.1.299","anchor":"headless-run-host-with-max-turns-max-budget-usd-limits","canonical_anchor":"headless-run-host-with-max-turns-max-budget-usd-limits","heading":"Headless runs now say why they stopped, including when input ends","tier":"notice","area":"Headless Mode","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.299\/e\/headless-run-host-with-max-turns-max-budget-usd-limits","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.299","markdown":"### Headless runs now say why they stopped, including when input ends\n\nHeadless runs now end with a stated reason: the turn limit, the spending limit, or the host closing its input\n\n**What**\n\nWhen Claude Code runs headless (without its interactive screen, for example driven by another program), the run now ends with one of these stated reasons:\n\n- the run reached its `--max-turns` limit\n\n- the run is past its `--max-budget-usd` limit\n\n- the host has ended its input\n\nThe last one is new: when the program feeding Claude Code its input closes that input, the run ends. Claude Code also keeps count of the turns the host asked for.\n\n**Why**\n\nThis changes when sessions that take their input from another program come to a stop. If you drive Claude Code from a script, closing its input is now a way the run ends, and the stop reason tells you which limit was hit.\n\n- Area: Headless Mode\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}