How It Works
When sandbox mode is enabled, VibeKit creates isolated Docker containers to run coding agents:- Container Isolation: Agent processes run inside Docker containers
- Filesystem Control: Limited access to host filesystem through controlled mounts
- Runtime Support: Works with Docker or Podman
- Optional Feature: Sandbox can be enabled per-command or via settings
Configuration
Enable Sandbox Mode
Environment Variables
Settings Configuration
Configure sandbox in~/.vibekit/settings.json
:
Sandbox Management
Check Sandbox Status
Build Sandbox Image
Clean Up Sandbox Resources
Current Implementation
What’s Available
- Docker/Podman Support: Configurable container runtime
- Sandbox Detection: Automatic detection of available runtimes
- Image Building: Build custom sandbox images
- Status Reporting: Check sandbox readiness and configuration
- Optional Operation: Works with or without sandboxing
Sandbox Engine Features
The sandbox engine provides:- Runtime detection (Docker/Podman availability)
- Container image management
- Configuration resolution from CLI options and settings
- Execution orchestration between sandboxed and direct execution
Example Status Output
Benefits
Isolation
- Process Isolation: Agent processes run in separate containers
- Filesystem Protection: Host filesystem access is controlled
- Resource Containment: Container resource limits prevent system impact
Flexibility
- Optional Use: Enable only when needed for sensitive operations
- Runtime Choice: Support for both Docker and Podman
- Configuration Options: CLI flags, environment variables, or settings file
Development Safety
- Safe Experimentation: Test potentially risky operations in isolation
- Clean Environment: Fresh container state for reproducible results
- Host Protection: Prevent accidental system modifications
Best Practices
When to Use Sandbox
- Working with untrusted or experimental code
- Testing potentially destructive operations
- Ensuring reproducible development environments
- Protecting sensitive host system configurations
Setup Recommendations
- Install Docker/Podman: Ensure container runtime is available
- Build Image: Pre-build sandbox image for faster startup
- Test Configuration: Verify sandbox status before important work
- Monitor Resources: Check container resource usage during long sessions
Security Considerations
- Sandbox provides process isolation, not complete security
- Container breakout vulnerabilities may still exist
- Host filesystem mounts reduce isolation benefits
- Keep container runtime updated for security patches