[FEATURE]: Add `--dangerously-skip-permissions` (aka YOLO mode)
Feature hasn't been suggested before.
- [x] I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Problem
When using OpenCode for automated workflows or in trusted environments, permission prompts can interrupt the flow and require manual intervention. This is particularly frustrating when you trust the agent and want it to operate autonomously.
Proposed Solution
This is already kinda possible with permissions env variable, but I feel like dedicated flag is nice because:
- It matches Claude Code
- It allows to show a warning in the UI that you are in YOLO mode
Usage
# CLI flag
opencode --dangerously-skip-permissions
# Environment variable
OPENCODE_DANGEROUSLY_SKIP_PERMISSIONS=true opencode
# With run command
opencode run --dangerously-skip-permissions "do something"
Behavior
- Auto-allows all
askpermission prompts - Explicit
denyrules are still respected - Shows "△ YOLO mode" warning in the TUI (home screen, footer, and sidebar) to indicate the mode is active
Why This Belongs in OpenCode
This feature improves the developer experience for trusted workflows while maintaining safety through:
- Clear naming that indicates danger (
dangerously-skip-permissions) - Visual warnings when active
- Respect for explicit deny rules
- Similar to Claude Code's implementation, which users find valuable
Implementation
PR #7137 implements this feature with changes to:
- Flag system to support the environment variable
- Permission system to bypass
askprompts when enabled - CLI commands to accept the flag
- TUI to show visual warnings when active
This issue might be a duplicate of existing issues. Please check:
- #1813: Feature Request: Yolo and non-Yolo mode (auto-accept) - Requests ability to switch between 'ask' and 'allow' permissions easily, similar to Claude Code's SHIFT+TAB
- #7928: [Feature]: Runtime Permission Mode Toggle (like Claude Code's Shift+Tab) - Proposes adding a keybind to cycle through permission modes at runtime
- #5891: [FEATURE]: Full automation support - Requests fully autonomous task execution without manual confirmation prompts
Feel free to ignore if your specific use case differs from these existing requests.
you can just set your permissions to below, this overrides everything. has to be the opencode.json in the repo because its takes priority, not the the global config,
{
"permission": {
"*": {
"*": "allow",
}
}
}
This feature has been implemented in PR #9073!
The implementation includes:
- ✅
--dangerously-skip-permissionsflag (aliased as--yolo) - ✅
OPENCODE_DANGEROUSLY_SKIP_PERMISSIONS/OPENCODE_YOLOenv var - ✅ Visual indicator in Desktop app (Settings → Danger Zone shows "ACTIVE" badge)
- ✅ CLI commands:
opencode yolo status/enable/disable - ✅ Config file support:
"yolo": true
Additionally includes runtime toggle via Desktop UI and API, allowing live switching without restart.