CLAUDE_CODE_DISABLE_COMMAND_INJECTION_CHECK

Updated by

CLAUDE_CODE_DISABLE_COMMAND_INJECTION_CHECK is a Claude Code environment variable: Previously allowed disabling command injection detection. The safety check is now mandatory — no opt-out. This aligns with the changelog's hook hardening: compound commands and env-var prefixed commands are now properly matched by hook filters[1]. Removed between v2.1.88 and v2.1.89, so current releases ignore it. It is not in the official reference.

StatusRemoved between v2.1.88 and v2.1.89
AddedPresent since v2.1.69 or earlier
CategoryFeature toggles
Official docsNot listed

How to set it

For one session, export it in the shell that starts Claude Code:

export CLAUDE_CODE_DISABLE_COMMAND_INJECTION_CHECK=<value>
claude

To apply it to every session, add it to the env object of a settings file:

// ~/.claude/settings.json
{
  "env": {
    "CLAUDE_CODE_DISABLE_COMMAND_INJECTION_CHECK": "<value>"
  }
}

Release notes that mention it

Related variables

Frequently asked questions

What does CLAUDE_CODE_DISABLE_COMMAND_INJECTION_CHECK do?

Previously allowed disabling command injection detection. The safety check is now mandatory — no opt-out. This aligns with the changelog's hook hardening: compound commands and env-var prefixed commands are now properly matched by hook filters[1].

Which Claude Code version has CLAUDE_CODE_DISABLE_COMMAND_INJECTION_CHECK?

Removed between v2.1.88 and v2.1.89, so current releases ignore it.

How do I set CLAUDE_CODE_DISABLE_COMMAND_INJECTION_CHECK?

Export it before starting Claude Code (export CLAUDE_CODE_DISABLE_COMMAND_INJECTION_CHECK=value), or add it to the "env" object in ~/.claude/settings.json to apply it to every session.

All variables, searchable: Claude Code environment variables.