---
title: "How to Enable YOLO Mode in Gemini CLI | AgentRQ Guidelines"
url: https://agentrq.com/guidelines/yolo-mode/gemini-cli
description: "Gemini CLI YOLO mode: gemini --approval-mode=yolo (--yolo is deprecated), Ctrl+Y, why settings.json can't default to it, the sandbox, and Code Assist."
---

![](https://agentrq.com/assets/agent-icons/gemini-cli.png) Checked October 7, 2026 | [All YOLO Mode guides](https://agentrq.com/guidelines/yolo-mode/)

# How to Enable YOLO Mode in Gemini CLI

To run Gemini CLI in YOLO mode, start it with `gemini --approval-mode=yolo`, or press **Ctrl+Y** in a running session. The older `gemini --yolo` and `-y` still work, but Google's CLI reference now marks them deprecated. YOLO approves every tool call. It does not turn on the sandbox for you.

This page is one of our [YOLO mode guides](https://agentrq.com/guidelines/yolo-mode/), and part of our guide to [YOLO mode in every coding agent](https://agentrq.com/blog/what-is-yolo-mode-and-how-to-turn-it-on-in-every-coding-agent). Everything below was checked against the Gemini CLI source (google-gemini/gemini-cli, 0.65.0 nightly of October 6, 2026), its docs, and Google's Gemini Code Assist documentation on October 7, 2026.

![Gemini CLI YOLO mode at a glance: gemini --approval-mode=yolo, Ctrl+Y, auto_edit, the sandbox flag, and per-task YOLO in AgentRQ](https://agentrq.com/assets/guidelines/yolo-mode-gemini-cli-og.png)

## Who Can Still Use Gemini CLI

Since June 18, 2026, Gemini CLI no longer serves Google AI Pro, Google AI Ultra or free Gemini Code Assist users. Google moved them to the Antigravity CLI, `agy`, which has its own [YOLO setting](https://agentrq.com/guidelines/yolo-mode/antigravity). Gemini CLI is still developed and still works for Gemini Code Assist Standard and Enterprise license holders, so this page is for those users.

## What YOLO Mode Turns Off in Gemini CLI

YOLO turns off approval prompts. Gemini CLI then edits files, runs shell commands and calls MCP tools without asking.

It does not change the sandbox. Gemini CLI's sandbox runs the agent's tools in a container or under macOS Seatbelt, and it is off unless you turn it on. One of Gemini CLI's own configuration pages says the sandbox is enabled by default when you use `--yolo`, but in the current source the sandbox settings never look at the approval mode. To be sure, turn it on yourself:

bash

```bash
gemini --approval-mode=yolo --sandbox
```

## How to Enable YOLO Mode in Gemini CLI Natively

| Where | Full YOLO | Halfway |
| --- | --- | --- |
| Command line | `gemini --approval-mode=yolo` | `gemini --approval-mode=auto_edit` |
| Old flag | `gemini --yolo` or `-y` (deprecated) |  |
| In a session | Ctrl+Y | Shift+Tab |
| settings.json | not possible | `"defaultApprovalMode": "auto_edit"` |
| VS Code (Code Assist) | `"geminicodeassist.agentYoloMode": true` |  |

### The gemini --yolo Command

bash

```bash
gemini --approval-mode=yolo
```

`--approval-mode` takes `default`, `auto_edit`, `plan` or `yolo`. `--yolo` and `-y` do the same as `--approval-mode=yolo` and still work, but they are deprecated. Do not combine `--yolo` with `--approval-mode`. Gemini CLI treats that as an error.

### Toggle YOLO Mode With Ctrl+Y

In a running session, **Ctrl+Y** switches between YOLO and the default mode. **Shift+Tab** cycles default, `auto_edit` and plan mode (when plan mode is enabled). From YOLO, Shift+Tab drops you to `auto_edit`.

### Why YOLO Cannot Be the Default in settings.json

Gemini CLI deliberately does not let you save YOLO. `general.defaultApprovalMode` in `settings.json` accepts only `default`, `auto_edit` and `plan`, and the schema says YOLO "can only be enabled via command line". A `"yolo"` value there is ignored. If you want YOLO every time, use a shell alias:

bash

```bash
alias gemini-yolo='gemini --approval-mode=yolo --sandbox'
```

### When YOLO Mode Is Blocked

Three things stop YOLO from starting:

- → `"security": {"disableYoloMode": true}` in settings, which turns it off on purpose.
- → `admin.secureModeEnabled`, which an administrator can set. It blocks YOLO and "Always allow".
- → An untrusted folder. When folder trust is enabled (`security.folderTrust.enabled`), Gemini CLI resets any mode other than default in a folder you have not trusted.

### The Halfway Options in Gemini CLI

- → **auto_edit.** `--approval-mode=auto_edit` approves file edits and still asks before shell commands.
- → **Allowed tools.** `tools.allowed` lists tools that skip the prompt, such as `run_shell_command(git)`.
- → **Policy files.** The recommended way is the policy engine: TOML files in `~/.gemini/policies/` with rules that `allow`, `deny` or `ask_user`, which can be scoped to a mode such as YOLO. The old `--allowed-tools` flag is deprecated in its favour.

### YOLO Mode in Gemini Code Assist for VS Code

The Gemini Code Assist extension's agent mode has its own switch. Open your user `settings.json` and add:

json

```json
{
  "geminicodeassist.agentYoloMode": true
}
```

Then run **Developer: Reload Window**. It only works in a trusted workspace. In a restricted one, the agent still asks. In IntelliJ, the matching option is **Auto-approve changes** under the agent options.

## How to Enable YOLO Mode in Gemini CLI Through AgentRQ

Gemini CLI's own YOLO switch covers a whole session. AgentRQ lets you make the decision per task, and answer from somewhere other than the terminal.

### Approve From the AgentRQ Task Instead of the Terminal

Connect Gemini CLI to an AgentRQ workspace through the [ACP Gateway](https://agentrq.com/docs/connect-acp-agent) ([Gemini CLI setup guide](https://agentrq.com/docs/agents/gemini-cli), or the [step-by-step post](https://agentrq.com/blog/agentrq-acp-gateway-gemini-cli)):

bash

```bash
npx @agentrq/acp-gateway@latest --agent gemini
```

Then start it without `--approval-mode=yolo`. The gateway also moves each new session out of any mode that would approve on its own and into one where Gemini CLI asks a person. Each permission request now shows up in the AgentRQ task on the web, on your phone or in Slack, together with the command or edit it is asking about. Answer **Allow Once**, **Always Allow** or **Deny** from wherever you are, and Gemini CLI carries on. If nobody answers within 30 minutes, the gateway cancels the turn instead of guessing. Change the limit with `--permission-timeout`.

### Turn On YOLO for One Task

Flip the **YOLO** toggle on a task, or when you create it, to put just that task in [YOLO mode](https://agentrq.com/features/yolo-mode). Every permission request in it is approved automatically and Gemini CLI never waits, while every other task in the workspace still asks. [Scheduled tasks](https://agentrq.com/features/task-scheduling), [event triggers](https://agentrq.com/features/events) and [workflow](https://agentrq.com/features/workflows) steps have the same switch, so an unattended job can run in YOLO while your interactive work stays supervised.

### A Safe YOLO Setup for Gemini CLI

- → **Allow the boring tools, not everything.** **Always Allow** adds the tool to the workspace's auto-approved list, so the routine calls stop asking and the risky ones still do. Prune that list in workspace settings now and then.
- → **Leave the workspace-wide switch off.** Workspace settings also has **YOLO Mode (Execute All)**. Turn YOLO on per task instead, so it never outlives the job you trusted.
- → **Add the sandbox.** Set `GEMINI_SANDBOX=true` or `"tools": {"sandbox": true}` so the agent runs in a container even when AgentRQ approves everything for a task.
- → **Commit first.** Start every YOLO task from a clean git tree, so any change is one `git reset` away.
- → **Read the record.** The [tool call history](https://agentrq.com/features/tool-call-history) lists every call the task made, including the ones that were auto-approved.

## FAQ

**What is gemini --yolo?** The older flag for YOLO mode in Gemini CLI. It still works, but `--approval-mode=yolo` replaces it.

**How do I enable YOLO mode in Gemini CLI?** Start it with `gemini --approval-mode=yolo`, or press Ctrl+Y in a running session.

**Can I set YOLO as the default in Gemini CLI settings.json?** No. `defaultApprovalMode` only accepts default, auto_edit and plan. Use a shell alias instead.

**What does Ctrl+Y do in Gemini CLI?** It toggles YOLO mode on and off in the running session.

**Does Gemini CLI YOLO mode enable the sandbox?** Not in the current source. Add `--sandbox`, or set `GEMINI_SANDBOX`, to be sure.

**Why is YOLO mode disabled in my Gemini CLI?** Either `security.disableYoloMode` or admin secure mode is set, or you are in a folder Gemini CLI does not trust.

**How do I approve Gemini CLI commands remotely?** Connect Gemini CLI to [AgentRQ](https://agentrq.com) through the ACP Gateway. Its permission requests show up in the task on the web, your phone or Slack.

For every other agent, see [what YOLO mode is and how to turn it on in every coding agent](https://agentrq.com/blog/what-is-yolo-mode-and-how-to-turn-it-on-in-every-coding-agent).
