Skip to content

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

Closed

Description

@surma

Feature hasn't been suggested before.

  • 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

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Jan 14, 2026
  2. github-actions commented on Jan 14, 2026

    @github-actions
    Contributor

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

    Feel free to ignore if your specific use case differs from these existing requests.

  3. orangeswim commented on Jan 16, 2026

    @orangeswim

    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",
        }
      }
    }
    
  4. mguttmann commented on Jan 17, 2026

    @mguttmann

    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.

  5. msgongora commented on Mar 12, 2026

    @msgongora

    I honestly much rather have the option to toggle YOLO within the session, without having to exit. gemini-cli Ctrl+Y or Shirt+Tab (auto-accept edits).

    If you want to follow @orangeswim suggestion, here you have. Use responsibly.

    cat >> ~/.config/opencode/opencode-yolo.json << 'EOF'
    {
      "$schema": "https://opencode.ai/config.json",
      "permission": {
        "*": {
          "*": "allow"
        }
      }
    }
    EOF
    
    alias oc-yolo='OPENCODE_CONFIG=~/.config/opencode/opencode-yolo.json opencode'
  6. adam-paterson commented on Apr 6, 2026

    @adam-paterson

    I honestly much rather have the option to toggle YOLO within the session, without having to exit. gemini-cli Ctrl+Y or Shirt+Tab (auto-accept edits).

    If you want to follow @orangeswim suggestion, here you have. Use responsibly.

    cat >> ~/.config/opencode/opencode-yolo.json << 'EOF'
    {
    "$schema": "https://opencode.ai/config.json",
    "permission": {
    "": {
    "
    ": "allow"
    }
    }
    }
    EOF

    alias oc-yolo='OPENCODE_CONFIG=~/.config/opencode/opencode-yolo.json opencode'

    You can just create a minimal yolo agent config and use tab in the TUI to switch to it:

    {
      "$schema": "https://opencode.ai/config.json",
      "agent": {
        "yolo": {
          "description": "Dangerously skip permissions",
          "permission": {
            "*": {
              "*": "allow"
            }
          }
        }
      }
    }
  7. msgongora commented on Apr 6, 2026

    @msgongora

    Sure, that could be another way, however, it just another hacky workarounds like the previous suggestions. In this use case, the drawback of switching agents is the loss of context, not all, but some of it.
    I still think a better solution would be a runtime toggle within the active session. This would allow you to maintain continuity while temporarily enabling autonomous execution.

  8. removed
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on May 3, 2026
  9. abort-retry-ignore commented on May 9, 2026

    @abort-retry-ignore

    This problem has already been solved in pretty much every other cli client, why is opencode making it hard? It should be SHIFT+TAB: YOLO ON/OFF. You shouldn't have to edit a config file or restart the app for this basic feature, and you should be able to turn it off the same way.

  10. bergstar commented on May 9, 2026

    @bergstar

    Why no YOLO ?

  11. mauriciotellezdev commented on May 11, 2026

    @mauriciotellezdev

    this is stupid enough to move me to Pi. all this time and there are dozens of pull requests for this feature and the opencode team basically spits in our faces......

    still no yolo, still no dangerously accept permissions.....

    Are you guys trying to push us out?

  12. 10 remaining items

  13. AsmanovLev commented on Jun 14, 2026

    @AsmanovLev
  14. added a commit that references this issue on Jun 18, 2026
    b91db44
  15. alvarofranz commented on Jun 19, 2026

    @alvarofranz

    Opencode is great. Just found it. But bro why is this being ignored?

    +1 to the opencode --dangerously-skip-permissions request

  16. dhyaneesh commented on Jun 30, 2026

    @dhyaneesh

    We need this please

  17. bbartels commented on Jun 30, 2026

    @bbartels
    Contributor

    #33279 Looks like it was added?

  18. vendelieu commented on Jul 1, 2026

    @vendelieu

    still being ignored?

  19. unkistudio commented on Jul 2, 2026

    @unkistudio

    This was added in 1.17.12, you can run opencode --yolo, you can also ctrl+p within the tui and search for "permissions" there is a Disable/Enable auto-approve permissions option

  20. xhd2015 commented on Jul 5, 2026

    @xhd2015

    then close this issue, opencode --yolo, confirmed working on v1.17.13

    Image
  21. ViktorWelbers commented on Jul 7, 2026

    @ViktorWelbers

    Problem with this, there is no config (opencode.json) or env var to disable this?
    We use opencode in our enterprise setting and we have no way to not allow yolo mode in control + p settings. any chance we can get an option here?

  22. pedrofsn commented on Jul 11, 2026

    @pedrofsn

    Up

  23. BGMLAI commented on Jul 13, 2026

    @BGMLAI

    There is real demand for unattended mode, but a single flag should not collapse all permissions into “anything the OS account can do.” A safer contract is autonomous-by-default for read and reversible workspace edits, with a non-overridable floor for destructive filesystem, Git, database, cloud, and credential-bearing operations.

    The UI warning is useful but insufficient after the session starts. Make the effective mode visible, require explicit opt-in, support scoped paths/credentials, and keep an audit trail of actions that were auto-approved versus hard-blocked.

    Disclosure: I maintain gate.cat, an open-source pre-execution veto layer. I am in favor of autonomy; the point is to decouple “do not interrupt me” from “may irreversibly destroy any reachable resource.”

  24. DocMAX commented on Jul 18, 2026

    @DocMAX

    please add --yolo or -y flag!

  25. rekram1-node commented on Aug 4, 2026

    @rekram1-node
    Contributor

    --dangerously-skip-permissions

    and

    --auto

    and

    --yolo

    all exist, we call the flag auto but it respects these other common aliases

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions