{"version":"2.1.319","anchor":"headless-auto-mode-exits-1-when-actions-went-unchecked","canonical_anchor":"headless-auto-mode-exits-1-when-actions-went-unchecked","heading":"Headless runs in auto mode now exit with code 1 when some actions could not be checked","tier":"notice","area":"Auto Mode","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.319\/e\/headless-auto-mode-exits-1-when-actions-went-unchecked","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.319","markdown":"### Headless runs in auto mode now exit with code 1 when some actions could not be checked\n\nA `claude -p` run in auto mode now prints an error and exits with code 1 if auto mode could not check some actions, so they did not run\n\n**What**\n\nA headless run is one where Claude Code works without an interactive screen, for example when started with `claude -p` from a script. Auto mode is a permission mode where Claude Code checks each action automatically instead of asking you.\n\nAt the end of a headless run that did not already fail, Claude Code now checks whether auto mode was unable to check some of the actions Claude tried. If so, it prints this error to stderr (the error output stream) and exits with code 1:\n\n\"Error: auto mode could not check some actions Claude tried, so they did not run. To run them, use another permission mode. Exiting with code 1.\"\n\nRuns that use stream-json output are not affected. Previously the exit code came from the usual rules, or was 0, and these skipped actions were not checked. The new check is controlled by a server-side switch whose built-in default is on.\n\n**Why**\n\nScripts that run `claude -p` in auto mode may now see exit code 1 where they used to see 0. This tells a script that some of the work did not happen, instead of reporting success.\n\n- Flag `tengu_truthful_wren`: Not enough to say (read for one account on one subscription tier against v2.1.319; this account: no value returned, anonymous baseline: no value returned, compiled default: on) These values were read against a different version of Claude Code, so treat them as the nearest reading available instead of one taken on this release.\n- Area: Auto Mode\n- Names: `claude -p`\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: yes"}