{"version":"2.1.330","anchor":"new-host-only-env-var-claude-code-host-allow-resets-denial-s","canonical_anchor":"new-host-only-env-var-claude-code-host-allow-resets-denial-s","heading":"Host apps can opt in to resetting the permission-denial streak","tier":"use","area":"SDK","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.330\/e\/new-host-only-env-var-claude-code-host-allow-resets-denial-s","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.330","markdown":"### Host apps can opt in to resetting the permission-denial streak\n\nNew host-only variable `CLAUDE_CODE_HOST_ALLOW_RESETS_DENIAL_STREAK` adds a `denial_limit_host_reset` reason to permission requests sent to host apps\n\n**Unclear.** How setting the variable actually changes the denial streak is not confirmed.\n\n**What**\n\nAn environment variable is a named setting handed to a program when it starts. This release adds `CLAUDE_CODE_HOST_ALLOW_RESETS_DENIAL_STREAK`, which is listed among the variables a host app may set. A host app is a program that embeds Claude Code, such as Desktop or an SDK integration. The variable does nothing unless it is set to exactly `true`.\n\n- `denial_limit_host_reset` is a new value for `decision_reason_code` in `can_use_tool` permission requests, which are the messages asking the host whether a tool may run. It is sent only when the variable is set.\n\n- It covers the prompt raised after three or more blocked actions in a row, but not the one raised after twenty blocked actions in total.\n\n- When set, Claude Code also records the request's id for the session and later removes it again, which suggests that a host approval resets the denial streak. Only this guard was read, not the full streak logic.\n\n- Separately, a new variable `CLAUDE_CODE_STOP_ON_UNUSABLE_PROFILE` is registered alongside `CLAUDE_CODE_AUTOMOUNT_ROOTS` and `CLAUDE_CODE_CUSTOM_OAUTH_URL`. What it does when set was not traced.\n\n**Why**\n\nAn SDK host that sets the variable can tell a denial-streak prompt apart from other permission requests. If its approval resets the streak, as the name suggests, repeated blocks stop building up. People using the plain terminal are unaffected.\n\n- Area: SDK\n- Names: `CLAUDE_CODE_HOST_ALLOW_RESETS_DENIAL_STREAK`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}