[PR #12684] feat: add --yolo flag for auto-approving permissions in web/serve mode #14327

Open
opened 2026-02-16 18:19:08 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/12684

State: open
Merged: No


Add a --yolo CLI flag to both opencode web and opencode serve commands that automatically approves all permission requests without prompting the user.

This is useful for sandboxed environments to allow the user to run OpenCode in a similar fashion to claude's --dangerously-bypass-permissions.

Implementation:

  • Added yolo boolean option to shared network options in network.ts
  • Created applyYoloMode() helper that sets OPENCODE_PERMISSION env var with all permissions set to "allow" (bash, edit, read, glob, grep, list, task, webfetch, websearch, lsp, skill, etc.)
  • Both web.ts and serve.ts call applyYoloMode() before server startup

Usage:

opencode web --yolo 
opencode serve --yolo

Built exclusively with openrouter/pony-alpha and OpenCode.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/12684 **State:** open **Merged:** No --- Add a `--yolo` CLI flag to both `opencode web` and `opencode serve` commands that automatically approves all permission requests without prompting the user. This is useful for sandboxed environments to allow the user to run OpenCode in a similar fashion to `claude`'s `--dangerously-bypass-permissions`. Implementation: - Added `yolo` boolean option to shared network options in `network.ts` - Created `applyYoloMode()` helper that sets `OPENCODE_PERMISSION` env var with all permissions set to "allow" (bash, edit, read, glob, grep, list, task, webfetch, websearch, lsp, skill, etc.) - Both `web.ts` and `serve.ts` call `applyYoloMode()` before server startup Usage: ``` opencode web --yolo opencode serve --yolo ``` Built exclusively with openrouter/pony-alpha and OpenCode.
yindo added the pull-request label 2026-02-16 18:19:08 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14327