#11157: Add sandbox mode quick switcher for local models
stale
Cluster:
Sandbox Enhancements and Fixes
## Summary
Adds a `/agent` command extension for quick switching between sandboxed and unsandboxed modes for the same local model.
## Motivation
Local model users (Ollama, LM Studio) face a trade-off:
- **Unsandboxed** = Fast but risky
- **Sandboxed** = Safe but slower (requires Docker)
The built-in `Ctrl+G` switcher doesn't show sandbox modes, making it hard to know which configuration you're selecting.
## Changes
- New plugin: `extensions/sandbox-switcher/`
- Implements `/agent` slash command for agent switching
- Shows sandbox mode (off/all) before switching
- Validates Docker availability for sandboxed agents
- Opens new terminal window with isolated session
- Platform: macOS (Terminal.app)
- Future: Linux/Windows support planned
## Example Usage
```bash
/agent # Shows: qwen (qwen3:8b, sandbox: off)
# qwen-sandbox (qwen3:8b, sandbox: all)
/agent qwen # Opens fast unsandboxed session
/agent qwen-sandbox # Opens safe sandboxed session
```
## Testing Level: Fully Tested
- ✅ Tested on macOS 14.6 with Ollama qwen3:8b
- ✅ Docker validation works correctly
- ✅ Clean session isolation verified
- ✅ AppleScript injection protection verified
- ✅ All CI checks pass locally
## AI-Assisted Development
This PR was developed with AI assistance (Claude). The contributor has reviewed and tested all code to ensure it meets requirements and follows OpenClaw conventions.
## Notes
This is my first open source contribution! 🎉
Feedback and suggestions very welcome.
Thanks!
@pearyj
Most Similar PRs
#19566: [AI-Assisted] feat: add openclaw sandbox run command
by bundasht · 2026-02-17
68.0%
#4226: Fix/sandbox containerworkdir rw access
by ozgur-polat · 2026-01-29
65.3%
#9657: fix(doctor): warn when sandbox mode enabled without Docker
by mcaxtr · 2026-02-05
63.4%
#23400: Onboarding: set sandbox defaults when Docker is available
by bmendonca3 · 2026-02-22
63.2%
#20477: fix(cron): prevent sandbox config clobbering in hook/cron agent path
by olyashok · 2026-02-19
62.5%
#7826: feat(sandbox): add Docker Sandboxes (microVM) as alternative backend
by HODL-Community · 2026-02-03
62.5%
#11820: fix(sandbox): remap container paths in sandboxed file tools
by steflsd · 2026-02-08
62.4%
#7851: feat: secure sandbox defaults for new installs
by ichbinlucaskim · 2026-02-03
61.8%
#3967: fix(sandbox): correct workspace prompt path
by sweepies · 2026-01-29
61.4%
#8296: fix(browser): bind sandbox browser bridge to 0.0.0.0 for container ...
by gavinbmoore · 2026-02-03
61.3%