OpenCode YOLO Mode: Does opencode Have One? Permissions Explained
By CodeAgentSwarm · Updated October 31, 2026
--yolo and no dangerously-skip-permissions flag, but opencode does ship --auto, which approves every permission request that a rule does not explicitly deny. For anything permanent, opencode reads how much freedom you gave it from its permission configuration: in a config file you decide which kinds of actions run automatically, which ask first, and which are blocked. --auto or an all-allow config is the closest thing to "YOLO mode", and both carry the same risks as any bypass flag.
This guide explains how the flag and the config work together, what genuinely goes wrong when you allow everything, and how to get full-auto speed without losing control. That last part is where CodeAgentSwarm comes in: it does not add a Turbo Mode toggle for opencode, because opencode handles autonomy with its own flag and config, but it does keep a permissive opencode session supervised with live diffs, desktop notifications and searchable history.What "YOLO mode" means, and the short answer for opencode
opencode bypass permissions: is there a flag?
Yes: --auto. Start opencode --auto, or opencode run --auto for a one-off task, and opencode approves every permission request that is not explicitly denied. There is no --yolo and no dangerously-skip-permissions option. For a lasting setting, use opencode.json: set each action type to allow, ask or deny, or set "permission": "allow" to allow everything at once.
# Interactive session
opencode --auto
# One-off task
opencode run --auto "Run the tests and fix the failures"
"YOLO mode" is the community nickname for running a coding agent with approvals bypassed, so it works without stopping to ask you. The name comes from tools like Claude Code and Codex, where a single flag turns the prompts off. The idea stuck because it captures the feeling: you only live once, so turn the prompts off and let the agent run.
The short answer for opencode is the --auto flag, described in the official opencode permissions docs (checked October 31, 2026). It only changes requests that would otherwise ask for approval, so explicit deny rules are still enforced. In the TUI you can also choose Enable auto-approve permissions or Disable auto-approve permissions to switch mode during a session.
For a setting that applies to every session, the answer is a config file. You tell opencode which kinds of actions auto-run, which ask first, and which are denied, and it behaves accordingly on every session.
Check what still asks before you reach for --auto. According to the official docs, most opencode permissions already default to allow. doom_loop and external_directory default to ask, and reading .env files needs approval. So --auto mainly removes those prompts plus any ask rules you added yourself.
If your real goal is running several opencode agents at once rather than just one in full auto, the opencode agent swarm guide covers that side, and the broader AI CLI agent swarm overview compares it across every CLI.
How opencode permissions actually work
Lasting opencode autonomy lives in configuration; --auto only changes the session you start with it. Permissions are defined in opencode.json. There is a global config at ~/.config/opencode/opencode.json, plus project-level config and per-agent config, so different agents can run with different amounts of freedom. A trusted refactor agent can run freer than a general one, and your day job repo can stay stricter than a side project.
The values follow an allow, ask, deny pattern per action type. You decide, for example, that file edits run automatically while shell commands stop to ask first. A minimal config looks like this:
{
"permission": {
"edit": "allow",
"bash": "ask"
}
}Treat this as illustrative. The exact keys and values evolve between opencode versions, and the schema grows over time, so the official opencode docs are the source of truth for what your installed version supports. Do not copy a config you saw in an old post without checking it against the current docs.
Setting everything to allow, with "permission": "allow", is the config version of --auto. It makes opencode read, write and run commands on its own, with no prompt in between. The speed is real, and so is the risk: an all-allow config carries exactly the same danger as any bypass flag, because there is nothing left to stop a destructive command.
How this differs from Claude Code and Codex
Claude Code has --dangerously-skip-permissions and Codex has --yolo, which also drops the Codex sandbox. opencode --auto is narrower: explicit deny rules still block. The CodeAgentSwarm Claude Code YOLO Turbo Mode guide walks through the Claude model in detail.
opencode's config-driven approach is arguably saner. The permissive state is explicit, versionable and scoped: it lives in a file you can read, commit and share, rather than a flag someone types in a hurry and forgets. You can see at a glance which actions your project auto-approves, and you can keep that policy consistent across every session instead of relying on remembering to add or drop a flag each time.
The real risks of allowing everything
These are not hypotheticals. With everything set to allow, opencode runs on a live repo with a real Git history and real data, and any of these can happen inside a single session with no prompt to catch it first.
- Git push to the wrong branch - opencode decides to commit and push half-finished work to main, or force-pushes and overwrites a teammate.
- Deleting files or directories - A misread instruction turns into
rm -rfon a path you did not mean to remove. - Irreversible shell commands -
DROP TABLE,docker system prune, or anything that cannot be undone once it runs. - Installing the wrong dependency -
npm installon a typosquatted or compromised package that looked correct at a glance. - Unintended network calls - Hitting production endpoints, sending data to external services, or triggering webhooks you did not expect.
- Overwriting uncommitted work - opencode edits files you were mid-change on, and your uncommitted work is gone before you notice.
An all-allow config, or --auto with no deny rules, is exactly as dangerous as any YOLO flag. The advantage of opencode is that deny rules survive --auto: you can let file edits run while git push or rm stay denied, so the safe work flies through while the dangerous commands still stop.
Full auto is not bad in itself. It is the right setting for a lot of work. The risk comes from setting everything to allow without keeping the genuinely dangerous operations gated. The next section is about doing exactly that.
How to run opencode full auto safely
There are a few approaches, from least controlled to most. The goal is the same throughout: keep full-auto speed on the safe operations while never letting a destructive command run unattended.
Method 1: allow everything on throwaway work
Start opencode --auto or set every permission to allow, and let opencode run unattended. This is fine for scratch projects and disposable branches, where you are confident nothing destructive can matter and you can throw the whole thing away. On a real repo with real history, running fully open is a gamble, because a single misread instruction reaches Git, deletions, and the network with no prompt in the way.
Method 2: a selective permission config (the sweet spot)
A better baseline is a selective config. Allow file edits and reads so the routine work flies through, but keep shell commands, or at least the destructive ones, on ask. Set this per project or per agent, so a trusted refactor agent runs freer than a general one, and your main repo stays stricter than a scratch project. Then put your house rules in AGENTS.md, the cross-tool instructions file, so every session inherits the same standing guidance without you repeating it.
This is the sweet spot because it keeps the parts of full auto that actually save time while gating the handful of actions that cause real damage. Unlike a single bypass flag, you are not forced to choose between asking about everything and asking about nothing.
Method 3: run the permissive config inside CodeAgentSwarm (recommended for swarms)
To be clear: CodeAgentSwarm does not offer Turbo Mode for opencode sessions. opencode controls autonomy with its own --auto flag and permission config, so that is where you decide what auto-runs. What CodeAgentSwarm adds instead is supervision around your permissive opencode setup, so full-auto work is never a black box.
Here is what that supervision gives you on top of opencode:
- Several opencode terminals in one window - Run a whole opencode swarm side by side instead of juggling separate windows.
- Live per-terminal file diffs - Watch exactly what each opencode agent is changing in real time, so a permissive config never runs unseen.
- Desktop notifications - Get pinged when an agent finishes or stalls waiting for input, instead of babysitting each terminal.
- Dynamic titles - Each terminal shows what its agent is working on, so you can tell the swarm apart at a glance.
- Searchable, resumable history - Audit what an agent did after the fact and pick a session back up with opencode's own resume support.
The combination of a selective config plus real-time supervision is what makes a permissive opencode swarm workable. The config decides what auto-runs; CodeAgentSwarm makes sure you can see and audit every one of those runs. For running many opencode agents at once, the run multiple opencode sessions guide covers the setup end to end.
Per-project config means your day job repo can stay strict while a side project runs wide open, and CodeAgentSwarm shows both kinds of terminal side by side in the same window, each with its own live diff.
Best practices for full-auto opencode runs
Whichever method you use, these habits keep the worst full-auto accidents off the table:
- Always work on a feature branch, never main. If opencode makes a mess, you throw the branch away. If it messes up main, the whole team feels it.
- Commit before starting a permissive run. A clean restore point means
git checkout .brings you straight back if something goes wrong. - Keep destructive Git and shell actions on ask. Even with everything else set to allow, push, force-push, merge, branch delete, and irreversible shell commands should still stop for confirmation. If you start with
--auto, ask rules are approved automatically, so set these to deny instead. These are the highest-impact, hardest-to-undo actions. - Put standing instructions in AGENTS.md. House rules in the shared instructions file mean every opencode session inherits the same guardrails without you repeating them.
- Watch the live diff. A per-terminal file change view turns a permissive config from a black box into something you can actually supervise.
- Keep prompts focused. "Refactor the auth middleware to use JWT" is far safer in full auto than "improve the codebase". The tighter the scope, the less room opencode has to go off-script.
A selective config plus a feature branch plus a live diff gives you almost all of the full-auto speed with almost none of the risk. Most people who set this up never go back to allowing everything on a real repo.
FAQ
Does opencode have a YOLO mode?
Close to it. The --auto flag approves every permission request that is not explicitly denied, and setting "permission": "allow" in opencode.json does the same for every session. There is no --yolo or dangerously-skip-permissions flag, and deny rules still apply under --auto.
Is there an opencode --yolo or --full-auto flag?
No. opencode has no --yolo, no --full-auto and no dangerously-skip-permissions flag. Its equivalent is --auto: opencode --auto, or opencode run --auto, approves every permission request that a rule does not explicitly deny. For a permanent setting, use the permission settings in opencode.json.
How do I make opencode run without asking for approval?
Start it with opencode --auto, or opencode run --auto for a one-off task. For every session, set permissions to allow in opencode.json: "permission": "allow" allows everything, while { "permission": { "edit": "allow", "bash": "ask" } } keeps shell commands on ask. Check the official opencode docs for the schema your installed version supports.
How do I bypass permissions in opencode?
Use the --auto flag, which approves every request that is not explicitly denied, or set permissions to allow in opencode.json. Explicit deny rules still block under --auto, which is the main difference from Claude Code --dangerously-skip-permissions. Check the official opencode docs for the schema your installed version supports.
Does opencode have a --dangerously-skip-permissions flag?
No. That flag belongs to Claude Code, and Codex uses --yolo. The closest opencode equivalent is --auto, which keeps explicit deny rules in force. Lasting allow, ask and deny behaviour lives in opencode.json.
How do I make opencode skip permission prompts?
Start opencode with --auto, or set the action types you want unattended to allow in opencode.json, either globally at ~/.config/opencode/opencode.json or per project and per agent. A selective config is the safer version: allow file edits so routine work flies through, and keep shell and destructive Git actions on ask, or on deny if you use --auto.
Is it safe to set all opencode permissions to allow?
An all-allow config, or --auto without deny rules, is fast but exactly as dangerous as any YOLO flag: opencode can run git push, rm -rf, or DROP TABLE with no prompt. It is reasonable on a throwaway branch. On a real repo, allow file edits and keep risky shell and Git actions on ask (or deny with --auto), and supervise the run with live diffs.
Where does opencode's permission config live?
The global config is at ~/.config/opencode/opencode.json, following the XDG layout. There is also project-level config and per-agent config, so different agents and different repos can run with different amounts of freedom. Standing instructions go in AGENTS.md, the cross-tool instructions file that every session inherits.
How is opencode --auto different from Codex --yolo or Claude Code --dangerously-skip-permissions?
Claude Code --dangerously-skip-permissions and Codex --yolo skip their checks for that run, and Codex --yolo also drops its sandbox. opencode --auto only approves requests that would otherwise ask, so explicit deny rules still block. Its lasting policy lives in opencode.json, a file you can read and commit, rather than a flag someone types in a hurry and forgets.
Does CodeAgentSwarm have Turbo Mode for opencode?
No. CodeAgentSwarm does not offer Turbo Mode for opencode sessions; opencode handles autonomy with its own --auto flag and permission config. What CodeAgentSwarm adds for opencode is supervision: live per-terminal diffs, desktop notifications when an agent finishes or stalls, dynamic titles, and searchable, resumable history.
Can opencode delete files or push to the wrong branch in full auto?
Yes, if you allow it. With shell and Git actions set to allow, or with --auto and no deny rules, opencode can run rm -rf, overwrite uncommitted work, and commit or force-push to the wrong branch, all without asking. Keeping destructive Git and shell actions on ask (deny under --auto), working on a feature branch, and committing before a run are the guardrails that prevent the most common accidents.