{"version":"2.1.333","anchor":"shell-start-directory-check-added-before-commands-bot-prote","canonical_anchor":"shell-start-directory-check-added-before-commands-bot-prote","heading":"Commands are refused if the shell starts in a different folder than expected","tier":"notice","area":"Bash Tool","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333\/e\/shell-start-directory-check-added-before-commands-bot-prote","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333","markdown":"### Commands are refused if the shell starts in a different folder than expected\n\nClaude Code can now refuse to run a command when the shell started in another folder than the one it checked, and asks Claude to re-issue it\n\n**What**\n\nClaude Code can now record the folder a shell command is meant to start in, using `__CLAUDE_CC_START_DIR` and related environment variables. Before the command runs, the shell checks it is really in that folder. If not, the command stops with exit code 126 and the message \"Not run: the shell started in another directory than the one that was checked. Re-issue the command.\"\n\nThis is tied to a setting controlled from Anthropic's servers, `tengu_precious_kite`.\n\n**Why**\n\nShell startup files, the scripts your shell runs every time it opens, can change folder. This stops a command from running somewhere other than where Claude Code checked it was safe to run.\n\n- Area: Bash Tool\n- Names: `__CLAUDE_CC_START_DIR`\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: yes"}