opencode
opencode copied to clipboard
[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