opencode icon indicating copy to clipboard operation
opencode copied to clipboard

[FEATURE]: Add `--dangerously-skip-permissions` (aka YOLO mode)

Open surma opened this issue 1 week ago • 3 comments

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 ask permission prompts
  • Explicit deny rules 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:

  1. Clear naming that indicates danger (dangerously-skip-permissions)
  2. Visual warnings when active
  3. Respect for explicit deny rules
  4. 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 ask prompts when enabled
  • CLI commands to accept the flag
  • TUI to show visual warnings when active

surma avatar Jan 14 '26 14:01 surma

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.

github-actions[bot] avatar Jan 14 '26 14:01 github-actions[bot]

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",
    }
  }
}

orangeswim avatar Jan 16 '26 06:01 orangeswim

This feature has been implemented in PR #9073!

The implementation includes:

  • --dangerously-skip-permissions flag (aliased as --yolo)
  • OPENCODE_DANGEROUSLY_SKIP_PERMISSIONS / OPENCODE_YOLO env 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.

mguttmann avatar Jan 17 '26 11:01 mguttmann