$ recombobulate _
home / tips / enable-sandbox-mode-to-isolate-bash-commands
0

Enable Sandbox Mode to Isolate Bash Commands

bagwaa @bagwaa · Mar 26, 2026 · Configuration
enable-sandbox-mode-to-isolate-bash-commands

Tired of approving every bash command Claude wants to run? Sandbox mode gives you the best of both worlds: Claude runs commands freely within a restricted environment that limits filesystem and network access.

> /sandbox

Or enable it in your settings:

{
  "sandbox": {
    "enabled": true,
    "autoAllowBashIfSandboxed": true
  }
}

With autoAllowBashIfSandboxed set to true, Claude can run bash commands without prompting you, because the sandbox restricts where those commands can write and what network access they have.

You can fine-tune what the sandbox allows:

{
  "sandbox": {
    "enabled": true,
    "filesystem": {
      "allowWrite": ["/tmp/build", "./output"],
      "denyRead": ["~/.aws/credentials"]
    },
    "network": {
      "allowedDomains": ["github.com", "*.npmjs.org"]
    },
    "excludedCommands": ["git", "docker"]
  }
}

Commands in excludedCommands run outside the sandbox, useful for tools like git and docker that need broader system access.

Sandbox mode works on macOS, Linux, and WSL2. If you need it as a hard requirement (for enterprise policies), set failIfUnavailable: true so Claude Code won't start without a working sandbox.

Let Claude work autonomously within boundaries you define.


via Claude Code Docs — Security

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
0
Switch to the Stable Update Channel with autoUpdatesChannel

The autoUpdatesChannel setting pins Claude Code to a stable release track that skips versions with major regressions.

bagwaa @bagwaa · 1 hour ago
0
Set Claude's Response Language with the language Setting

The language setting makes Claude respond in your preferred language by default, across every session and project.

bagwaa @bagwaa · 1 hour ago
0
Customize or Remove Claude's Git Attribution with the attribution Setting

The attribution setting lets you customize or completely remove Claude's Co-Authored-By trailer from git commits and pull requests.

bagwaa @bagwaa · 1 hour ago