{"version":"2.1.277","anchor":"new-settingshooksoff-session-option-suppresses-hooks","canonical_anchor":"callmodel-wrapper-resolves-promptattachment-hooks-before-ea","heading":"Model calls now resolve prompt.attachment hooks, with a new settingsHooksOff option to disable hooks","tier":"internal","area":"Hooks","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.277\/e\/new-settingshooksoff-session-option-suppresses-hooks","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.277","markdown":"### Model calls now resolve prompt.attachment hooks, with a new settingsHooksOff option to disable hooks\n\nBefore each model call, Claude Code now resolves any prompt.attachment hook automatically, unless the new settingsHooksOff option turns hooks off\n\n**What**\n\n- Every model call now passes through a new wrapper that checks whether a `prompt.attachment` hook (code a plugin can use to modify text attached to a message) is active, and if so runs `resolveAttachments` on the outgoing messages first.\n\n- A new `settingsHooksOff` option can be set on a session or subagent to fully disable hooks, similar to how isolated agent contexts already skip them. It's checked throughout isolation and hook-invocation logic, including permission checks, and it also disables the new attachment-hook resolution step.\n\n**Why** This makes sure a `prompt.attachment` hook reliably runs before every model call, while giving Claude Code a clean way to run a session or subagent with hooks turned off entirely when that's needed.\n\n- Area: Hooks\n- Names: `settingsHooksOff`\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 2\/5"}