General
What is Agent Safehouse?
What is Agent Safehouse?
sandbox-exec. It uses a deny-first security model with composable policy profiles to give agents access only to the files and integrations they need.It’s designed as a practical hardening layer for daily agent workflows, not a perfect security boundary against determined attackers.Which agents does it support?
Which agents does it support?
- Claude Code
- Cursor (agent mode)
- Aider
- Codex
- Amp
- Gemini CLI
- Goose
- Kilo
- Pi
- And more
--enable=all-agents to load all agent profiles at once.Does it work on Linux or Windows?
Does it work on Linux or Windows?
sandbox-exec, which is specific to macOS.For cross-platform sandboxing, see Anthropic’s sandbox-runtime.Is it safe to use with sensitive projects?
Is it safe to use with sensitive projects?
- Accidental file access outside project scope
- Limiting agent access to credentials and sensitive paths
- Reducing network exposure
- Determined attackers with sandbox escape exploits
- Malicious agents actively trying to bypass restrictions
- Vulnerabilities in the agent software itself
What's the performance impact?
What's the performance impact?
sandbox-exec is lightweight and built into macOS. The overhead is primarily from policy evaluation on file access, which is negligible for typical agent workflows.Configuration
How does workdir detection work?
How does workdir detection work?
- Starts from current directory (
$PWD) - Searches up for git root (
.gitdirectory) - Uses git root if found, otherwise uses current directory
- Grants read/write access to the detected directory
What's allowed by default?
What's allowed by default?
- Workdir access: Read/write to detected project directory
- Core integrations: Git and SCM CLIs
- Toolchains: Node, Python, Rust, Go, etc.
- System runtime: Libraries, shells, compilers
- Network: Full network access
- SSH metadata: Config and known_hosts (not private keys)
How do I enable Docker, kubectl, or cloud CLIs?
How do I enable Docker, kubectl, or cloud CLIs?
--enable:How do I grant access to additional directories?
How do I grant access to additional directories?
--add-dirs-ro (read-only) or --add-dirs (read/write)::).Can I use a config file?
Can I use a config file?
.safehouse file in your project directory:--trust-workdir-config:How do I pass environment variables?
How do I pass environment variables?
Desktop Apps
How do I sandbox Claude Desktop or VS Code?
How do I sandbox Claude Desktop or VS Code?
--enable=electron and launch with --no-sandbox:Why do I need --no-sandbox?
Why do I need --no-sandbox?
sandbox-exec around Electron, you create nested sandboxes, which causes errors.The --no-sandbox flag disables Electron’s internal sandbox, allowing sandbox-exec to be the only sandbox layer.What about the one-file Claude launchers?
What about the one-file Claude launchers?
Advanced Usage
Can I customize the sandbox policy?
Can I customize the sandbox policy?
--append-profile to add custom rules:--append-profile are loaded last and take precedence.How do I create machine-specific defaults?
How do I create machine-specific defaults?
How do I debug what's in the policy?
How do I debug what's in the policy?
Can I use this with CI/CD?
Can I use this with CI/CD?
- Testing sandbox compatibility
- Validating agent behavior under restrictions
- Hardening agent-driven deployments
- CI already runs in isolated containers
- Overhead may slow builds
- Sandbox policy maintenance adds complexity
What if I need broader file access?
What if I need broader file access?
--enable=wide-read for broad read-only visibility:Troubleshooting
How do I see what's being denied?
How do I see what's being denied?
Why are my tests failing?
Why are my tests failing?
- macOS with
sandbox-exec - Not running inside an existing sandbox
Where can I get help?
Where can I get help?
Troubleshooting Guide
GitHub Issues
Contributing
How can I contribute?
How can I contribute?
- Project structure
- Policy authoring guidelines
- Testing requirements
- Pull request process
- New agent profiles
- Toolchain support
- Documentation improvements
- Test coverage
How do I add support for a new agent?
How do I add support for a new agent?
- Create a profile in
profiles/60-agents/<agent-name>.sb - Add tests in
tests/sections/ - Run
./scripts/generate-dist.sh - Test with the actual agent
- Submit a pull request