What
A sandbox is a restricted space that limits what a command Claude runs can touch. When a command runs in the sandbox and the sandbox has its own temporary folder (sandboxTmpDir), Claude Code now sets TMPDIR to that folder on macOS and Linux before the command starts. TMPDIR is the setting programs read to decide where to put temporary files.
Before this, temporary-folder variables were set this way only on Windows.
Why
Programs run in the sandbox on macOS and Linux now write their temporary files into the sandbox's own temporary folder, as they already did on Windows.