-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Summary
Add first-class Bubblewrap execution to /run-prompt so Linux users can run prompts with one flag instead of writing custom bwrap wrappers.
Proposed UX
/run-prompt <id> --sandbox bubblewrap- Optional:
--sandbox-profile strict|balanced|dev - Optional:
--sandbox-workspace <path> - Optional:
--sandbox-net on|off
Why
Linux users need a lightweight sandbox path comparable to seatbelt-style workflows on macOS, without forcing Docker/Podman. Bubblewrap works well but policy setup is error-prone when done manually.
Behavior expectations
- Auto-detect
bwrapand run prompt in a generated policy wrapper - Safe defaults by profile:
strict: minimal RW mounts, no net by defaultbalanced: project RW + required cache/config/state dirs, net enableddev: wider compatibility for plugin-heavy/dev workflows
- Include
--new-sessionand secure defaults around terminal injection concerns - Clear warnings for high-risk mounts (broad HOME, D-Bus sockets, etc.)
Failure handling
- If
bwrapis missing, show install hint and fail with actionable guidance - Optional explicit fallback flag if user wants to run unsandboxed
Acceptance criteria
- Linux user can run
/run-prompt <id> --sandbox bubblewrapwithout manual script authoring - Profiles are documented with tradeoffs
- Strict profile blocks access outside allowed workspaces
- Balanced/dev profiles keep common agent workflows functional
- Troubleshooting docs cover missing certs/DNS binds/userns constraints
References
- Bubblewrap upstream: https://github.com/containers/bubblewrap
- bwrap man page: https://manpages.debian.org/testing/bubblewrap/bwrap.1.en.html
- OpenCode sandbox discussion: Is there a way to sandbox the agent ? anomalyco/opencode#2242 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels