Summary
Add optional sandboxing for the coding agent child processes spawned during /run, restricting filesystem and network access to reduce risk from autonomous AI code execution.
Problem / Context
When Wiggum runs an autonomous coding loop, the spawned agent has full access to the filesystem, network, and system. As loops run longer and with less supervision (especially with parallel execution from S5), the blast radius of a misbehaving agent increases. Competitors already support bubblewrap (Linux) and sandbox-exec/Seatbelt (macOS) sandboxing. Enterprise and security-conscious users will expect this as a trust signal for production use.
Roadmap phase: Phase 7 — SHIP ("Production-ready, enterprise-trustworthy")
Proposed Solution
Platform Support
| Platform |
Sandbox |
Method |
| Linux |
bubblewrap (bwrap) |
Wrap agent command in bwrap with restricted paths |
| macOS |
sandbox-exec (Seatbelt) |
Generate .sb profile, wrap agent command |
Configuration
// ralph.config.cjs
module.exports = {
sandbox: {
enabled: true,
allowNetwork: false,
allowPaths: ['./src', './tests', '.ralph'],
denyPaths: ['~/.ssh', '~/.aws', '~/.config'],
readOnlyPaths: ['/usr', '/bin'],
}
}
Auto-Detection
- Detect available sandbox runtime per platform
- Graceful fallback to unsandboxed execution with warning
wiggum doctor reports sandbox availability
Files to Modify
| File |
Changes |
src/sandbox/ (new) |
Sandbox manager, platform detection, profile generation |
src/commands/run.ts |
Wrap agent spawn in sandbox when enabled |
src/generator/templates.ts |
Add sandbox config to ralph.config.cjs template |
Acceptance Criteria
Summary
Add optional sandboxing for the coding agent child processes spawned during
/run, restricting filesystem and network access to reduce risk from autonomous AI code execution.Problem / Context
When Wiggum runs an autonomous coding loop, the spawned agent has full access to the filesystem, network, and system. As loops run longer and with less supervision (especially with parallel execution from S5), the blast radius of a misbehaving agent increases. Competitors already support bubblewrap (Linux) and sandbox-exec/Seatbelt (macOS) sandboxing. Enterprise and security-conscious users will expect this as a trust signal for production use.
Roadmap phase: Phase 7 — SHIP ("Production-ready, enterprise-trustworthy")
Proposed Solution
Platform Support
bwrap)bwrapwith restricted paths.sbprofile, wrap agent commandConfiguration
Auto-Detection
wiggum doctorreports sandbox availabilityFiles to Modify
src/sandbox/(new)src/commands/run.tssrc/generator/templates.tsralph.config.cjstemplateAcceptance Criteria
--sandboxflag wraps agent process in platform-appropriate sandboxwiggum doctorreports sandbox availability