@qwen-code/qwen-code 0.14.5-nightly.20260420.60a6dfc14 → 0.14.5-preview.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -77,15 +77,16 @@ Settings are organized into categories. All settings should be placed within the
77
77
 
78
78
  #### general
79
79
 
80
- | Setting | Type | Description | Default |
81
- | ------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
82
- | `general.preferredEditor` | string | The preferred editor to open files in. | `undefined` |
83
- | `general.vimMode` | boolean | Enable Vim keybindings. | `false` |
84
- | `general.enableAutoUpdate` | boolean | Enable automatic update checks and installations on startup. | `true` |
85
- | `general.showSessionRecap` | boolean | Show a 1-3 sentence summary of where you left off when returning to the terminal after being away for 5+ minutes. Use `/recap` to trigger manually. | `true` |
86
- | `general.gitCoAuthor` | boolean | Automatically add a Co-authored-by trailer to git commit messages when commits are made through Qwen Code. | `true` |
87
- | `general.checkpointing.enabled` | boolean | Enable session checkpointing for recovery. | `false` |
88
- | `general.defaultFileEncoding` | string | Default encoding for new files. Use `"utf-8"` (default) for UTF-8 without BOM, or `"utf-8-bom"` for UTF-8 with BOM. Only change this if your project specifically requires BOM. | `"utf-8"` |
80
+ | Setting | Type | Description | Default |
81
+ | ------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
82
+ | `general.preferredEditor` | string | The preferred editor to open files in. | `undefined` |
83
+ | `general.vimMode` | boolean | Enable Vim keybindings. | `false` |
84
+ | `general.enableAutoUpdate` | boolean | Enable automatic update checks and installations on startup. | `true` |
85
+ | `general.showSessionRecap` | boolean | Auto-show a one-line "where you left off" recap when returning to the terminal after being away. Off by default. Use `/recap` to trigger manually regardless of this setting. | `false` |
86
+ | `general.sessionRecapAwayThresholdMinutes` | number | Minutes the terminal must be blurred before an auto-recap fires on focus-in. Only used when `showSessionRecap` is enabled. | `5` |
87
+ | `general.gitCoAuthor` | boolean | Automatically add a Co-authored-by trailer to git commit messages when commits are made through Qwen Code. | `true` |
88
+ | `general.checkpointing.enabled` | boolean | Enable session checkpointing for recovery. | `false` |
89
+ | `general.defaultFileEncoding` | string | Default encoding for new files. Use `"utf-8"` (default) for UTF-8 without BOM, or `"utf-8-bom"` for UTF-8 with BOM. Only change this if your project specifically requires BOM. | `"utf-8"` |
89
90
 
90
91
  #### output
91
92
 
@@ -357,6 +358,39 @@ Permission rules for `Read`, `Edit`, and `WebFetch` are also enforced when the a
357
358
  > [!tip]
358
359
  > Use `/permissions` in the interactive CLI to view, add, and remove rules without editing `settings.json` directly.
359
360
 
361
+ #### slashCommands
362
+
363
+ Controls which slash commands are available in the CLI. Useful for locking down
364
+ the command surface in multi-tenant or enterprise deployments.
365
+
366
+ | Setting | Type | Description | Default |
367
+ | ------------------------ | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
368
+ | `slashCommands.disabled` | array of strings | Slash command names to hide and refuse to execute. Matched case-insensitively against the final command name (for extension commands this is the disambiguated form, e.g. `myext.deploy`). **Merged as a union across scopes**, so workspace settings can add to but not remove entries defined in user or system settings. | `undefined` |
369
+
370
+ The same denylist can also be provided via the `--disabled-slash-commands` CLI
371
+ flag (comma-separated or repeated) and the `QWEN_DISABLED_SLASH_COMMANDS`
372
+ environment variable; values from all three sources are unioned together.
373
+
374
+ **Example — lock down built-ins for a sandboxed deployment:**
375
+
376
+ ```json
377
+ {
378
+ "slashCommands": {
379
+ "disabled": ["auth", "mcp", "extensions", "ide", "quit"]
380
+ }
381
+ }
382
+ ```
383
+
384
+ With these values in a system-level `settings.json` (`/etc/qwen-code/settings.json`
385
+ or `QWEN_CODE_SYSTEM_SETTINGS_PATH`), users cannot shrink the denylist from
386
+ their own scope, and the disabled commands will not appear in autocomplete or
387
+ execute when typed.
388
+
389
+ > [!note]
390
+ > This setting only gates slash commands (e.g. `/auth`, `/mcp`). It does not
391
+ > affect tool permissions — see `permissions.deny` for that. It also does not
392
+ > intercept keyboard shortcuts such as `Ctrl+C` or `Esc`.
393
+
360
394
  #### mcp
361
395
 
362
396
  | Setting | Type | Description | Default |
@@ -519,25 +553,26 @@ For authentication-related variables (like `OPENAI_*`) and the recommended `.qwe
519
553
 
520
554
  ### Environment Variables Table
521
555
 
522
- | Variable | Description | Notes |
523
- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
524
- | `QWEN_TELEMETRY_ENABLED` | Set to `true` or `1` to enable telemetry. Any other value is treated as disabling it. | Overrides the `telemetry.enabled` setting. |
525
- | `QWEN_TELEMETRY_TARGET` | Sets the telemetry target (`local` or `gcp`). | Overrides the `telemetry.target` setting. |
526
- | `QWEN_TELEMETRY_OTLP_ENDPOINT` | Sets the OTLP endpoint for telemetry. | Overrides the `telemetry.otlpEndpoint` setting. |
527
- | `QWEN_TELEMETRY_OTLP_PROTOCOL` | Sets the OTLP protocol (`grpc` or `http`). | Overrides the `telemetry.otlpProtocol` setting. |
528
- | `QWEN_TELEMETRY_LOG_PROMPTS` | Set to `true` or `1` to enable or disable logging of user prompts. Any other value is treated as disabling it. | Overrides the `telemetry.logPrompts` setting. |
529
- | `QWEN_TELEMETRY_OUTFILE` | Sets the file path to write telemetry to when the target is `local`. | Overrides the `telemetry.outfile` setting. |
530
- | `QWEN_TELEMETRY_USE_COLLECTOR` | Set to `true` or `1` to enable or disable using an external OTLP collector. Any other value is treated as disabling it. | Overrides the `telemetry.useCollector` setting. |
531
- | `QWEN_SANDBOX` | Alternative to the `sandbox` setting in `settings.json`. | Accepts `true`, `false`, `docker`, `podman`, or a custom command string. |
532
- | `QWEN_SANDBOX_IMAGE` | Overrides sandbox image selection for Docker/Podman. | Takes precedence over `tools.sandboxImage`. |
533
- | `SEATBELT_PROFILE` | (macOS specific) Switches the Seatbelt (`sandbox-exec`) profile on macOS. | `permissive-open`: (Default) Restricts writes to the project folder (and a few other folders, see `packages/cli/src/utils/sandbox-macos-permissive-open.sb`) but allows other operations. `strict`: Uses a strict profile that declines operations by default. `<profile_name>`: Uses a custom profile. To define a custom profile, create a file named `sandbox-macos-<profile_name>.sb` in your project's `.qwen/` directory (e.g., `my-project/.qwen/sandbox-macos-custom.sb`). |
534
- | `DEBUG` or `DEBUG_MODE` | (often used by underlying libraries or the CLI itself) Set to `true` or `1` to enable verbose debug logging, which can be helpful for troubleshooting. | **Note:** These variables are automatically excluded from project `.env` files by default to prevent interference with the CLI behavior. Use `.qwen/.env` files if you need to set these for Qwen Code specifically. |
535
- | `NO_COLOR` | Set to any value to disable all color output in the CLI. | |
536
- | `CLI_TITLE` | Set to a string to customize the title of the CLI. | |
537
- | `CODE_ASSIST_ENDPOINT` | Specifies the endpoint for the code assist server. | This is useful for development and testing. |
538
- | `QWEN_CODE_MAX_OUTPUT_TOKENS` | Overrides the default maximum output tokens per response. When not set, Qwen Code uses an adaptive strategy: starts with 8K tokens and automatically retries with 64K if the response is truncated. Set this to a specific value (e.g., `16000`) to use a fixed limit instead. | Takes precedence over the capped default (8K) but is overridden by `samplingParams.max_tokens` in settings. Disables automatic escalation when set. Example: `export QWEN_CODE_MAX_OUTPUT_TOKENS=16000` |
539
- | `TAVILY_API_KEY` | Your API key for the Tavily web search service. | Used to enable the `web_search` tool functionality. Example: `export TAVILY_API_KEY="tvly-your-api-key-here"` |
540
- | `QWEN_CODE_PROFILE_STARTUP` | Set to `1` to enable startup performance profiling. Writes a JSON timing report to `~/.qwen/startup-perf/` with per-phase durations. | Only active inside the sandbox child process. Zero overhead when not set. Example: `export QWEN_CODE_PROFILE_STARTUP=1` |
556
+ | Variable | Description | Notes |
557
+ | ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
558
+ | `QWEN_TELEMETRY_ENABLED` | Set to `true` or `1` to enable telemetry. Any other value is treated as disabling it. | Overrides the `telemetry.enabled` setting. |
559
+ | `QWEN_TELEMETRY_TARGET` | Sets the telemetry target (`local` or `gcp`). | Overrides the `telemetry.target` setting. |
560
+ | `QWEN_TELEMETRY_OTLP_ENDPOINT` | Sets the OTLP endpoint for telemetry. | Overrides the `telemetry.otlpEndpoint` setting. |
561
+ | `QWEN_TELEMETRY_OTLP_PROTOCOL` | Sets the OTLP protocol (`grpc` or `http`). | Overrides the `telemetry.otlpProtocol` setting. |
562
+ | `QWEN_TELEMETRY_LOG_PROMPTS` | Set to `true` or `1` to enable or disable logging of user prompts. Any other value is treated as disabling it. | Overrides the `telemetry.logPrompts` setting. |
563
+ | `QWEN_TELEMETRY_OUTFILE` | Sets the file path to write telemetry to when the target is `local`. | Overrides the `telemetry.outfile` setting. |
564
+ | `QWEN_TELEMETRY_USE_COLLECTOR` | Set to `true` or `1` to enable or disable using an external OTLP collector. Any other value is treated as disabling it. | Overrides the `telemetry.useCollector` setting. |
565
+ | `QWEN_SANDBOX` | Alternative to the `sandbox` setting in `settings.json`. | Accepts `true`, `false`, `docker`, `podman`, or a custom command string. |
566
+ | `QWEN_SANDBOX_IMAGE` | Overrides sandbox image selection for Docker/Podman. | Takes precedence over `tools.sandboxImage`. |
567
+ | `SEATBELT_PROFILE` | (macOS specific) Switches the Seatbelt (`sandbox-exec`) profile on macOS. | `permissive-open`: (Default) Restricts writes to the project folder (and a few other folders, see `packages/cli/src/utils/sandbox-macos-permissive-open.sb`) but allows other operations. `strict`: Uses a strict profile that declines operations by default. `<profile_name>`: Uses a custom profile. To define a custom profile, create a file named `sandbox-macos-<profile_name>.sb` in your project's `.qwen/` directory (e.g., `my-project/.qwen/sandbox-macos-custom.sb`). |
568
+ | `DEBUG` or `DEBUG_MODE` | (often used by underlying libraries or the CLI itself) Set to `true` or `1` to enable verbose debug logging, which can be helpful for troubleshooting. | **Note:** These variables are automatically excluded from project `.env` files by default to prevent interference with the CLI behavior. Use `.qwen/.env` files if you need to set these for Qwen Code specifically. |
569
+ | `NO_COLOR` | Set to any value to disable all color output in the CLI. | |
570
+ | `CLI_TITLE` | Set to a string to customize the title of the CLI. | |
571
+ | `CODE_ASSIST_ENDPOINT` | Specifies the endpoint for the code assist server. | This is useful for development and testing. |
572
+ | `QWEN_CODE_MAX_OUTPUT_TOKENS` | Overrides the default maximum output tokens per response. When not set, Qwen Code uses an adaptive strategy: starts with 8K tokens and automatically retries with 64K if the response is truncated. Set this to a specific value (e.g., `16000`) to use a fixed limit instead. | Takes precedence over the capped default (8K) but is overridden by `samplingParams.max_tokens` in settings. Disables automatic escalation when set. Example: `export QWEN_CODE_MAX_OUTPUT_TOKENS=16000` |
573
+ | `TAVILY_API_KEY` | Your API key for the Tavily web search service. | Used to enable the `web_search` tool functionality. Example: `export TAVILY_API_KEY="tvly-your-api-key-here"` |
574
+ | `QWEN_CODE_UNATTENDED_RETRY` | Set to `true` or `1` to enable persistent retry mode. When enabled, transient API capacity errors (HTTP 429 Rate Limit and 529 Overloaded) are retried indefinitely with exponential backoff (capped at 5 minutes per retry) and heartbeat keepalives every 30 seconds on stderr. | Designed for CI/CD pipelines and background automation where long-running tasks should survive temporary API outages. Must be set explicitly — `CI=true` alone does **not** activate this mode. See [Headless Mode](../features/headless#persistent-retry-mode) for details. Example: `export QWEN_CODE_UNATTENDED_RETRY=1` |
575
+ | `QWEN_CODE_PROFILE_STARTUP` | Set to `1` to enable startup performance profiling. Writes a JSON timing report to `~/.qwen/startup-perf/` with per-phase durations. | Only active inside the sandbox child process. Zero overhead when not set. Example: `export QWEN_CODE_PROFILE_STARTUP=1` |
541
576
 
542
577
  ## Command-Line Arguments
543
578
 
@@ -548,42 +583,43 @@ For sandbox image selection, precedence is:
548
583
 
549
584
  ### Command-Line Arguments Table
550
585
 
551
- | Argument | Alias | Description | Possible Values | Notes |
552
- | ---------------------------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
553
- | `--model` | `-m` | Specifies the Qwen model to use for this session. | Model name | Example: `npm start -- --model qwen3-coder-plus` |
554
- | `--prompt` | `-p` | Used to pass a prompt directly to the command. This invokes Qwen Code in a non-interactive mode. | Your prompt text | For scripting examples, use the `--output-format json` flag to get structured output. |
555
- | `--prompt-interactive` | `-i` | Starts an interactive session with the provided prompt as the initial input. | Your prompt text | The prompt is processed within the interactive session, not before it. Cannot be used when piping input from stdin. Example: `qwen -i "explain this code"` |
556
- | `--system-prompt` | | Overrides the built-in main session system prompt for this run. | Your prompt text | Loaded context files such as `QWEN.md` are still appended after this override. Can be combined with `--append-system-prompt`. |
557
- | `--append-system-prompt` | | Appends extra instructions to the main session system prompt for this run. | Your prompt text | Applied after the built-in prompt and loaded context files. Can be combined with `--system-prompt`. See [Headless Mode](../features/headless) for examples. |
558
- | `--output-format` | `-o` | Specifies the format of the CLI output for non-interactive mode. | `text`, `json`, `stream-json` | `text`: (Default) The standard human-readable output. `json`: A machine-readable JSON output emitted at the end of execution. `stream-json`: Streaming JSON messages emitted as they occur during execution. For structured output and scripting, use the `--output-format json` or `--output-format stream-json` flag. See [Headless Mode](../features/headless) for detailed information. |
559
- | `--input-format` | | Specifies the format consumed from standard input. | `text`, `stream-json` | `text`: (Default) Standard text input from stdin or command-line arguments. `stream-json`: JSON message protocol via stdin for bidirectional communication. Requirement: `--input-format stream-json` requires `--output-format stream-json` to be set. When using `stream-json`, stdin is reserved for protocol messages. See [Headless Mode](../features/headless) for detailed information. |
560
- | `--include-partial-messages` | | Include partial assistant messages when using `stream-json` output format. When enabled, emits stream events (message_start, content_block_delta, etc.) as they occur during streaming. | | Default: `false`. Requirement: Requires `--output-format stream-json` to be set. See [Headless Mode](../features/headless) for detailed information about stream events. |
561
- | `--sandbox` | `-s` | Enables sandbox mode for this session. | | |
562
- | `--sandbox-image` | | Sets the sandbox image URI. | | |
563
- | `--debug` | `-d` | Enables debug mode for this session, providing more verbose output. | | |
564
- | `--all-files` | `-a` | If set, recursively includes all files within the current directory as context for the prompt. | | |
565
- | `--help` | `-h` | Displays help information about command-line arguments. | | |
566
- | `--show-memory-usage` | | Displays the current memory usage. | | |
567
- | `--yolo` | | Enables YOLO mode, which automatically approves all tool calls. | | |
568
- | `--approval-mode` | | Sets the approval mode for tool calls. | `plan`, `default`, `auto-edit`, `yolo` | Supported modes: `plan`: Analyze only—do not modify files or execute commands. `default`: Require approval for file edits or shell commands (default behavior). `auto-edit`: Automatically approve edit tools (edit, write_file) while prompting for others. `yolo`: Automatically approve all tool calls (equivalent to `--yolo`). Cannot be used together with `--yolo`. Use `--approval-mode=yolo` instead of `--yolo` for the new unified approach. Example: `qwen --approval-mode auto-edit`<br>See more about [Approval Mode](../features/approval-mode). |
569
- | `--allowed-tools` | | A comma-separated list of tool names that will bypass the confirmation dialog. | Tool names | Example: `qwen --allowed-tools "Shell(git status)"` |
570
- | `--telemetry` | | Enables [telemetry](/developers/development/telemetry). | | |
571
- | `--telemetry-target` | | Sets the telemetry target. | | See [telemetry](/developers/development/telemetry) for more information. |
572
- | `--telemetry-otlp-endpoint` | | Sets the OTLP endpoint for telemetry. | | See [telemetry](../../developers/development/telemetry) for more information. |
573
- | `--telemetry-otlp-protocol` | | Sets the OTLP protocol for telemetry (`grpc` or `http`). | | Defaults to `grpc`. See [telemetry](../../developers/development/telemetry) for more information. |
574
- | `--telemetry-log-prompts` | | Enables logging of prompts for telemetry. | | See [telemetry](../../developers/development/telemetry) for more information. |
575
- | `--checkpointing` | | Enables [checkpointing](../features/checkpointing). | | |
576
- | `--acp` | | Enables ACP mode (Agent Client Protocol). Useful for IDE/editor integrations like [Zed](../integration-zed). | | Stable. Replaces the deprecated `--experimental-acp` flag. |
577
- | `--experimental-lsp` | | Enables experimental [LSP (Language Server Protocol)](../features/lsp) feature for code intelligence (go-to-definition, find references, diagnostics, etc.). | | Experimental. Requires language servers to be installed. |
578
- | `--extensions` | `-e` | Specifies a list of extensions to use for the session. | Extension names | If not provided, all available extensions are used. Use the special term `qwen -e none` to disable all extensions. Example: `qwen -e my-extension -e my-other-extension` |
579
- | `--list-extensions` | `-l` | Lists all available extensions and exits. | | |
580
- | `--proxy` | | Sets the proxy for the CLI. | Proxy URL | Example: `--proxy http://localhost:7890`. |
581
- | `--include-directories` | | Includes additional directories in the workspace for multi-directory support. | Directory paths | Can be specified multiple times or as comma-separated values. 5 directories can be added at maximum. Example: `--include-directories /path/to/project1,/path/to/project2` or `--include-directories /path/to/project1 --include-directories /path/to/project2` |
582
- | `--screen-reader` | | Enables screen reader mode, which adjusts the TUI for better compatibility with screen readers. | | |
583
- | `--version` | | Displays the version of the CLI. | | |
584
- | `--openai-logging` | | Enables logging of OpenAI API calls for debugging and analysis. | | This flag overrides the `enableOpenAILogging` setting in `settings.json`. |
585
- | `--openai-logging-dir` | | Sets a custom directory path for OpenAI API logs. | Directory path | This flag overrides the `openAILoggingDir` setting in `settings.json`. Supports absolute paths, relative paths, and `~` expansion. Example: `qwen --openai-logging-dir "~/qwen-logs" --openai-logging` |
586
- | `--tavily-api-key` | | Sets the Tavily API key for web search functionality for this session. | API key | Example: `qwen --tavily-api-key tvly-your-api-key-here` |
586
+ | Argument | Alias | Description | Possible Values | Notes |
587
+ | ---------------------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
588
+ | `--model` | `-m` | Specifies the Qwen model to use for this session. | Model name | Example: `npm start -- --model qwen3-coder-plus` |
589
+ | `--prompt` | `-p` | Used to pass a prompt directly to the command. This invokes Qwen Code in a non-interactive mode. | Your prompt text | For scripting examples, use the `--output-format json` flag to get structured output. |
590
+ | `--prompt-interactive` | `-i` | Starts an interactive session with the provided prompt as the initial input. | Your prompt text | The prompt is processed within the interactive session, not before it. Cannot be used when piping input from stdin. Example: `qwen -i "explain this code"` |
591
+ | `--system-prompt` | | Overrides the built-in main session system prompt for this run. | Your prompt text | Loaded context files such as `QWEN.md` are still appended after this override. Can be combined with `--append-system-prompt`. |
592
+ | `--append-system-prompt` | | Appends extra instructions to the main session system prompt for this run. | Your prompt text | Applied after the built-in prompt and loaded context files. Can be combined with `--system-prompt`. See [Headless Mode](../features/headless) for examples. |
593
+ | `--output-format` | `-o` | Specifies the format of the CLI output for non-interactive mode. | `text`, `json`, `stream-json` | `text`: (Default) The standard human-readable output. `json`: A machine-readable JSON output emitted at the end of execution. `stream-json`: Streaming JSON messages emitted as they occur during execution. For structured output and scripting, use the `--output-format json` or `--output-format stream-json` flag. See [Headless Mode](../features/headless) for detailed information. |
594
+ | `--input-format` | | Specifies the format consumed from standard input. | `text`, `stream-json` | `text`: (Default) Standard text input from stdin or command-line arguments. `stream-json`: JSON message protocol via stdin for bidirectional communication. Requirement: `--input-format stream-json` requires `--output-format stream-json` to be set. When using `stream-json`, stdin is reserved for protocol messages. See [Headless Mode](../features/headless) for detailed information. |
595
+ | `--include-partial-messages` | | Include partial assistant messages when using `stream-json` output format. When enabled, emits stream events (message_start, content_block_delta, etc.) as they occur during streaming. | | Default: `false`. Requirement: Requires `--output-format stream-json` to be set. See [Headless Mode](../features/headless) for detailed information about stream events. |
596
+ | `--sandbox` | `-s` | Enables sandbox mode for this session. | | |
597
+ | `--sandbox-image` | | Sets the sandbox image URI. | | |
598
+ | `--debug` | `-d` | Enables debug mode for this session, providing more verbose output. | | |
599
+ | `--all-files` | `-a` | If set, recursively includes all files within the current directory as context for the prompt. | | |
600
+ | `--help` | `-h` | Displays help information about command-line arguments. | | |
601
+ | `--show-memory-usage` | | Displays the current memory usage. | | |
602
+ | `--yolo` | | Enables YOLO mode, which automatically approves all tool calls. | | |
603
+ | `--approval-mode` | | Sets the approval mode for tool calls. | `plan`, `default`, `auto-edit`, `yolo` | Supported modes: `plan`: Analyze only—do not modify files or execute commands. `default`: Require approval for file edits or shell commands (default behavior). `auto-edit`: Automatically approve edit tools (edit, write_file) while prompting for others. `yolo`: Automatically approve all tool calls (equivalent to `--yolo`). Cannot be used together with `--yolo`. Use `--approval-mode=yolo` instead of `--yolo` for the new unified approach. Example: `qwen --approval-mode auto-edit`<br>See more about [Approval Mode](../features/approval-mode). |
604
+ | `--allowed-tools` | | A comma-separated list of tool names that will bypass the confirmation dialog. | Tool names | Example: `qwen --allowed-tools "Shell(git status)"` |
605
+ | `--disabled-slash-commands` | | Slash command names to hide/disable (comma-separated or repeated). Unioned with the `slashCommands.disabled` setting and the `QWEN_DISABLED_SLASH_COMMANDS` environment variable. Matched case-insensitively against the final command name. | Command names | Example: `qwen --disabled-slash-commands "auth,mcp,extensions"` |
606
+ | `--telemetry` | | Enables [telemetry](/developers/development/telemetry). | | |
607
+ | `--telemetry-target` | | Sets the telemetry target. | | See [telemetry](/developers/development/telemetry) for more information. |
608
+ | `--telemetry-otlp-endpoint` | | Sets the OTLP endpoint for telemetry. | | See [telemetry](../../developers/development/telemetry) for more information. |
609
+ | `--telemetry-otlp-protocol` | | Sets the OTLP protocol for telemetry (`grpc` or `http`). | | Defaults to `grpc`. See [telemetry](../../developers/development/telemetry) for more information. |
610
+ | `--telemetry-log-prompts` | | Enables logging of prompts for telemetry. | | See [telemetry](../../developers/development/telemetry) for more information. |
611
+ | `--checkpointing` | | Enables [checkpointing](../features/checkpointing). | | |
612
+ | `--acp` | | Enables ACP mode (Agent Client Protocol). Useful for IDE/editor integrations like [Zed](../integration-zed). | | Stable. Replaces the deprecated `--experimental-acp` flag. |
613
+ | `--experimental-lsp` | | Enables experimental [LSP (Language Server Protocol)](../features/lsp) feature for code intelligence (go-to-definition, find references, diagnostics, etc.). | | Experimental. Requires language servers to be installed. |
614
+ | `--extensions` | `-e` | Specifies a list of extensions to use for the session. | Extension names | If not provided, all available extensions are used. Use the special term `qwen -e none` to disable all extensions. Example: `qwen -e my-extension -e my-other-extension` |
615
+ | `--list-extensions` | `-l` | Lists all available extensions and exits. | | |
616
+ | `--proxy` | | Sets the proxy for the CLI. | Proxy URL | Example: `--proxy http://localhost:7890`. |
617
+ | `--include-directories` | | Includes additional directories in the workspace for multi-directory support. | Directory paths | Can be specified multiple times or as comma-separated values. 5 directories can be added at maximum. Example: `--include-directories /path/to/project1,/path/to/project2` or `--include-directories /path/to/project1 --include-directories /path/to/project2` |
618
+ | `--screen-reader` | | Enables screen reader mode, which adjusts the TUI for better compatibility with screen readers. | | |
619
+ | `--version` | | Displays the version of the CLI. | | |
620
+ | `--openai-logging` | | Enables logging of OpenAI API calls for debugging and analysis. | | This flag overrides the `enableOpenAILogging` setting in `settings.json`. |
621
+ | `--openai-logging-dir` | | Sets a custom directory path for OpenAI API logs. | Directory path | This flag overrides the `openAILoggingDir` setting in `settings.json`. Supports absolute paths, relative paths, and `~` expansion. Example: `qwen --openai-logging-dir "~/qwen-logs" --openai-logging` |
622
+ | `--tavily-api-key` | | Sets the Tavily API key for web search functionality for this session. | API key | Example: `qwen --tavily-api-key tvly-your-api-key-here` |
587
623
 
588
624
  ## Context Files (Hierarchical Instructional Context)
589
625
 
@@ -90,8 +90,9 @@ When all agents complete, the Arena enters the result comparison phase. You'll s
90
90
 
91
91
  - **Status summary**: Which agents succeeded, failed, or were cancelled
92
92
  - **Execution metrics**: Duration, rounds of reasoning, token usage, and tool call counts for each agent
93
+ - **Arena comparison summary**: Files changed in common vs. by one agent only, line-change counts, token efficiency, and a high-level approach summary generated from each agent's diff, metrics, and conversation history
93
94
 
94
- A selection dialog presents the successful agents. Choose one to apply its changes to your main workspace, or discard all results.
95
+ A selection dialog presents the successful agents. Choose one to apply its changes to your main workspace, or discard all results. Press `p` to toggle a quick preview for the highlighted agent, or `d` to toggle that agent's detailed diff before selecting a winner.
95
96
 
96
97
  ### What happens when you select a winner
97
98
 
@@ -99,7 +100,7 @@ A selection dialog presents the successful agents. Choose one to apply its chang
99
100
  2. The diff is applied to your main working directory
100
101
  3. All worktrees and temporary branches are cleaned up automatically
101
102
 
102
- If you want to inspect results before deciding, each agent's full conversation history is available via the tab bar while the selection dialog is active.
103
+ If you want to inspect the complete reasoning path before deciding, each agent's full conversation history is still available via the tab bar while the selection dialog is active.
103
104
 
104
105
  ## Configuration
105
106
 
@@ -199,9 +200,9 @@ Agent Arena is experimental. Current limitations:
199
200
 
200
201
  ## Comparison with other multi-agent modes
201
202
 
202
- Agent Arena is one of several multi-agent modes in Qwen Code. **Agent Team** is not yet implemented. **Agent Swarm** is available as a lightweight tool for batch-style parallel worker execution.
203
+ Agent Arena is one of several planned multi-agent modes in Qwen Code. **Agent Team** and **Agent Swarm** are not yet implemented the table below describes their intended design for reference.
203
204
 
204
- | | **Agent Arena** | **Agent Team** (planned) | **Agent Swarm** |
205
+ | | **Agent Arena** | **Agent Team** (planned) | **Agent Swarm** (planned) |
205
206
  | :---------------- | :----------------------------------------------------- | :------------------------------------------------- | :------------------------------------------------------- |
206
207
  | **Goal** | Competitive: Find the best solution to the _same_ task | Collaborative: Tackle _different_ aspects together | Batch parallel: Dynamically spawn workers for bulk tasks |
207
208
  | **Agents** | Pre-configured models compete independently | Teammates collaborate with assigned roles | Workers spawned on-the-fly, destroyed on completion |
@@ -24,7 +24,7 @@ These commands help you save, restore, and summarize work progress.
24
24
  | `/summary` | Generate project summary based on conversation history | `/summary` |
25
25
  | `/compress` | Replace chat history with summary to save Tokens | `/compress` |
26
26
  | `/resume` | Resume a previous conversation session | `/resume` |
27
- | `/recap` | Show a 1-3 sentence "where you left off" summary | `/recap` |
27
+ | `/recap` | Generate a one-line session recap now | `/recap` |
28
28
  | `/restore` | Restore files to state before tool execution | `/restore` (list) or `/restore <ID>` |
29
29
 
30
30
  ### 1.2 Interface and Workspace Control
@@ -163,9 +163,9 @@ The `/recap` command generates a short "where you left off" summary of the
163
163
  current session, so you can resume an old conversation without scrolling
164
164
  back through pages of history.
165
165
 
166
- | Command | Description |
167
- | -------- | ------------------------------------------------ |
168
- | `/recap` | Generate and show a 1-3 sentence session summary |
166
+ | Command | Description |
167
+ | -------- | ------------------------------------------ |
168
+ | `/recap` | Generate and show a one-line session recap |
169
169
 
170
170
  **How it works:**
171
171
 
@@ -310,6 +310,67 @@ echo "Recent usage trends:"
310
310
  tail -5 usage.log
311
311
  ```
312
312
 
313
+ ## Persistent Retry Mode
314
+
315
+ When Qwen Code runs in CI/CD pipelines or as a background daemon, a brief API outage (rate limiting or overload) should not kill a multi-hour task. **Persistent retry mode** makes Qwen Code retry transient API errors indefinitely until the service recovers.
316
+
317
+ ### How it works
318
+
319
+ - **Transient errors only**: HTTP 429 (Rate Limit) and 529 (Overloaded) are retried indefinitely. Other errors (400, 500, etc.) still fail normally.
320
+ - **Exponential backoff with cap**: Retry delays grow exponentially but are capped at **5 minutes** per retry.
321
+ - **Heartbeat keepalive**: During long waits, a status line is printed to stderr every **30 seconds** to prevent CI runners from killing the process due to inactivity.
322
+ - **Graceful degradation**: Non-transient errors and interactive mode are completely unaffected.
323
+
324
+ ### Activation
325
+
326
+ Set the `QWEN_CODE_UNATTENDED_RETRY` environment variable to `true` or `1` (strict match, case-sensitive):
327
+
328
+ ```bash
329
+ export QWEN_CODE_UNATTENDED_RETRY=1
330
+ ```
331
+
332
+ > [!important]
333
+ > Persistent retry requires an **explicit opt-in**. `CI=true` alone does **not** activate it — silently turning a fast-fail CI job into an infinite-wait job would be dangerous. Always set `QWEN_CODE_UNATTENDED_RETRY` explicitly in your pipeline configuration.
334
+
335
+ ### Examples
336
+
337
+ #### GitHub Actions
338
+
339
+ ```yaml
340
+ - name: Automated code review
341
+ env:
342
+ QWEN_CODE_UNATTENDED_RETRY: '1'
343
+ run: |
344
+ qwen -p "Review all files in src/ for security issues" \
345
+ --output-format json \
346
+ --yolo > review.json
347
+ ```
348
+
349
+ #### Overnight batch processing
350
+
351
+ ```bash
352
+ export QWEN_CODE_UNATTENDED_RETRY=1
353
+ qwen -p "Migrate all callback-style functions to async/await in src/" --yolo
354
+ ```
355
+
356
+ #### Background daemon
357
+
358
+ ```bash
359
+ QWEN_CODE_UNATTENDED_RETRY=1 nohup qwen -p "Audit all dependencies for known CVEs" \
360
+ --output-format json > audit.json 2> audit.log &
361
+ ```
362
+
363
+ ### Monitoring
364
+
365
+ During persistent retry, heartbeat messages are printed to **stderr**:
366
+
367
+ ```
368
+ [qwen-code] Waiting for API capacity... attempt 3, retry in 45s
369
+ [qwen-code] Waiting for API capacity... attempt 3, retry in 15s
370
+ ```
371
+
372
+ These messages keep CI runners alive and let you monitor progress. They do not appear in stdout, so JSON output piped to other tools remains clean.
373
+
313
374
  ## Resources
314
375
 
315
376
  - [CLI Configuration](../configuration/settings#command-line-arguments) - Complete configuration guide