{"version":"2.1.333","anchor":"shell-env-var-blocklist-regex-for-bash-related-variables","canonical_anchor":"shell-env-var-blocklist-regex-for-bash-related-variables","heading":"Claude Code now recognises environment variables that change how shells behave","tier":"internal","area":"Bash Tool","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333\/e\/shell-env-var-blocklist-regex-for-bash-related-variables","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333","markdown":"### Claude Code now recognises environment variables that change how shells behave\n\nClaude Code now has a list of shell-related environment variable names such as BASH_ENV, SHELLOPTS and TMOUT\n\n**Unclear.** It is not clear what Claude Code does with variables matching this list, such as whether it blocks or removes them.\n\n**What**\n\nAn environment variable is a named setting passed to programs when they start. Claude Code now has a pattern that matches names of variables that can change how a shell (the program that runs commands) behaves, including:\n\n- `BASH_ENV`, `BASH_FUNC_*`, `BASH_COMPAT`, `BASH_XTRACEFD`, `BASH_ARGV0`, `BASH_LOADABLES_PATH`\n\n- `BASHOPTS`, `SHELLOPTS`, `ENV`, `EXECIGNORE`, `POSIXLY_CORRECT`\n\n- `SSH_CLIENT`, `SSH2_CLIENT`, `TMOUT`\n\n**Why**\n\nThese variables can make a shell run extra code or behave differently, so a list of them is likely used to treat them with care.\n\n- Area: Bash Tool\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}