Skip to content

Why Sandbox Claude Code

AI coding assistants like Claude Code execute real commands on real systems. This guide explains why sandboxing matters and when it’s essential.

Claude Code is powerful because it can:

  • Read and write files in your project
  • Execute shell commands
  • Run git operations
  • Install dependencies
  • Make API calls

This power comes with responsibility. While Claude Code is designed to be helpful and careful, any system that executes commands can cause unintended effects.

Without isolation, Claude Code can access any file your user account can access:

AccessibleRisk
~/.ssh/SSH keys for servers and services
~/.aws/AWS credentials
~/.config/Application configurations
Other projectsCross-project contamination

With SCC, Claude Code only sees the workspace you explicitly mount.

AI coding sessions involve experimentation. Without guardrails:

CommandImpact
git push --forceOverwrites remote history, affects entire team
git reset --hardDiscards uncommitted work
git branch -DForce-deletes branches without merge check
git clean -fdDeletes untracked files permanently

SCC’s Safety Net plugin blocks these commands by default.

When each developer configures Claude Code independently:

  • Plugins vary across the team
  • Settings differ between machines
  • Behavior is inconsistent and hard to debug

SCC provides team profiles that ensure consistent configuration.

SCC runs Claude Code inside Docker containers:

┌─────────────────────────────────┐
│ Host System │
│ ~/.ssh ~/.aws ~/other-work │
│ ▲ │
│ │ (blocked) │
│ ┌────────┴────────────────┐ │
│ │ Docker Container │ │
│ │ /workspace (mounted) │ │
│ │ Claude Code runs here │ │
│ └─────────────────────────┘ │
└─────────────────────────────────┘

Claude Code can only access /workspace—your mounted project directory.

SCC provides layers of control:

  1. What files: Only mounted paths are visible
  2. What plugins: Only org-approved plugins run
  3. What git ops: Safety Net filters dangerous commands
  4. What network: Network policies control outbound access

If something goes wrong, damage is contained:

Without SandboxWith SCC
Could affect entire systemLimited to mounted workspace
Could damage git historySafety Net blocks destructive commands
Could install anythingOnly approved plugins
Inconsistent recoveryWorktrees provide clean rollback
  • Multiple teams sharing AI tools
  • Compliance requirements
  • Need for audit trails
  • Consistent security posture
  • Financial or healthcare systems
  • Code with embedded secrets
  • Production infrastructure
  • Onboarding new developers
  • Standardizing AI tool usage
  • Reducing support burden from inconsistent setups

Individual developers with:

  • Full system backups
  • Git remotes as backup
  • Understanding of risks

One-off tests where:

  • No sensitive data involved
  • Results are disposable
  • Speed matters more than safety
Terminal window
# Install SCC
uv tool install scc-cli
# Configure (one time)
scc setup
# Run sandboxed
scc start ~/your-project