@qwen-code/qwen-code 0.15.0-preview.1 → 0.15.0-preview.2
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
|
|
81
|
-
|
|
|
82
|
-
| `general.preferredEditor`
|
|
83
|
-
| `general.vimMode`
|
|
84
|
-
| `general.enableAutoUpdate`
|
|
85
|
-
| `general.showSessionRecap`
|
|
86
|
-
| `general.
|
|
87
|
-
| `general.
|
|
88
|
-
| `general.
|
|
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
|
|
|
@@ -552,25 +553,26 @@ For authentication-related variables (like `OPENAI_*`) and the recommended `.qwe
|
|
|
552
553
|
|
|
553
554
|
### Environment Variables Table
|
|
554
555
|
|
|
555
|
-
| Variable | Description
|
|
556
|
-
| ------------------------------ |
|
|
557
|
-
| `QWEN_TELEMETRY_ENABLED` | Set to `true` or `1` to enable telemetry. Any other value is treated as disabling it.
|
|
558
|
-
| `QWEN_TELEMETRY_TARGET` | Sets the telemetry target (`local` or `gcp`).
|
|
559
|
-
| `QWEN_TELEMETRY_OTLP_ENDPOINT` | Sets the OTLP endpoint for telemetry.
|
|
560
|
-
| `QWEN_TELEMETRY_OTLP_PROTOCOL` | Sets the OTLP protocol (`grpc` or `http`).
|
|
561
|
-
| `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.
|
|
562
|
-
| `QWEN_TELEMETRY_OUTFILE` | Sets the file path to write telemetry to when the target is `local`.
|
|
563
|
-
| `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.
|
|
564
|
-
| `QWEN_SANDBOX` | Alternative to the `sandbox` setting in `settings.json`.
|
|
565
|
-
| `QWEN_SANDBOX_IMAGE` | Overrides sandbox image selection for Docker/Podman.
|
|
566
|
-
| `SEATBELT_PROFILE` | (macOS specific) Switches the Seatbelt (`sandbox-exec`) profile on macOS.
|
|
567
|
-
| `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.
|
|
568
|
-
| `NO_COLOR` | Set to any value to disable all color output in the CLI.
|
|
569
|
-
| `CLI_TITLE` | Set to a string to customize the title of the CLI.
|
|
570
|
-
| `CODE_ASSIST_ENDPOINT` | Specifies the endpoint for the code assist server.
|
|
571
|
-
| `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.
|
|
572
|
-
| `TAVILY_API_KEY` | Your API key for the Tavily web search service.
|
|
573
|
-
| `
|
|
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` |
|
|
574
576
|
|
|
575
577
|
## Command-Line Arguments
|
|
576
578
|
|
|
@@ -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
|
|
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
|
|
|
@@ -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
|