[BUG] macOS sandbox cannot be enabled, shows Linux pre-requisites
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
The sandbox is no longer applied despite being enabled. When I view /sandbox the following is shown:
<img width="906" height="652" alt="Image" src="https://github.com/user-attachments/assets/cee241e2-4b7e-4a53-bdb1-b598007f35f9" />
Bubblewrap, socat etc are required for the Linux sandbox, not Mac.
This is a new regression in 2.1.71, all is working in 2.1.70.
What Should Happen?
When the sandbox is enabled, Claude should use it when executing commands on Mac. Showing the /sandbox settings should appear as below:
<img width="1334" height="832" alt="Image" src="https://github.com/user-attachments/assets/5bb21bca-1b17-443a-8053-daf7719e05d7" />
Error Messages/Logs
Steps to Reproduce
- On 2.1.70, enable the sandbox on macOS
- Upgrade to 2.1.71, open
Sandbox no longer works.
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.70
Claude Code Version
2.1.71
Platform
AWS Bedrock
Operating System
macOS
Terminal/Shell
Other
Additional Information
I looked at the debug logs but nothing appeared relevant. On 2.1.71 it shows what you'd expect for a disabled sandbox, and the Bash confirmation prompts are showing.
5 Comments
Found 1 possible duplicate issue:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Yep, same thing here, but on WSL, as mentioned in #31708
Workaround
Installing ripgrep fixes this:
/doctorrevealedripgrep (rg) not foundas the underlying cause. On our system,rgexisted only as a Claude Code shell function shim — not as a standalone binary — so the sandbox dependency check failed silently.The
/sandboxDependencies tab made this hard to diagnose: it listed bwrap/socat/seccomp as "installed" but never surfaced the missing ripgrep. Mode selection tabs only appear once all dependencies (including rg) are satisfied.Details in #32275.
This is a workaround, however puzzling. Why would the sandbox suddenly have an undocumented dependency on ripgrep?
Thanks @linus-ingage for the workaround! I'll be looking at the doco updates with interest on this one.
Note that while the workaround works, this is still a bug where the sandbox is happy and working on
.70and fails on.71. Not only doesn't it work: it stops working silently.This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.