sandbox.enabled: false setting ignored — bwrap still wraps all Bash commands
Resolved 💬 3 comments Opened Mar 18, 2026 by vadimcomanescu Closed May 27, 2026
Description
sandbox.enabled: false in ~/.claude/settings.json is not respected. Claude Code v2.1.79 on Linux still wraps every Bash tool invocation in bwrap (bubblewrap) with --die-with-parent --unshare-pid --unshare-net, making it impossible to run persistent background processes (e.g. next dev, cargo watch) from within a session.
Environment
- Claude Code: 2.1.79
- OS: Arch Linux (kernel 6.18.13-arch1-1)
- bwrap: 0.11.0
- Permission mode:
bypassPermissions
Settings
{
"permissions": {
"defaultMode": "bypassPermissions"
},
"sandbox": {
"enabled": false
},
"skipDangerousModePermissionPrompt": true
}
Observed behavior
Every Bash command is wrapped in bwrap. PID 1 inside the sandbox is:
bwrap --new-session --die-with-parent --unshare-pid --unshare-net \
--setenv SANDBOX_RUNTIME 1 \
...
Consequences:
- Background processes die —
--die-with-parentkills all children when the wrapping shell exits, sonext dev &,nohup,setsid, anddisownall fail to keep a server running across Bash tool invocations. - Network is isolated —
--unshare-netcreates a separate network namespace. External tools (Playwright MCP, browser) cannot connect to servers started inside the sandbox, andcurlfrom inside the sandbox cannot reach servers started outside. SANDBOX_RUNTIME=1is set in the environment despite the user settingsandbox.enabled: false.
Expected behavior
With sandbox.enabled: false, Bash commands should run without bwrap wrapping, allowing:
- Background processes to persist across tool invocations
- Network access without namespace isolation
- Dev servers to be started and accessed by other tools (Playwright, curl, browser)
Steps to reproduce
- Set
"sandbox": { "enabled": false }in~/.claude/settings.json - Set
"defaultMode": "bypassPermissions"in permissions - Start Claude Code v2.1.79 on Linux with bwrap installed
- Run any Bash command and inspect PID 1:
cat /proc/1/cmdline | tr '\0' ' ' - Observe bwrap is wrapping the command despite sandbox being disabled
- Try to start a dev server in background and connect to it from a subsequent command — it will fail
Workaround
Start the dev server in a separate terminal outside Claude Code. The only current workaround for the bwrap wrapping itself would be to remove/rename /usr/bin/bwrap, which is not ideal.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗