[BUG] macOS sandbox cannot be enabled, shows Linux pre-requisites

Status Fixed / completed
Reported on v2.1.71
Maintainer reply None cached
Activity 5 comments · opened Mar 7, 2026 · closed Mar 16, 2026

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

  1. On 2.1.70, enable the sandbox on macOS
  2. 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.

View original on GitHub ↗

5 Comments

github-actions[bot] · 5 months ago

Found 1 possible duplicate issue:

  1. https://github.com/anthropics/claude-code/issues/31718

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

JoaoPacheco3 · 5 months ago

Yep, same thing here, but on WSL, as mentioned in #31708

linus-ingage · 5 months ago

Workaround

Installing ripgrep fixes this:

brew install ripgrep

/doctor revealed ripgrep (rg) not found as the underlying cause. On our system, rg existed only as a Claude Code shell function shim — not as a standalone binary — so the sandbox dependency check failed silently.

The /sandbox Dependencies 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.

jamestelfer · 5 months ago

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 .70 and fails on .71. Not only doesn't it work: it stops working silently.

github-actions[bot] · 5 months ago

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.