{"version":"2.1.337","anchor":"get-settings-reports-served-settings-retrying-agent-hook-ga","canonical_anchor":"get-settings-reports-served-settings-retrying-agent-hook-ga","heading":"Agents whose hooks cannot run are now refused instead of started","tier":"notice","area":"Agents","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.337\/e\/get-settings-reports-served-settings-retrying-agent-hook-ga","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.337","markdown":"### Agents whose hooks cannot run are now refused instead of started\n\nClaude Code now refuses to switch to an agent whose hooks cannot run, and a non-interactive run with such an agent exits with code 1\n\n**Unclear.** What makes an agent's hooks count as unable to run is not stated.\n\n**What**\n\nAn agent here is a named setup that defines how Claude behaves, and it can include hooks, which are commands Claude Code runs automatically at certain moments. Two places now check whether an agent's hooks are able to run:\n\n- `apply_flag_settings`: a request to switch to such an agent is refused, with a message that the agent switch was not applied.\n\n- Headless runs: a run with no interactive screen stops at startup with exit code 1 when given such an agent.\n\nSeparately, the `get_settings` response, used by programs that drive Claude Code, now includes a field named `served_settings_retrying`.\n\n**Why**\n\nAn agent whose hooks cannot run is now blocked up front, rather than running silently without them.\n\n- Area: Agents\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: yes"}