What
On macOS, Claude Code can run commands in a sandbox, a restricted environment that limits what they can touch, using sandbox-exec. The sandbox is described by a profile. When a sandboxed command fails, Claude Code now tries to explain why:
- When a sandboxed command exits with an error, its error output and normal output are scanned for a sandbox profile problem. If one is found, a diagnostic message is added to the error output, or to the normal output when that output goes to a file.
- When
sandbox-execfails with errors like "profile too large", Claude Code re-runs the profile to find the cause and labels itone_path_too_longorlists_too_long. - Exit code 134 is used when there was no exit status.
- Failures after the call directory changes now also report a reason and a cause.
- The E2BIG error message (shown when a command's input is too big) now receives
sandboxBytesandsettingsPathLists.
Why
Before, there was no diagnosis. A sandbox failure caused by a very long path or long lists of paths in your settings should now come with a message pointing at that cause.