Skip to content

feat: YOLO Mode - Skip Permission Prompts #9070

Closed

Description

@mguttmann

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

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.

Activity

  1. github-actions commented on Jan 17, 2026

    @github-actions
    Contributor

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

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

  2. mguttmann commented on Jan 17, 2026

    @mguttmann
    Author

    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.

  3. mguttmann commented on Jan 17, 2026

    @mguttmann
    Author
    Image
  4. mguttmann commented on Jan 21, 2026

    @mguttmann
    Author

    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:

    Branch: feat/yolo-mode

  5. mguttmann commented on Jan 22, 2026

    @mguttmann
    Author

    Closing in favor of combined issue with all features

  6. MusiCode1 commented on May 16, 2026

    @MusiCode1

    Hey, has this feature been merged?

  7. Glass109 commented on Jun 1, 2026

    @Glass109

    Nothing??

  8. arijitcodes commented on Jul 1, 2026

    @arijitcodes

    Hey, has this feature been merged?

    @MusiCode1

    According to the latest update changelogs in v1.17.12 - apparently it was added.
    But when I went to try it - didnt see any such commands in opencode --help.
    Tried running opencode --yolo but didnt see any indicator in TUI.

  9. AshotN commented on Jul 1, 2026

    @AshotN

    Control-P and search Perm

    Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions