You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
Bash SafetyArea: what it touches
ImprovementsKind: in v2.1.311,
ImprovementsSection of the release
What
Before Claude Code runs a shell command (for example through the Bash tool), it checks whether the command is allowed. This is the permission check. The command then runs in a working folder. Claude Code now checks again, just before it starts the shell, that this folder still leads to the same place it did at the permission check.
If the folder now leads somewhere else, the command is refused.
If the folder is gone, the command is refused.
The refusal message says the working directory "no longer leads where it did when this command was permission-checked". It also tells Claude to issue the command again. The previous check caught only a folder that had gone missing. Claude Code also now records how much processor time the command uses.
Why
This is a safety measure. A command you approved for one folder cannot quietly run in a different one. Some shell commands that used to run may now be refused and have to be issued again.