Repository navigation
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Closest related: #33585 (LLM command-approval classifier — a different, complementary idea). The existing --yolo and --dangerously-skip-permissions flags in tui.ts:113 / run.ts:249 already implement this internally, but they are hidden from --help and undocumented, so users don't know they exist.
Describe the enhancement you want to request
Problem
OpenCode's permission model today is per-rule binary: allow / ask / deny (packages/opencode/src/permission/index.ts:33, 75, 80, 149). For autonomous / unattended agent runs (CI jobs, cron-driven tasks, background sweeps), the "ask" branch is a deadlock — there's no human in the loop to answer. Today the only workarounds are:
- The
--autoCLI flag (documented as"dangerous!", easy to miss) - Hidden
--yolo/--dangerously-skip-permissionsflags that don't show in--help - The Settings → Auto-accept toggle, which has the persistence bugs filed in [Bug] Auto-approve permissions toggle resets to OFF after restart #27487 / fix(app): pending permissions are not auto-accepted after page refresh #20998 / [Web UI] "Auto-accept permissions" button is disabled when "New layout and design" is enabled. #31137
Compare this to Claude Code, which exposes a clear, documented, three-tier model: default / auto / bypass permissions. Users know the modes exist and know what each one means.
Proposed enhancement
Add a first-class, documented full-auto mode with three surface-level entry points:
-
CLI: promote
--auto(already exists) out of "dangerous!" framing and document it properly in--help. Add an alias--full-autoand a config-file equivalentopencode.jsonkey"permissions": { "mode": "full-auto" }. -
Desktop / Web UI: a single "Full-auto (no prompts)" option alongside the existing "Auto-accept permissions" toggle, with a clear confirmation dialog explaining what's about to be allowed. Reuse the existing
command.permissions.autoaccept.*i18n slots. -
Scope: when
full-autois on, all tool/permission prompts are resolved toallowexcept any rule explicitly set todenyin config. This is exactly the semantic of the hidden--dangerously-skip-permissionsflag — just promoted to a real, supported, documented surface.
Why this matters
- Autonomous agents are a core use case for terminal-coding CLIs in 2026. Asking users to discover a hidden
--yoloflag or to script around the UI toggle is hostile. - This is a small, well-scoped change: the underlying behavior already exists in the hidden flags. The work is mostly docs + UX surfacing.
- Claude Code, Codex, and others already ship this. OpenCode is the odd one out for not documenting its equivalent.
Benefits
- Unattended CI / cron workflows become viable without per-invocation workarounds.
- Users can set the mode once in config instead of toggling per-session.
- Reduces bug-report noise from users (like me) who hit "stuck on permission prompt" because the existing auto-approve doesn't survive a restart.
Acceptance criteria
-
--helpontuiandrundocuments--autowithout the"dangerous!"scare language. -
opencode.jsonschema acceptspermissions.mode: "default" | "auto" | "full-auto". - Desktop and Web UI expose a discoverable Full-auto toggle with confirmation.
- When
full-autois active,denyrules in config still win (so users retain a kill-switch). - README and docs.opencode.ai are updated.
Activity
github-actions commentedon Sep 25, 2026
This issue might be a duplicate of existing issues. Please check:
--dangerously-skip-permissions/ YOLO mode that this issue proposes surfacing and documenting.opencodejr commentedon Oct 28, 2026
Thanks for the detailed write-up! The request is for a documented, first-class "full-auto" permission mode: a config key for the default mode, a Desktop/Web toggle with a confirmation dialog, and explicit
denyrules still taking priority.The file paths you cite (
packages/opencode/src/...) are from v1. In current v2 (@opencode/cli), some of this already exists:--autois shown in--helpfor bothopencodeandopencode runas "Auto-approve permissions that are not explicitly denied", without the "dangerous!" wording.--yoloand--dangerously-skip-permissionsare hidden flags that do the same thing."deny"rules are still enforced. It also covers the TUI command-palette toggle (Enable/Disable auto-approve permissions) and theautoindicator.opencode run --auto "..."works. You can also set it in config and keep a deny list as a safety switch:{ "$schema": "https://opencode.ai/config.json", "permission": { "*": "allow", "bash": { "*": "allow", "rm *": "deny" } } }Still missing: a config key for the default mode, a Desktop/Web full-auto toggle with confirmation, and a
--full-autoalias. Maintainers will consider these.Related issues:
/approvecommand to change the approval mode at runtime