[BUG] Sandbox not activating on WSL2 despite enabled in settings and all dependencies installed
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?
All sandbox dependencies are installed and showing green (bubblewrap, socat, seccomp filter), and "sandbox": { "enabled": true } is set in settings.json. Despite this, the /sandbox status bar
shows "⚠ sandbox disabled". Pressing Enter to configure only shows a "Dependencies" tab with no toggle to actually enable the sandbox. Bash commands can write freely outside the working directory
(e.g. /tmp), confirming the sandbox is not active.
<img width="465" height="96" alt="Image" src="https://github.com/user-attachments/assets/2444ee4e-dc0c-4706-9dad-b70c7916bc11" />
<img width="360" height="209" alt="Image" src="https://github.com/user-attachments/assets/47c2d313-e6a5-4140-a6b4-18bf5eb1cd49" />
What Should Happen?
● The sandbox should be active when all dependencies are installed and "sandbox": { "enabled": true } is set in settings. The /sandbox status bar should show it as enabled, and Bash commands should
be restricted from writing outside the working directory.
● Additionally, the /sandbox configuration screen should have more than just the "Dependencies" tab — there should be a tab to toggle the sandbox on/off. Currently the UI says "←/→ or tab to cycle"
but there is only the "Dependencies" tab with nothing to cycle to.
Error Messages/Logs
Steps to Reproduce
- Install Claude Code v2.1.71 on WSL2
- Install all sandbox dependencies (bwrap, socat, npm install -g @anthropic-ai/sandbox-runtime)
- Add "sandbox": { "enabled": true } to ~/.claude/settings.json
- Restart Claude Code
- Observe /sandbox status bar still shows "⚠ sandbox disabled"
- Press Enter on the status bar — only a "Dependencies" tab is shown, all green, with no toggle to enable
- Run a Bash command writing to /tmp — it succeeds, confirming sandbox is not active
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
v2.1.69
Claude Code Version
v2.1.71
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
Environment:
- OS: WSL2 (Linux 6.6.87.2-microsoft-standard-WSL2)
- Claude Code version: 2.1.71
- Node version: v20.20.1
- Shell: bash
This issue has 9 comments on GitHub. Read the full discussion on GitHub ↗