Skip to content

feat: YOLO Mode — Auto-Approve All Permission Prompts #11831

Closed as not planned

Description

@mguttmann

Summary

Add a YOLO mode that automatically approves all tool permission prompts (while still respecting explicit deny rules in config).

Motivation

Power users who fully trust OpenCode's actions often find permission prompts disruptive to their workflow. YOLO mode lets them skip all "ask" prompts while maintaining safety through explicit deny rules.

This is useful for:

  • Automated/CI workflows where no human is available to approve
  • Experienced users who want uninterrupted coding sessions
  • Quick prototyping where speed matters more than review

Changes

Backend (packages/opencode)

  • Yolo namespace (yolo/index.ts): Enable/disable/toggle with bus events
  • Flag (flag/flag.ts): OPENCODE_YOLO env var support
  • Permission (permission/next.ts): Auto-approve "ask" rules when YOLO is active (explicit "deny" rules are always respected)
  • Bootstrap (project/bootstrap.ts): Initialize YOLO on startup from config
  • Config (config/config.ts): yolo: boolean field
  • Server routes (server/routes/config.ts): GET/POST /config/yolo endpoints

Frontend (packages/app)

  • Settings UI (settings-general.tsx): YOLO section with:
    • "This Session Only" toggle (resets on restart)
    • "Always Enabled" toggle (persists to config.json)
    • CLI usage reference (opencode --yolo, OPENCODE_YOLO=true)
    • Warning about dangers

SDK

  • Regenerated with YOLO endpoints

Safety

  • Explicit deny rules in permission config are always respected, even in YOLO mode
  • Only "ask" rules are auto-approved
  • Clear warnings in the UI about the risks
  • Session-only mode available for temporary use

Related

Split from #9971 (closed) for cleaner review.

Activity

  1. mguttmann commented on Feb 2, 2026

    @mguttmann
    Author
    Image
  2. siscia commented on Mar 13, 2026

    @siscia

    I think it would be a great addition.

  3. LAP87 commented on Apr 19, 2026

    @LAP87

    Please add

  4. robertpro commented on Apr 20, 2026

    @robertpro

    I would love this for subagents, is this considered?

  5. mamalubitlal commented on Apr 25, 2026

    @mamalubitlal

    i would very like this,i sometimes have to go to some places so i leave opencode running and when i come back its a permission prompt

  6. assigned and unassigned on Apr 26, 2026
  7. appleflyerv3 commented on Apr 28, 2026

    @appleflyerv3

    +1 good addition

  8. kyboi commented on May 14, 2026

    @kyboi

    Isn't this the same as configuring an agent in your opencode.jsonc and settings all perms to approve?

  9. entrptaher commented on Jun 11, 2026

    @entrptaher
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