opencode icon indicating copy to clipboard operation
opencode copied to clipboard

feat: YOLO Mode - Skip Permission Prompts

Open mguttmann opened this issue 1 day ago • 3 comments

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
  • Example: opencode --yolo or opencode chat --yolo

Desktop App

  • Add "Danger Zone" tab in Settings dialog
  • Toggle switch with prominent warning:

    Warning: YOLO mode skips ALL permission prompts. OpenCode will execute file changes, bash commands, and other operations without asking for confirmation. Use at your own risk.

Safety Considerations

  • Clear warning messaging in both CLI and Desktop
  • Not enabled by default
  • Session-based (does not persist across restarts unless configured)
  • 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
  • [ ] 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

mguttmann avatar Jan 17 '26 10:01 mguttmann