{"version":"2.1.334","anchor":"two-new-hosthook-env-vars-registered-in-env-passthrough-lis","canonical_anchor":"new-host-managed-env-var-claude-code-host-narrows-served-set","heading":"New host variables for narrowing served settings and Stop hook events","tier":"use","area":"SDK","scope":"both","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.334\/e\/two-new-hosthook-env-vars-registered-in-env-passthrough-lis","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.334","markdown":"### New host variables for narrowing served settings and Stop hook events\n\nTwo new environment variables for programs that launch Claude Code: one narrows remotely served settings, one relates to Stop hook events\n\n**Unclear.** It is not clear what either variable does when set.\n\n**What**\n\nTwo new environment variables (settings passed to a program when it starts) are added to the lists of variables that a host, a program that launches Claude Code, can pass through:\n\n- `CLAUDE_CODE_HOST_NARROWS_SERVED_SETTINGS` is read together with `CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`. It leads to a check that needs `CLAUDE_CODE_REMOTE` to be true, an environment kind that is unset or `anthropic_cloud`, and one further internal check. What it narrows in the settings served from Anthropic was not traced.\n\n- `CLAUDE_CODE_EMIT_STOP_HOOK_EVENTS` sits beside `CLAUDE_CODE_EMIT_USER_PROMPT_SUBMIT_HOOK_EVENTS`. Only its place in those lists was seen, not the code that reads it.\n\nNeither existed before this release.\n\n**Why**\n\nThese only matter to a host that launches Claude Code and sets them. Someone running Claude Code directly will not see them.\n\n- Area: SDK\n- Names: `CLAUDE_CODE_EMIT_USER_PROMPT_SUBMIT_HOOK_EVENTS`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 4\/5\n- Scope: both\n- Heads-up: no"}