opencode
opencode copied to clipboard
feat: YOLO Mode - Skip Permission Prompts
Summary
Add a "YOLO Mode" that allows users to skip all permission prompts, similar to Claude Code's --dangerously-skip-permissions flag.
Use Case: Power users who trust OpenCode and want faster workflow without constant permission confirmations.
Proposed Implementation
Backend
- Add
OPENCODE_YOLOenvironment variable flag - Add
yolo: booleanconfig option inopencode.json - Modify
PermissionNext.ask()to auto-approve when YOLO mode is enabled - Add runtime state that can be toggled without restart
Server API
-
GET /config/yolo- Check current YOLO mode status -
POST /config/yolo- Toggle YOLO mode at runtime
CLI
- Add
--yoloor--dangerously-skip-permissionsflag - Example:
opencode --yolooropencode chat --yolo
Desktop App
- Add "Danger Zone" tab in Settings dialog
- Toggle switch with prominent warning:
Warning: YOLO mode skips ALL permission prompts. OpenCode will execute file changes, bash commands, and other operations without asking for confirmation. Use at your own risk.
Safety Considerations
- Clear warning messaging in both CLI and Desktop
- Not enabled by default
- Session-based (does not persist across restarts unless configured)
- Still respects explicit
denyrules in config
Dependencies
- Depends on #9068 (Multi-Account OAuth) for the Settings UI infrastructure
Acceptance Criteria
- [ ]
OPENCODE_YOLO=trueenv var enables YOLO mode - [ ]
opencode --yoloCLI flag works - [ ] Config option
"yolo": trueinopencode.jsonworks - [ ] Desktop Settings shows Danger Zone tab with toggle
- [ ] Toggle updates server state immediately
- [ ] All permission prompts are auto-approved in YOLO mode
- [ ] Clear warning messaging is displayed