feat: YOLO Mode - Skip Permission Prompts #6589

Closed
opened 2026-02-16 18:04:41 -05:00 by yindo · 5 comments
Owner

Originally created by @mguttmann on GitHub (Jan 17, 2026).

Originally assigned to: @thdxr on GitHub.

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_YOLO environment variable flag
  • Add yolo: boolean config option in opencode.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 --yolo or --dangerously-skip-permissions flag
  • Add opencode yolo status/enable/disable commands
  • Example: opencode --yolo or OPENCODE_YOLO=true opencode

Desktop App

  • Add "Danger Zone" tab in Settings dialog
  • Toggle switches for:
    • This Session Only - Resets on restart
    • Always Enabled - Persists to config
  • Prominent warning messaging about the risks

Safety Considerations

  • Clear warning messaging in both CLI and Desktop
  • Not enabled by default
  • Session-based option available (does not persist across restarts)
  • Still respects explicit deny rules in config

Dependencies

  • Depends on #9068 (Multi-Account OAuth) for the Settings UI infrastructure

Acceptance Criteria

  • OPENCODE_YOLO=true env var enables YOLO mode
  • opencode --yolo CLI flag works
  • opencode yolo status/enable/disable commands work
  • Config option "yolo": true in opencode.json works
  • 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
  • Session vs Permanent mode options available

Implementation

PR #9073 implements all features described above.

Originally created by @mguttmann on GitHub (Jan 17, 2026). Originally assigned to: @thdxr on GitHub. ## 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_YOLO` environment variable flag - Add `yolo: boolean` config option in `opencode.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 `--yolo` or `--dangerously-skip-permissions` flag - Add `opencode yolo status/enable/disable` commands - Example: `opencode --yolo` or `OPENCODE_YOLO=true opencode` ### Desktop App - Add "Danger Zone" tab in Settings dialog - Toggle switches for: - **This Session Only** - Resets on restart - **Always Enabled** - Persists to config - Prominent warning messaging about the risks ## Safety Considerations - Clear warning messaging in both CLI and Desktop - Not enabled by default - Session-based option available (does not persist across restarts) - Still respects explicit `deny` rules in config ## Dependencies - Depends on #9068 (Multi-Account OAuth) for the Settings UI infrastructure ## Acceptance Criteria - [x] `OPENCODE_YOLO=true` env var enables YOLO mode - [x] `opencode --yolo` CLI flag works - [x] `opencode yolo status/enable/disable` commands work - [x] Config option `"yolo": true` in `opencode.json` works - [x] Desktop Settings shows Danger Zone tab with toggle - [x] Toggle updates server state immediately - [x] All permission prompts are auto-approved in YOLO mode - [x] Clear warning messaging is displayed - [x] Session vs Permanent mode options available ## Implementation **PR #9073** implements all features described above.
yindo closed this issue 2026-02-16 18:04:41 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 17, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #8463: [FEATURE]: Add --dangerously-skip-permissions (aka YOLO mode) - Already proposes the same feature with identical naming and implementation details
  • #7928: [Feature]: Runtime Permission Mode Toggle (like Claude Code's Shift+Tab) - Related request for runtime permission toggling
  • #1813: Feature Request: Yolo and non-Yolo mode (auto-accept) - Earlier request for auto-accept permissions mode

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 17, 2026): This issue might be a duplicate of existing issues. Please check: - #8463: [FEATURE]: Add `--dangerously-skip-permissions` (aka YOLO mode) - Already proposes the same feature with identical naming and implementation details - #7928: [Feature]: Runtime Permission Mode Toggle (like Claude Code's Shift+Tab) - Related request for runtime permission toggling - #1813: Feature Request: Yolo and non-Yolo mode (auto-accept) - Earlier request for auto-accept permissions mode Feel free to ignore if none of these address your specific case.
Author
Owner

@mguttmann commented on GitHub (Jan 17, 2026):

Implementation Complete - PR #9073

This issue has been implemented with a comprehensive solution in PR #9073 that addresses all the related feature requests mentioned by the bot.

Comparison with Related Issues

Issue Request Our Implementation
#8463 --dangerously-skip-permissions flag --yolo and --dangerously-skip-permissions (aliased)
#8463 Environment variable OPENCODE_YOLO=true
#8463 TUI warning indicator Desktop shows "ACTIVE" badge in Danger Zone
#7928 Runtime toggle Live toggle via Desktop UI + API, no restart needed
#7928 Keybind cycling Not implemented (could be added later)
#1813 Easy switch between ask/allow One-click toggle in Desktop + CLI commands

Why This Implementation is Comprehensive

  1. Multiple Entry Points

    • CLI flag: opencode --yolo
    • Environment variable: OPENCODE_YOLO=true
    • CLI commands: opencode yolo enable/disable/status
    • Desktop UI: Settings → Danger Zone
    • Config file: "yolo": true
  2. Flexibility

    • Session-only: Enabled for current session, resets on restart
    • Permanent: Saved to ~/.config/opencode/config.json, persists across restarts
    • Can switch between modes without restart
  3. Safety

    • Clear warning messaging
    • Explicit deny rules still respected
    • Visual indicators when active
  4. Both CLI and Desktop

    • Full parity between CLI and Desktop app
    • Same config file works for both

Not Implemented (Future Work)

  • Keybind cycling (Shift+Tab as in Claude Code) - Could be added as enhancement
  • Plan mode (read-only) - Different feature, could be separate PR

The implementation covers the core YOLO/auto-accept functionality that was requested across multiple issues. Keybind cycling could be added as a follow-up enhancement.

@mguttmann commented on GitHub (Jan 17, 2026): ## Implementation Complete - PR #9073 This issue has been implemented with a comprehensive solution in PR #9073 that addresses all the related feature requests mentioned by the bot. ### Comparison with Related Issues | Issue | Request | Our Implementation | |-------|---------|-------------------| | **#8463** | `--dangerously-skip-permissions` flag | ✅ `--yolo` and `--dangerously-skip-permissions` (aliased) | | **#8463** | Environment variable | ✅ `OPENCODE_YOLO=true` | | **#8463** | TUI warning indicator | ✅ Desktop shows "ACTIVE" badge in Danger Zone | | **#7928** | Runtime toggle | ✅ Live toggle via Desktop UI + API, no restart needed | | **#7928** | Keybind cycling | ❌ Not implemented (could be added later) | | **#1813** | Easy switch between ask/allow | ✅ One-click toggle in Desktop + CLI commands | ### Why This Implementation is Comprehensive 1. **Multiple Entry Points** - CLI flag: `opencode --yolo` - Environment variable: `OPENCODE_YOLO=true` - CLI commands: `opencode yolo enable/disable/status` - Desktop UI: Settings → Danger Zone - Config file: `"yolo": true` 2. **Flexibility** - **Session-only**: Enabled for current session, resets on restart - **Permanent**: Saved to `~/.config/opencode/config.json`, persists across restarts - Can switch between modes without restart 3. **Safety** - Clear warning messaging - Explicit `deny` rules still respected - Visual indicators when active 4. **Both CLI and Desktop** - Full parity between CLI and Desktop app - Same config file works for both ### Not Implemented (Future Work) - **Keybind cycling** (Shift+Tab as in Claude Code) - Could be added as enhancement - **Plan mode** (read-only) - Different feature, could be separate PR The implementation covers the core YOLO/auto-accept functionality that was requested across multiple issues. Keybind cycling could be added as a follow-up enhancement.
Author
Owner

@mguttmann commented on GitHub (Jan 17, 2026):

Image
@mguttmann commented on GitHub (Jan 17, 2026): <img width="608" height="492" alt="Image" src="https://github.com/user-attachments/assets/6f2b8a31-4422-4911-bd9f-edcfe02faaf2" />
Author
Owner

@mguttmann commented on GitHub (Jan 21, 2026):

Implementation Update

PR #9073 has been rebased onto latest dev (v1.1.30+) and is ready for review.

What's implemented:

  • --yolo CLI flag to skip all permission prompts
  • OPENCODE_YOLO=1 environment variable
  • yolo: true config option
  • CLI: opencode yolo [on|off|status]
  • API: GET/POST /config/yolo
  • Respects explicit deny rules even in YOLO mode

Related PRs:

  • #9069 - Multi-Account OAuth (dependency)
  • #9073 - This feature (YOLO Mode) ← ready for review
  • #9455 - Auto-Relogin (sibling, independent)

Branch: feat/yolo-mode

@mguttmann commented on GitHub (Jan 21, 2026): ## Implementation Update PR #9073 has been rebased onto latest dev (v1.1.30+) and is ready for review. ### What's implemented: - ✅ `--yolo` CLI flag to skip all permission prompts - ✅ `OPENCODE_YOLO=1` environment variable - ✅ `yolo: true` config option - ✅ CLI: `opencode yolo [on|off|status]` - ✅ API: `GET/POST /config/yolo` - ✅ Respects explicit deny rules even in YOLO mode ### Related PRs: - #9069 - Multi-Account OAuth (dependency) - **#9073** - This feature (YOLO Mode) ← ready for review - #9455 - Auto-Relogin (sibling, independent) Branch: `feat/yolo-mode`
Author
Owner

@mguttmann commented on GitHub (Jan 22, 2026):

Closing in favor of combined issue with all features

@mguttmann commented on GitHub (Jan 22, 2026): Closing in favor of combined issue with all features
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6589