{"version":"2.1.312","anchor":"hooks-run-with-untrusted-workspace-handling","canonical_anchor":"hooks-run-with-untrusted-workspace-handling","heading":"Hooks in untrusted folders follow new rules","tier":"notice","area":"Hooks","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.312\/e\/hooks-run-with-untrusted-workspace-handling","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.312","markdown":"### Hooks in untrusted folders follow new rules\n\nIn a folder you have not trusted, Claude Code now runs only hooks defined in your own settings and no longer skips all hooks\n\n**Unclear.** It is unclear how a reader turns on the option that lets their own hooks run in untrusted folders, or whether it is on by default.\n\n**What**\n\nHooks are commands Claude Code runs automatically at set moments. Outside the interactive screen, Claude Code used to skip every hook in a folder you had not marked as trusted. It now behaves like this:\n\n- Hooks that come from the folder itself still do not run. A debug line explains that the workspace is not trusted and your own settings do not define the hook.\n\n- Hooks defined in your own settings can run.\n\n- A file passed with `--settings` does not count as your own settings for this, so it cannot approve a hook without folder trust.\n\nHooks are also given the folder where the untrusted session started.\n\n**Why**\n\nThe hooks that run in an untrusted folder are different now. If you rely on hooks there, define them in your own settings, not in a `--settings` file.\n\n- Area: Hooks\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: yes"}