What
Claude Code checks shell commands before running them. The sandbox is a restricted environment that limits which files and folders commands can reach. Both are tighter:
- The command analysis now carries
zshNullCommandHeld,rubyAttachedPatternandforNameDo. Before, onlyquotedBackslashKeptwas passed. Each is read through a safety-flag helper, and their defaults were not resolved. NULLCMDandREADNULLCMDjoin the list of dangerous environment variables.- The zsh builtin list now takes in a separate set in place of the removed
zformat,zparseopts,zstyle,zregexparse,getlnandvaredentries. - The Ruby attached pattern is passed to the
rscriptandphpchecks. - A
javaHookentry is added to a fixed-binary table. - On Windows, the sandbox tags paths that may be read as a folder name. It refuses grants whose resolved path leads to the home folder or a Claude config folder, and explains why. Before, it only refused a path that is or contains the home folder.
- Symlinks (entries that point to another path) that are relinked late are checked again against the same rules.
- On macOS, the sandbox denies
.git/**/config.lockin case-insensitive spellings. This is tracked by a newnestedGitConfigLockDenyAppliedstate and can be turned off remotely through a kill switch.
Why
Shell commands that use these zsh, Ruby or PHP constructs may now ask for permission or be blocked. The sandbox is also harder to escape through symlinks, home-folder grants or tampering with git's config.lock file.