Skip to content

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

Draft
denysvitali wants to merge 1 commit intoanomalyco:devfrom
denysvitali:feat/yolo-mode-clean
Draft

feat: add --yolo flag for auto-approving permissions in web/serve mode#12684
denysvitali wants to merge 1 commit intoanomalyco:devfrom
denysvitali:feat/yolo-mode-clean

Conversation

@denysvitali
Copy link

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.

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:
- Headless/automated deployments
- CI/CD pipelines
- Development environments where interactive prompts are not desired
- Remote access scenarios where the web UI handles permission decisions

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.
@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2026

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2026

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicates Found:

  1. PR feat(permission): add YOLO mode to auto-approve all permission prompts #11833 - feat(permission): add YOLO mode to auto-approve all permission prompts

  2. PR feat: add --dangerously-skip-permissions flag #7137 - feat: add --dangerously-skip-permissions flag

Recommendation: Check PR #11833 first as it appears to be addressing the exact same feature (YOLO mode for auto-approving permissions). You may want to coordinate with that PR or verify if one should be closed in favor of the other.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant