{"version":"2.1.246","anchor":"hooks-run-under-the-calling-side-s-shell-prefix-and-environm","canonical_anchor":"hooks-run-under-the-calling-side-s-shell-prefix-and-environm","heading":"Hooks run under the calling side's shell prefix and environment","tier":"use","area":"Hooks","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.246\/e\/hooks-run-under-the-calling-side-s-shell-prefix-and-environm","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.246","markdown":"### Hooks run under the calling side's shell prefix and environment\n\nHooks now run with the shell prefix and environment of whichever side made the call.\n\n**What**\n\nHook processes now take their shell prefix, MCP shell prefix and MCP path from the context of the call that triggered them. For a call served from elsewhere, hooks run with the serving side's prefix and environment; locally the fallback is still the `CLAUDE_CODE_SHELL_PREFIX` environment variable.\n\n**Details**\n\n- The base environment comes from the context, minus an explicit omit list, instead of the raw process environment.\n- The context builder now takes the call's origin explicitly and derives its own-sources set from that origin's distrusted sources.\n\n**Evidence**\n\n`Hooks: a served call's hooks run without `\n\n- Area: Hooks\n- Names: `CLAUDE_CODE_SHELL_PREFIX`\n- Tier: Use it now\n- Useful: 3\/5\n- Signal: 3\/5"}