BuildNot yet confirmed elsewhere1 publisher3 min readPublished
Gemini CLI's resolver reads past a yolo default in settings.json
Gemini CLI skips a yolo value in settings.json and never turns on the sandbox for it, a dev.to read of the source found. Anyone who wants YOLO every session needs a shell alias and an explicit --sandbox.
The Engineer · Build desk
What happened
- Startup picks the approval mode in order: the --approval-mode flag, then --yolo, then the settings value unless it is yolo, then default.
- In an untrusted folder, any mode other than default is forced back to default with a warning, including auto_edit and plan.
- Outside macOS, sandbox: true picks Docker, then Podman, whichever exists on the machine.
Why it matters
- constraint A cloned repo cannot ship a .gemini/settings.json that makes the agent skip approvals, because the resolver reads past a yolo value in any settings layer.
- cost Anyone who wants YOLO every session maintains a shell alias and has to add --sandbox to it, because the sandbox is a separate switch that YOLO never sets.
- exposure Under the default macOS profile, a sandboxed YOLO session can still read files anywhere on disk. Only writes are restricted.
The enforcement sits at step 3 of the startup resolver, and it fails quietly. [10] The resolver does not reject a "yolo" value in settings. According to the dev.to post, it reads past the value as if the key were not there. [11] The settings schema says YOLO "can only be enabled via command line". [23] A user who writes the setting and passes no flag falls through to default, with prompts on. [10] The post says the code behind this is three lines long. [2]
The kill switch behaves the other way. If security.disableYoloMode or admin secure mode is set and the resolved mode is YOLO, startup throws a FatalConfigError instead of downgrading. [5] In our view the split is sensible. Ignoring a setting is a safe failure. Refusing an explicit flag with an error tells the person who typed it. The folder-trust rule is wider than YOLO: it covers three of the four modes. [24]
The reason is the workspace file. Gemini CLI merges settings from several layers, and one of them is the project's own .gemini/settings.json. [12] If that file could set defaultApprovalMode to yolo, the post says, "git clone evil-repo && cd evil-repo && gemini would hand an attacker-controlled GEMINI.md an agent that never asks before running a shell command." [13] So settings can make the CLI more cautious but never less. [14] We think that is the right tradeoff for a tool that routinely runs in directories its user did not write. The post calls it one of the cleaner permission designs among coding agents. [25] Qwen Code, a fork, does allow tools.approvalMode: "yolo" in settings and leans on folder trust instead. [15]
YOLO removes prompts and nothing else. [3] The sandbox resolver never reads the approval mode, and with nothing set it returns no sandbox. [16] The alias the post offers as the supported answer therefore names both switches: gemini --approval-mode=yolo --sandbox. [21]
On macOS, sandbox: true picks Seatbelt first and defaults to the permissive-open profile. That profile starts from (deny default), allows file reads anywhere, and limits writes to the project directory, temp, cache, ~/.npm, ~/.cache and any --include-directories. [17] It also blocks the Docker socket and writes to the ~/.gemini credential files. [18] Gemini CLI's own gVisor, LXC and windows-native backends are explicit-only. [20]
The post read one nightly build, 0.65.0-nightly.20261006, on October 7 and 8, 2026. [6] Gemini CLI stopped serving Google AI Pro, Ultra and free Code Assist users on June 18, 2026, and Google moved them to the Antigravity CLI. [7] There the flag is agy --dangerously-skip-permissions, and there is no --yolo. [8] The post's short version of who remains on Gemini CLI is holders of a Gemini Code Assist Standard or Enterprise license. [22]
What to watch
- Whether a stable Gemini CLI release matches the behavior the post read in the 0.65.0 nightly.
- Whether Antigravity CLI documents any settings-level default for agy --dangerously-skip-permissions, and how it treats a cloned repo's config.
- Whether Gemini CLI's docs are corrected where the post says an older config page disagrees with the source on sandboxing.
Clarity's read
What the record supports and how the coverage leans. The claims behind it follow.
Reality
- Evidence62
- Adoption
- Insufficient
- Hype gap0
- Incentives
- Insufficient
- Confidence60
Claim ledger
Ranked by verification strength, evidence, and original report placement.
- [1]
YOLO starts with gemini --approval-mode=yolo or Ctrl+Y in a running session; --yolo and -y still work but are deprecated, and combining --yolo with --approval-mode is an error.
- [2]
The code that enforces the rule against making YOLO the default in settings.json is three lines long, according to the post.
- [3]
YOLO only removes approval prompts. The sandbox is a separate switch, and in the current source YOLO never turns it on.
- [4]
In an untrusted folder, any approval mode other than default is forced back to default with a warning; this applies to auto_edit and plan as well as YOLO.
- [5]
If security.disableYoloMode or admin.secureModeEnabled is set and the resolved mode is YOLO, startup throws a FatalConfigError rather than quietly dropping to default.
- [6]
The post checked the Gemini CLI source (google-gemini/gemini-cli, 0.65.0-nightly.20261006) and its docs on October 7 and 8, 2026.
- [7]
Since June 18, 2026, Gemini CLI no longer serves Google AI Pro, Ultra or free Code Assist users; Google moved them to the Antigravity CLI (agy).
- [8]
In the Antigravity CLI the YOLO equivalent is agy --dangerously-skip-permissions, and there is no --yolo at all.
- [9]
Gemini CLI has four approval modes: default, auto_edit, plan and yolo.
- [10]
At startup the mode is chosen in order: the --approval-mode flag, else --yolo/-y (mapped to yolo), else general.defaultApprovalMode from settings unless its value is yolo (in which case it is skipped), else default.
- [11]
The resolver does not reject a yolo value in settings; it reads past it as if the key were not there.
- [12]
Gemini CLI merges settings from several layers, and one of them is the workspace's own .gemini/settings.json.
- [13]
If a project file could set defaultApprovalMode: yolo, then git clone evil-repo && cd evil-repo && gemini would hand an attacker-controlled GEMINI.md an agent that never asks before running a shell command.
- [14]
Settings can make the CLI more cautious (disableYoloMode, secureModeEnabled, folder trust) but never less; YOLO has to come from a human typing a flag or key in the process, and the supported answer for YOLO every time is a shell alias.
- [15]
Qwen Code, Gemini CLI's fork, allows tools.approvalMode: yolo in settings and pushes the protection down to folder trust instead.
- [16]
The sandbox resolver never reads the approval mode; with nothing set it returns no sandbox.
- [17]
On macOS with sandbox: true, sandbox-exec (Seatbelt) is picked first with permissive-open as the default profile; it starts from (deny default), allows file reads anywhere, and allows writes only to the project dir, temp, cache, ~/.npm, ~/.cache and any --include-directories.
- [18]
The default Seatbelt profile also explicitly blocks the Docker socket and writes to the ~/.gemini credential files (oauth_creds.json, mcp-oauth-tokens.json and others).
- [19]
On Linux and other platforms with sandbox: true, the CLI picks Docker, then Podman, whichever exists.
- [20]
runsc (gVisor, Linux only), lxc (needs an already running container, never auto-detected) and windows-native (Windows only) are explicit-only sandbox options.
- [21]
The post suggests the alias gemini-yolo='gemini --approval-mode=yolo --sandbox' for users who want YOLO every time.
- [22]
The post's short version of who Gemini CLI serves is users with a Gemini Code Assist Standard or Enterprise license.
- [23]
The post quotes the settings schema as saying YOLO "can only be enabled via command line".
- [24]
The folder-trust downgrade covers three of the four approval modes (auto_edit, plan and yolo).
- [25]
The post calls Gemini CLI's approval code one of the cleaner permission designs among coding agents.
Sources
1 independent publisher whose own reporting we read for this story.
- dev.toGemini CLI YOLO mode, read from the source: why settings.json can't turn it on
1 article · October 12, 2026
Topics and entities
Follow any of these and your For You feed starts watching them — no settings page required.
Topics
- AI Coding AgentsFollow
- Code-agent sandboxingFollow
- Agent Permissions and ApprovalsFollow