---
title: "How to Enable YOLO Mode in Qwen Code | AgentRQ Guidelines"
url: https://agentrq.com/guidelines/yolo-mode/qwen-code
description: "Qwen Code YOLO mode: qwen --approval-mode=yolo, /approval-mode yolo, Shift+Tab, tools.approvalMode in settings.json, the sandbox, and safer modes."
---

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

# How to Enable YOLO Mode in Qwen Code

To run Qwen Code in YOLO mode, start it with `qwen --approval-mode=yolo` (or `qwen --yolo`), or press **Shift+Tab** until the mode reads yolo. Unlike Gemini CLI, which Qwen Code grew out of, Qwen Code lets you save YOLO as your default. And Ctrl+Y does something else here.

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 Qwen Code source and docs (QwenLM/qwen-code, version 0.25.0) on October 7, 2026.

![Qwen Code YOLO mode at a glance: qwen --approval-mode=yolo, /approval-mode yolo, Shift+Tab, tools.approvalMode, and per-task YOLO in AgentRQ](https://agentrq.com/assets/guidelines/yolo-mode-qwen-code-og.png)

## What YOLO Mode Turns Off in Qwen Code

YOLO turns off approval prompts. Qwen Code then edits files and runs commands without asking.

It does not turn on the sandbox. Qwen Code's docs are explicit that `--yolo` "does not automatically enable a sandbox". If you run YOLO headless without a sandbox, Qwen Code prints a warning to stderr (set `QWEN_CODE_SUPPRESS_YOLO_WARNING=1` to hide it). If you do turn the sandbox on, its read-only rules still apply in YOLO mode.

## How to Enable YOLO Mode in Qwen Code Natively

| Where | Full YOLO | Halfway |
| --- | --- | --- |
| Command line | `qwen --approval-mode=yolo` or `--yolo` | `--approval-mode=auto-edit` or `auto` |
| In a session | `/approval-mode yolo`, or Shift+Tab | `/approval-mode auto-edit` |
| settings.json | `"tools": {"approvalMode": "yolo"}` | `"approvalMode": "auto-edit"` |
| Rules |  | `"permissions": {"allow": [...]}` |

### The qwen --yolo Command

bash

```bash
qwen --approval-mode=yolo
```

`--yolo` does the same, but Qwen Code's docs recommend the `--approval-mode` form. Don't combine the two. The modes are `plan`, `default`, `auto-edit`, `auto` and `yolo`.

### Switch Qwen Code to YOLO Mode in a Session

Type `/approval-mode yolo` to switch the running session. Add `--project` or `--user` to save the choice to your project or user settings at the same time.

**Shift+Tab** (Tab on Windows) cycles plan, default, auto-edit, auto and yolo.

**Ctrl+Y is not YOLO in Qwen Code.** In Gemini CLI it toggles YOLO, but in Qwen Code it retries the last failed request.

### Make YOLO the Default in settings.json

Put this in `.qwen/settings.json` in your project, or in your user settings file:

json

```json
{
  "tools": {
    "approvalMode": "yolo"
  }
}
```

Qwen Code's docs disagree with themselves about which mode is the default today (one page says `auto`, another says the ask-first mode), so if the default matters to you, set it explicitly.

### The Halfway Options in Qwen Code

- → **auto-edit** approves file edits and writes, and still asks before shell commands.
- → **auto** has a model classify each action and only asks about the risky ones.
- → **Permission rules.** `permissions.allow`, `permissions.ask` and `permissions.deny` take rules such as `"Bash(git *)"`. The older `tools.allowed` is deprecated.

## How to Enable YOLO Mode in Qwen Code Through AgentRQ

Qwen Code'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 Qwen Code to an AgentRQ workspace through the [ACP Gateway](https://agentrq.com/docs/connect-acp-agent) ([Qwen Code setup guide](https://agentrq.com/docs/agents/qwen-code)):

bash

```bash
npx @agentrq/acp-gateway@latest --agent qwen-code
```

Then start it without `--approval-mode=yolo`. The gateway also moves each new session out of any mode that would approve on its own, such as `auto` or `yolo`, and into one where Qwen Code 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 Qwen Code 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 Qwen Code 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 Qwen Code

- → **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.** Start Qwen Code with `--sandbox` or set `QWEN_SANDBOX`, because YOLO never turns it on for you.
- → **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

**How do I enable YOLO mode in Qwen Code?** Start it with `qwen --approval-mode=yolo`, type `/approval-mode yolo` in a session, or press Shift+Tab until the mode reads yolo.

**Does Ctrl+Y enable YOLO in Qwen Code?** No. In Qwen Code, Ctrl+Y retries the last failed request. Use Shift+Tab or `/approval-mode yolo`.

**Can I make YOLO the default in Qwen Code?** Yes. Set `"tools": {"approvalMode": "yolo"}` in settings.json, or run `/approval-mode yolo --user`.

**Does Qwen Code YOLO mode use the sandbox?** No. Turn it on yourself with `--sandbox` or `QWEN_SANDBOX`.

**How do I approve Qwen Code commands remotely?** Connect Qwen Code 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).
