@mmmbuto/qwen-code-termux 0.14.1-termux → 0.15.5-termux
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.
- package/README.md +1 -1
- package/bundled/batch/SKILL.md +304 -0
- package/bundled/loop/SKILL.md +1 -0
- package/bundled/qc-helper/SKILL.md +1 -0
- package/bundled/qc-helper/docs/configuration/auth.md +13 -6
- package/bundled/qc-helper/docs/configuration/settings.md +173 -108
- package/bundled/qc-helper/docs/features/_meta.ts +6 -0
- package/bundled/qc-helper/docs/features/approval-mode.md +16 -8
- package/bundled/qc-helper/docs/features/arena.md +3 -2
- package/bundled/qc-helper/docs/features/code-review.md +279 -0
- package/bundled/qc-helper/docs/features/commands.md +96 -26
- package/bundled/qc-helper/docs/features/dual-output.md +593 -0
- package/bundled/qc-helper/docs/features/followup-suggestions.md +6 -6
- package/bundled/qc-helper/docs/features/headless.md +61 -0
- package/bundled/qc-helper/docs/features/hooks.md +408 -120
- package/bundled/qc-helper/docs/features/mcp.md +100 -14
- package/bundled/qc-helper/docs/features/memory.md +168 -0
- package/bundled/qc-helper/docs/features/sandbox.md +9 -1
- package/bundled/qc-helper/docs/features/status-line.md +261 -0
- package/bundled/qc-helper/docs/features/sub-agents.md +126 -7
- package/bundled/qc-helper/docs/features/tips.md +54 -0
- package/bundled/qc-helper/docs/features/tool-use-summaries.md +178 -0
- package/bundled/qc-helper/docs/overview.md +4 -4
- package/bundled/qc-helper/docs/quickstart.md +15 -9
- package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +1 -1
- package/bundled/qc-helper/docs/support/tos-privacy.md +1 -1
- package/bundled/qc-helper/docs/support/troubleshooting.md +9 -3
- package/bundled/review/DESIGN.md +165 -0
- package/bundled/review/SKILL.md +359 -88
- package/cli.js +296184 -260145
- package/locales/ca.js +2143 -0
- package/locales/de.js +104 -14
- package/locales/en.js +113 -13
- package/locales/fr.js +2099 -0
- package/locales/ja.js +103 -14
- package/locales/pt.js +105 -14
- package/locales/ru.js +103 -14
- package/locales/zh-TW.js +1678 -0
- package/locales/zh.js +110 -13
- package/package.json +2 -2
- package/bundled/qc-helper/docs/configuration/memory.md +0 -0
|
@@ -12,10 +12,46 @@ Subagents are independent AI assistants that:
|
|
|
12
12
|
- **Work autonomously** - Once given a task, they work independently until completion or failure
|
|
13
13
|
- **Provide detailed feedback** - You can see their progress, tool usage, and execution statistics in real-time
|
|
14
14
|
|
|
15
|
+
## Fork Subagent (Implicit Fork)
|
|
16
|
+
|
|
17
|
+
In addition to named subagents, Qwen Code supports **implicit forking** — when the AI omits the `subagent_type` parameter, it triggers a fork that inherits the parent's full conversation context.
|
|
18
|
+
|
|
19
|
+
### How Fork Differs from Named Subagents
|
|
20
|
+
|
|
21
|
+
| | Named Subagent | Fork Subagent |
|
|
22
|
+
| ------------- | --------------------------------- | ----------------------------------------------------- |
|
|
23
|
+
| Context | Starts fresh, no parent history | Inherits parent's full conversation history |
|
|
24
|
+
| System prompt | Uses its own configured prompt | Uses parent's exact system prompt (for cache sharing) |
|
|
25
|
+
| Execution | Blocks the parent until done | Runs in background, parent continues immediately |
|
|
26
|
+
| Use case | Specialized tasks (testing, docs) | Parallel tasks that need the current context |
|
|
27
|
+
|
|
28
|
+
### When Fork is Used
|
|
29
|
+
|
|
30
|
+
The AI automatically uses fork when it needs to:
|
|
31
|
+
|
|
32
|
+
- Run multiple research tasks in parallel (e.g., "investigate module A, B, and C")
|
|
33
|
+
- Perform background work while continuing the main conversation
|
|
34
|
+
- Delegate tasks that require understanding of the current conversation context
|
|
35
|
+
|
|
36
|
+
### Prompt Cache Sharing
|
|
37
|
+
|
|
38
|
+
All forks share the parent's exact API request prefix (system prompt, tools, conversation history), enabling DashScope prompt cache hits. When 3 forks run in parallel, the shared prefix is cached once and reused — saving 80%+ token costs compared to independent subagents.
|
|
39
|
+
|
|
40
|
+
### Recursive Fork Prevention
|
|
41
|
+
|
|
42
|
+
Fork children cannot create further forks. This is enforced at runtime — if a fork attempts to spawn another fork, it receives an error instructing it to execute tasks directly.
|
|
43
|
+
|
|
44
|
+
### Current Limitations
|
|
45
|
+
|
|
46
|
+
- **No result feedback**: Fork results are reflected in the UI progress display but are not automatically fed back into the main conversation. The parent AI sees a placeholder message and cannot act on the fork's output.
|
|
47
|
+
- **No worktree isolation**: Forks share the parent's working directory. Concurrent file modifications from multiple forks may conflict.
|
|
48
|
+
|
|
15
49
|
## Key Benefits
|
|
16
50
|
|
|
17
51
|
- **Task Specialization**: Create agents optimized for specific workflows (testing, documentation, refactoring, etc.)
|
|
18
52
|
- **Context Isolation**: Keep specialized work separate from your main conversation
|
|
53
|
+
- **Context Inheritance**: Fork subagents inherit the full conversation for context-heavy parallel tasks
|
|
54
|
+
- **Prompt Cache Sharing**: Fork subagents share the parent's cache prefix, reducing token costs
|
|
19
55
|
- **Reusability**: Save and reuse agent configurations across projects and sessions
|
|
20
56
|
- **Controlled Access**: Limit which tools each agent can use for security and focus
|
|
21
57
|
- **Progress Visibility**: Monitor agent execution with real-time progress updates
|
|
@@ -23,7 +59,7 @@ Subagents are independent AI assistants that:
|
|
|
23
59
|
## How Subagents Work
|
|
24
60
|
|
|
25
61
|
1. **Configuration**: You create Subagents configurations that define their behavior, tools, and system prompts
|
|
26
|
-
2. **Delegation**: The main AI can automatically delegate tasks to appropriate Subagents
|
|
62
|
+
2. **Delegation**: The main AI can automatically delegate tasks to appropriate Subagents — or implicitly fork when no specific subagent type is needed
|
|
27
63
|
3. **Execution**: Subagents work independently, using their configured tools to complete tasks
|
|
28
64
|
4. **Results**: They return results and execution summaries back to the main conversation
|
|
29
65
|
|
|
@@ -99,10 +135,12 @@ Subagents are configured using Markdown files with YAML frontmatter. This format
|
|
|
99
135
|
name: agent-name
|
|
100
136
|
description: Brief description of when and how to use this agent
|
|
101
137
|
model: inherit # Optional: inherit or model-id
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
138
|
+
approvalMode: auto-edit # Optional: default, plan, auto-edit, yolo
|
|
139
|
+
tools: # Optional: allowlist of tools
|
|
140
|
+
- tool1
|
|
141
|
+
- tool2
|
|
142
|
+
disallowedTools: # Optional: blocklist of tools
|
|
143
|
+
- tool3
|
|
106
144
|
---
|
|
107
145
|
|
|
108
146
|
System prompt content goes here.
|
|
@@ -118,6 +156,87 @@ Use the optional `model` frontmatter field to control which model a subagent use
|
|
|
118
156
|
- `glm-5`: Use that model ID with the main conversation's auth type
|
|
119
157
|
- `openai:gpt-4o`: Use a different provider (resolves credentials from env vars)
|
|
120
158
|
|
|
159
|
+
#### Permission Mode
|
|
160
|
+
|
|
161
|
+
Use the optional `approvalMode` frontmatter field to control how a subagent's tool calls are approved. Valid values:
|
|
162
|
+
|
|
163
|
+
- `default`: Tools require interactive approval (same as the main session default)
|
|
164
|
+
- `plan`: Analyze-only mode — the agent plans but does not execute changes
|
|
165
|
+
- `auto-edit`: Tools are auto-approved without prompting (recommended for most agents)
|
|
166
|
+
- `yolo`: All tools auto-approved, including potentially destructive ones
|
|
167
|
+
|
|
168
|
+
If you omit this field, the subagent's permission mode is determined automatically:
|
|
169
|
+
|
|
170
|
+
- If the parent session is in **yolo** or **auto-edit** mode, the subagent inherits that mode. A permissive parent stays permissive.
|
|
171
|
+
- If the parent session is in **plan** mode, the subagent stays in plan mode. An analyze-only session cannot mutate files through a delegated agent.
|
|
172
|
+
- If the parent session is in **default** mode (in a trusted folder), the subagent gets **auto-edit** so it can work autonomously.
|
|
173
|
+
|
|
174
|
+
When you do set `approvalMode`, the parent's permissive modes still take priority. For example, if the parent is in yolo mode, a subagent with `approvalMode: plan` will still run in yolo mode.
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
---
|
|
178
|
+
name: cautious-reviewer
|
|
179
|
+
description: Reviews code without making changes
|
|
180
|
+
approvalMode: plan
|
|
181
|
+
tools:
|
|
182
|
+
- read_file
|
|
183
|
+
- grep_search
|
|
184
|
+
- glob
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
You are a code reviewer. Analyze the code and report findings.
|
|
188
|
+
Do not modify any files.
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
#### Tool Configuration
|
|
192
|
+
|
|
193
|
+
Use `tools` and `disallowedTools` to control which tools a subagent can access.
|
|
194
|
+
|
|
195
|
+
**`tools` (allowlist):** When specified, the subagent can only use the listed tools. When omitted, the subagent inherits all available tools from the parent session.
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
---
|
|
199
|
+
name: reader
|
|
200
|
+
description: Read-only agent for code exploration
|
|
201
|
+
tools:
|
|
202
|
+
- read_file
|
|
203
|
+
- grep_search
|
|
204
|
+
- glob
|
|
205
|
+
- list_directory
|
|
206
|
+
---
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
**`disallowedTools` (blocklist):** When specified, the listed tools are removed from the subagent's tool pool. This is useful when you want "everything except X" without listing every permitted tool.
|
|
210
|
+
|
|
211
|
+
```
|
|
212
|
+
---
|
|
213
|
+
name: safe-worker
|
|
214
|
+
description: Agent that cannot modify files
|
|
215
|
+
disallowedTools:
|
|
216
|
+
- write_file
|
|
217
|
+
- edit
|
|
218
|
+
- run_shell_command
|
|
219
|
+
---
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
If both `tools` and `disallowedTools` are set, the allowlist is applied first, then the blocklist removes from that set.
|
|
223
|
+
|
|
224
|
+
**MCP tools** follow the same rules. If a subagent has no `tools` list, it inherits all MCP tools from the parent session. If a subagent has an explicit `tools` list, it only gets MCP tools that are explicitly named in that list.
|
|
225
|
+
|
|
226
|
+
The `disallowedTools` field supports MCP server-level patterns:
|
|
227
|
+
|
|
228
|
+
- `mcp__server__tool_name` — blocks a specific MCP tool
|
|
229
|
+
- `mcp__server` — blocks all tools from that MCP server
|
|
230
|
+
|
|
231
|
+
```
|
|
232
|
+
---
|
|
233
|
+
name: no-slack
|
|
234
|
+
description: Agent without Slack access
|
|
235
|
+
disallowedTools:
|
|
236
|
+
- mcp__slack
|
|
237
|
+
---
|
|
238
|
+
```
|
|
239
|
+
|
|
121
240
|
#### Example Usage
|
|
122
241
|
|
|
123
242
|
```
|
|
@@ -214,7 +333,6 @@ tools:
|
|
|
214
333
|
- read_file
|
|
215
334
|
- write_file
|
|
216
335
|
- read_many_files
|
|
217
|
-
- web_search
|
|
218
336
|
---
|
|
219
337
|
|
|
220
338
|
You are a technical documentation specialist.
|
|
@@ -500,7 +618,8 @@ Always follow these standards:
|
|
|
500
618
|
|
|
501
619
|
## Security Considerations
|
|
502
620
|
|
|
503
|
-
- **Tool Restrictions**:
|
|
621
|
+
- **Tool Restrictions**: Use `tools` to limit which tools a subagent can access, or `disallowedTools` to block specific tools while inheriting everything else
|
|
622
|
+
- **Permission Mode**: Subagents inherit their parent's permission mode by default. Plan-mode sessions cannot escalate to auto-edit through delegated agents. Privileged modes (auto-edit, yolo) are blocked in untrusted folders.
|
|
504
623
|
- **Sandboxing**: All tool execution follows the same security model as direct tool use
|
|
505
624
|
- **Audit Trail**: All Subagents actions are logged and visible in real-time
|
|
506
625
|
- **Access Control**: Project and user-level separation provides appropriate boundaries
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Contextual Tips
|
|
2
|
+
|
|
3
|
+
Qwen Code includes a contextual tips system that helps you discover features and stay aware of session state.
|
|
4
|
+
|
|
5
|
+
## Startup Tips
|
|
6
|
+
|
|
7
|
+
Each time you launch Qwen Code, a tip is shown in the header area. Tips are selected by priority first, then rotated across sessions using LRU (least-recently-used) scheduling among tips of the same priority, so you see a different tip each time.
|
|
8
|
+
|
|
9
|
+
New users see onboarding-focused tips during their first sessions:
|
|
10
|
+
|
|
11
|
+
| Sessions | Example tips |
|
|
12
|
+
| -------- | ---------------------------------------------------- |
|
|
13
|
+
| < 5 | Slash commands (`/`), Tab autocomplete |
|
|
14
|
+
| < 10 | `QWEN.md` project context, `--continue` / `--resume` |
|
|
15
|
+
| < 15 | Shell commands with `!` prefix |
|
|
16
|
+
|
|
17
|
+
After that, tips rotate through general features like `/compress`, `/approval-mode`, `/insight`, `/btw`, and more.
|
|
18
|
+
|
|
19
|
+
## Post-Response Tips
|
|
20
|
+
|
|
21
|
+
During a conversation, Qwen Code monitors your context window usage and shows tips when action may be needed:
|
|
22
|
+
|
|
23
|
+
| Context usage | Condition | Tip |
|
|
24
|
+
| ------------- | ------------------------------ | ------------------------------------------------- |
|
|
25
|
+
| 50-80% | After a few prompts in session | Suggests `/compress` to free up context |
|
|
26
|
+
| 80-95% | — | Warns context is getting full |
|
|
27
|
+
| >= 95% | — | Urgent: run `/compress` now or `/new` to continue |
|
|
28
|
+
|
|
29
|
+
Post-response tips have per-tip cooldowns to avoid being repetitive.
|
|
30
|
+
|
|
31
|
+
## Tip History
|
|
32
|
+
|
|
33
|
+
Tip display history is persisted at `~/.qwen/tip_history.json`. This file tracks:
|
|
34
|
+
|
|
35
|
+
- Session count (used for new-user tip selection)
|
|
36
|
+
- Which tips have been shown and when (used for LRU rotation and cooldown)
|
|
37
|
+
|
|
38
|
+
You can safely delete this file to reset tip history.
|
|
39
|
+
|
|
40
|
+
## Disabling Tips
|
|
41
|
+
|
|
42
|
+
To hide all tips (both startup and post-response), set `ui.hideTips` to `true` in `~/.qwen/settings.json`:
|
|
43
|
+
|
|
44
|
+
```json
|
|
45
|
+
{
|
|
46
|
+
"ui": {
|
|
47
|
+
"hideTips": true
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
You can also toggle this in the settings dialog via the `/settings` command.
|
|
53
|
+
|
|
54
|
+
Tips are also automatically hidden when screen reader mode is enabled.
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# Tool-Use Summaries
|
|
2
|
+
|
|
3
|
+
Qwen Code can generate a short, git-commit-subject-style label after each tool batch completes, summarizing what the batch accomplished. The label appears inline in the transcript and replaces the generic `Tool × N` header in compact mode.
|
|
4
|
+
|
|
5
|
+
This is a UX aid for parallel tool calls: when the model fans out into several `Read` + `Grep` + `Bash` calls at once, the summary tells you the intent at a glance instead of forcing you to scan the tool list.
|
|
6
|
+
|
|
7
|
+
The feature is enabled by default and runs silently in the background. It requires a configured [fast model](./followup-suggestions#fast-model).
|
|
8
|
+
|
|
9
|
+
## What You See
|
|
10
|
+
|
|
11
|
+
### Full mode (default)
|
|
12
|
+
|
|
13
|
+
The summary appears as a dim badge line directly below the tool group:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
╭──────────────────────────────────────────────╮
|
|
17
|
+
│ ✓ ReadFile a.txt │
|
|
18
|
+
│ ✓ ReadFile b.txt │
|
|
19
|
+
│ ✓ ReadFile c.txt │
|
|
20
|
+
│ ✓ ReadFile d.txt │
|
|
21
|
+
╰──────────────────────────────────────────────╯
|
|
22
|
+
|
|
23
|
+
● Read 4 text files
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Compact mode (`Ctrl+O` or `ui.compactMode: true`)
|
|
27
|
+
|
|
28
|
+
The label replaces the generic `Tool × N` header in the compact one-liner:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
╭──────────────────────────────────────────────╮
|
|
32
|
+
│✓ Read txt files · 4 tools │
|
|
33
|
+
│Press Ctrl+O to show full tool output │
|
|
34
|
+
╰──────────────────────────────────────────────╯
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The individual tool calls are still a keystroke away (`Ctrl+O` to toggle to full mode).
|
|
38
|
+
|
|
39
|
+
## How It Works
|
|
40
|
+
|
|
41
|
+
After a tool batch finalizes, Qwen Code fires a fire-and-forget call to the configured fast model with:
|
|
42
|
+
|
|
43
|
+
- The tool names, truncated arguments, and truncated results (each capped at 300 characters).
|
|
44
|
+
- The assistant's most recent text output (first 200 characters) as an intent prefix.
|
|
45
|
+
- A system prompt instructing the model to return a past-tense, 30-character label in git-commit-subject style.
|
|
46
|
+
|
|
47
|
+
The call runs in parallel with the next turn's API streaming, so its ~1s latency is hidden behind the main model's response. When the label resolves, it is appended to the transcript as a `tool_use_summary` entry.
|
|
48
|
+
|
|
49
|
+
Example labels: `Searched in auth/`, `Fixed NPE in UserService`, `Created signup endpoint`, `Read config.json`, `Ran failing tests`.
|
|
50
|
+
|
|
51
|
+
## When It Appears
|
|
52
|
+
|
|
53
|
+
The summary is generated when **all** of the following are true:
|
|
54
|
+
|
|
55
|
+
- `experimental.emitToolUseSummaries` is `true` (default).
|
|
56
|
+
- A `fastModel` is configured (via settings or `/model --fast`).
|
|
57
|
+
- At least one tool completed in the batch.
|
|
58
|
+
- The turn was not aborted before tool completion.
|
|
59
|
+
- The fast model returned a non-empty, non-error response.
|
|
60
|
+
|
|
61
|
+
Subagent tool calls do not trigger summary generation — only the main session's tool batches do.
|
|
62
|
+
|
|
63
|
+
## When It Doesn't Appear
|
|
64
|
+
|
|
65
|
+
The summary is silently skipped (no error, no UI change) when:
|
|
66
|
+
|
|
67
|
+
- No fast model is configured.
|
|
68
|
+
- The fast model call fails, times out, or returns empty.
|
|
69
|
+
- The model returned an obvious error-message-like string (e.g., `Error: ...`, `I cannot ...`) — filtered out by the client so the UI does not show misleading labels.
|
|
70
|
+
- The turn was aborted (`Ctrl+C`) before the model finished.
|
|
71
|
+
|
|
72
|
+
In all these cases, the tool group renders as it always has.
|
|
73
|
+
|
|
74
|
+
## Fast Model
|
|
75
|
+
|
|
76
|
+
The label is generated using the [fast model](./followup-suggestions#fast-model) — the same model you configure for prompt suggestions and speculative execution. Configure it via:
|
|
77
|
+
|
|
78
|
+
### Via command
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
/model --fast qwen3-coder-flash
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Via `settings.json`
|
|
85
|
+
|
|
86
|
+
```json
|
|
87
|
+
{
|
|
88
|
+
"fastModel": "qwen3-coder-flash"
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
When no fast model is configured, summary generation is skipped entirely — the feature has no effect until you set one up.
|
|
93
|
+
|
|
94
|
+
## Configuration
|
|
95
|
+
|
|
96
|
+
These settings can be configured in `settings.json`:
|
|
97
|
+
|
|
98
|
+
| Setting | Type | Default | Description |
|
|
99
|
+
| ----------------------------------- | ------- | ------- | -------------------------------------------------------------------------------------------------- |
|
|
100
|
+
| `experimental.emitToolUseSummaries` | boolean | `true` | Master switch for summary generation. Turn off to disable the extra fast-model call. |
|
|
101
|
+
| `fastModel` | string | `""` | Fast model used for summary generation (shared with prompt suggestions). Required; no-op if empty. |
|
|
102
|
+
|
|
103
|
+
### Environment override
|
|
104
|
+
|
|
105
|
+
`QWEN_CODE_EMIT_TOOL_USE_SUMMARIES` overrides the `experimental.emitToolUseSummaries` setting for the current session:
|
|
106
|
+
|
|
107
|
+
- `QWEN_CODE_EMIT_TOOL_USE_SUMMARIES=0` or `=false` — force off.
|
|
108
|
+
- `QWEN_CODE_EMIT_TOOL_USE_SUMMARIES=1` or `=true` — force on.
|
|
109
|
+
- Unset — use the `experimental.emitToolUseSummaries` setting.
|
|
110
|
+
|
|
111
|
+
### Example
|
|
112
|
+
|
|
113
|
+
```json
|
|
114
|
+
{
|
|
115
|
+
"fastModel": "qwen3-coder-flash",
|
|
116
|
+
"experimental": {
|
|
117
|
+
"emitToolUseSummaries": true
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Scope & lifecycle
|
|
123
|
+
|
|
124
|
+
Three points that tend to trip up a first read of this feature:
|
|
125
|
+
|
|
126
|
+
1. **One generation per batch, shared by both display modes.** The fast-model call happens exactly once in `handleCompletedTools` when a tool batch finalizes. Toggling `Ctrl+O` afterwards does **not** trigger a new call — both modes read from the same `tool_use_summary` history entry that was captured the first time. You can flip compact mode on and off freely without extra cost.
|
|
127
|
+
2. **No backfill on toggle or on session resume.** A `tool_group` that completed before the feature was enabled (or before you flipped the setting on, or in a resumed session — `ChatRecordingService` does not persist summary entries) will never get a label. There is no "sweep existing history" pass. If you turn this setting on mid-session, only _future_ batches will show a label; older groups keep the default rendering with no indicator that a label is missing.
|
|
128
|
+
3. **Main-agent batches only.** The trigger lives in the main session's turn loop (`useGeminiStream`), so:
|
|
129
|
+
- ✅ Shell, MCP, file operations, and the `Task` / subagent tool _call itself_ (as it appears in the main batch) are summarized.
|
|
130
|
+
- ❌ A subagent's **internal** tool batches (run through `packages/core/src/agents/runtime/`) are not summarized.
|
|
131
|
+
|
|
132
|
+
An outer batch that _contains_ a `Task` tool will still be labeled, but the fast model sees only the subagent tool call and its aggregated output — not the individual tool calls inside the subagent. Expect labels like `Ran research-agent` or `Delegated file search` rather than `Searched 14 files`. This is intentional — summarizing subagent internals would multiply the fast-model cost and surface noise that never shows up in the primary UI.
|
|
133
|
+
|
|
134
|
+
## Recommended pairing: enable compact mode
|
|
135
|
+
|
|
136
|
+
For batches of 3+ parallel tool calls, pairing this feature with `ui.compactMode: true` produces the cleanest transcript. The compact view folds the whole batch into a single labeled row (`✓ Read txt files · 4 tools`) instead of showing every tool line plus the trailing summary. Details remain one keystroke away via `Ctrl+O`.
|
|
137
|
+
|
|
138
|
+
```json
|
|
139
|
+
{
|
|
140
|
+
"fastModel": "qwen3-coder-flash",
|
|
141
|
+
"ui": {
|
|
142
|
+
"compactMode": true
|
|
143
|
+
},
|
|
144
|
+
"experimental": {
|
|
145
|
+
"emitToolUseSummaries": true
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
In full mode (the default), the summary renders as a trailing `● <label>` line below the tool group — useful for large or heterogeneous batches, but for small same-type batches (e.g. `Read × 3`) the label can read as a restatement of the visible tool lines. If that matches your usual workflow, either turn compact mode on as above, or turn the summary off entirely via `experimental.emitToolUseSummaries: false`.
|
|
151
|
+
|
|
152
|
+
## Monitoring
|
|
153
|
+
|
|
154
|
+
Summary model usage appears in `/stats` output under the fast-model token totals, with the `prompt_id` `tool_use_summary_generation` so it can be distinguished from prompt suggestions and other background tasks.
|
|
155
|
+
|
|
156
|
+
## Data flow & privacy
|
|
157
|
+
|
|
158
|
+
The summary call sends each successful tool's name, truncated `args`, and truncated result (each field capped at 300 characters) to the **fast model**, plus the first 200 characters of the assistant's most recent text as an intent prefix.
|
|
159
|
+
|
|
160
|
+
If your fast model is configured for the same provider/auth as your main session model, the data flows along the same boundary your main session already uses — no change in trust scope. If you have configured a fast model from a **different provider**, tool inputs and outputs (potentially including file contents read by `read_file`, command output from shell calls, or values surfaced through MCP tools) will be sent to that other provider as part of the summarization prompt. That is a strictly larger data-sharing scope than the main session alone.
|
|
161
|
+
|
|
162
|
+
If this matters for your workflow, you have two clean options:
|
|
163
|
+
|
|
164
|
+
- Configure `fastModel` to a model under the same provider as your main session, so the summary call doesn't cross any new auth/data boundary.
|
|
165
|
+
- Disable the feature entirely with `experimental.emitToolUseSummaries: false` (or `QWEN_CODE_EMIT_TOOL_USE_SUMMARIES=0`).
|
|
166
|
+
|
|
167
|
+
The 300-character per-field cap limits exposure but does not eliminate it — secrets discovered in tool output during the cap window can still be sent. Treat the fast model's data boundary the same way you treat the main model's.
|
|
168
|
+
|
|
169
|
+
## Cost
|
|
170
|
+
|
|
171
|
+
One fast-model call per qualifying tool batch. Input is a small fixed system prompt plus the truncated tool inputs/outputs (each capped at 300 characters per field). Output is a single short line (capped at 100 characters, typically 20 tokens or fewer). On a typical fast model this is roughly $0.001 per batch.
|
|
172
|
+
|
|
173
|
+
If you do not want the extra cost, turn the feature off via `experimental.emitToolUseSummaries: false` or `QWEN_CODE_EMIT_TOOL_USE_SUMMARIES=0`.
|
|
174
|
+
|
|
175
|
+
## Related
|
|
176
|
+
|
|
177
|
+
- [Compact Mode](../configuration/settings#ui.compactMode) — toggle with `Ctrl+O`; the summary replaces the generic tool-group header when compact mode is on.
|
|
178
|
+
- [Followup Suggestions](./followup-suggestions) — another fast-model-driven UX enhancement that shares the same `fastModel` setting.
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
curl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen.sh | bash
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
**Windows (Run as Administrator
|
|
18
|
+
**Windows (Run as Administrator)**
|
|
19
19
|
|
|
20
|
-
```
|
|
21
|
-
|
|
20
|
+
```cmd
|
|
21
|
+
powershell -Command "Invoke-WebRequest 'https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen.bat' -OutFile (Join-Path $env:TEMP 'install-qwen.bat'); & (Join-Path $env:TEMP 'install-qwen.bat')"
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
> [!note]
|
|
@@ -32,7 +32,7 @@ cd your-project
|
|
|
32
32
|
qwen
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
Choose your authentication method — **API Key** or **[Alibaba Cloud Coding Plan](https://bailian.console.aliyun.com/cn-beijing/?tab=coding-plan#/efm/coding-plan-index)** ([intl](https://modelstudio.console.alibabacloud.com/?tab=coding-plan#/efm/coding-plan-index)) — and follow the prompts to configure. See the API setup guide ([Beijing](https://bailian.console.aliyun.com/cn-beijing/?tab=doc#/doc/?type=model&url=3023091) / [intl](https://modelstudio.console.alibabacloud.com/ap-southeast-1?tab=doc#/doc/?type=model&url=2974721)) for step-by-step instructions. Then let's start with understanding your codebase. Try one of these commands:
|
|
36
36
|
|
|
37
37
|
```
|
|
38
38
|
what does this project do?
|
|
@@ -10,7 +10,7 @@ Make sure you have:
|
|
|
10
10
|
|
|
11
11
|
- A **terminal** or command prompt open
|
|
12
12
|
- A code project to work with
|
|
13
|
-
-
|
|
13
|
+
- An API key from Alibaba Cloud Model Studio ([Beijing](https://bailian.console.aliyun.com/) / [intl](https://modelstudio.console.alibabacloud.com/)), or an Alibaba Cloud Coding Plan ([Beijing](https://bailian.console.aliyun.com/cn-beijing/?tab=coding-plan#/efm/coding-plan-index) / [intl](https://modelstudio.console.alibabacloud.com/?tab=coding-plan#/efm/coding-plan-index)) subscription
|
|
14
14
|
|
|
15
15
|
## Step 1: Install Qwen Code
|
|
16
16
|
|
|
@@ -24,10 +24,10 @@ To install Qwen Code, use one of the following methods:
|
|
|
24
24
|
curl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen.sh | bash
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
**Windows (Run as Administrator
|
|
27
|
+
**Windows (Run as Administrator)**
|
|
28
28
|
|
|
29
|
-
```
|
|
30
|
-
|
|
29
|
+
```cmd
|
|
30
|
+
powershell -Command "Invoke-WebRequest 'https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen.bat' -OutFile (Join-Path $env:TEMP 'install-qwen.bat'); & (Join-Path $env:TEMP 'install-qwen.bat')"
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
> [!note]
|
|
@@ -52,21 +52,26 @@ npm install -g @qwen-code/qwen-code@latest
|
|
|
52
52
|
brew install qwen-code
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
## Step 2:
|
|
55
|
+
## Step 2: Set up authentication
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
When you start an interactive session with the `qwen` command, you'll be prompted to configure authentication:
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
|
-
# You'll be prompted to
|
|
60
|
+
# You'll be prompted to set up authentication on first use
|
|
61
61
|
qwen
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
```bash
|
|
65
|
-
#
|
|
65
|
+
# Or run /auth anytime to change authentication method
|
|
66
66
|
/auth
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
Choose your preferred authentication method:
|
|
70
|
+
|
|
71
|
+
- **Alibaba Cloud Coding Plan**: Select `Alibaba Cloud Coding Plan` for a fixed monthly fee with diverse model options. See the [Coding Plan guide](https://bailian.console.aliyun.com/cn-beijing/?tab=coding-plan#/efm/coding-plan-index) ([intl](https://modelstudio.console.alibabacloud.com/?tab=coding-plan#/efm/coding-plan-index)) for setup instructions.
|
|
72
|
+
- **API Key**: Select `API Key`, then enter your API key from Alibaba Cloud Model Studio ([Beijing](https://bailian.console.aliyun.com/) / [intl](https://modelstudio.console.alibabacloud.com/)). See the API setup guide ([Beijing](https://bailian.console.aliyun.com/cn-beijing/?tab=doc#/doc/?type=model&url=3023091) / [intl](https://modelstudio.console.alibabacloud.com/ap-southeast-1?tab=doc#/doc/?type=model&url=2974721)) for details.
|
|
73
|
+
|
|
74
|
+
> ⚠️ **Note**: Qwen OAuth was discontinued on April 15, 2026. If you were previously using Qwen OAuth, please switch to one of the methods above.
|
|
70
75
|
|
|
71
76
|
> [!note]
|
|
72
77
|
>
|
|
@@ -218,6 +223,7 @@ Here are the most important commands for daily use:
|
|
|
218
223
|
| `qwen` | start Qwen Code | `qwen` |
|
|
219
224
|
| `/auth` | Change authentication method (in session) | `/auth` |
|
|
220
225
|
| `qwen auth` | Configure authentication from the terminal | `qwen auth` |
|
|
226
|
+
| `qwen auth api-key` | Configure API key authentication | `qwen auth api-key` |
|
|
221
227
|
| `qwen auth status` | Check current authentication status | `qwen auth status` |
|
|
222
228
|
| `/help` | Display help information for available commands | `/help` or `/?` |
|
|
223
229
|
| `/compress` | Replace chat history with summary to save Tokens | `/compress` |
|
|
@@ -10,7 +10,7 @@ This document lists the available keyboard shortcuts in Qwen Code.
|
|
|
10
10
|
| `Ctrl+C` | Cancel the ongoing request and clear the input. Press twice to exit the application. |
|
|
11
11
|
| `Ctrl+D` | Exit the application if the input is empty. Press twice to confirm. |
|
|
12
12
|
| `Ctrl+L` | Clear the screen. |
|
|
13
|
-
| `Ctrl+O` | Toggle
|
|
13
|
+
| `Ctrl+O` | Toggle compact mode (hide/show tool output and thinking). |
|
|
14
14
|
| `Ctrl+S` | Allows long responses to print fully, disabling truncation. Use your terminal's scrollback to view the entire output. |
|
|
15
15
|
| `Ctrl+T` | Toggle the display of tool descriptions. |
|
|
16
16
|
| `Shift+Tab` (`Tab` on Windows) | Cycle approval modes (`plan` → `default` → `auto-edit` → `yolo`) |
|
|
@@ -6,7 +6,7 @@ Qwen Code is an open-source AI coding assistant tool maintained by the Qwen Code
|
|
|
6
6
|
|
|
7
7
|
Qwen Code supports three authentication methods to access AI models. Your authentication method determines which terms of service and privacy policies apply to your usage:
|
|
8
8
|
|
|
9
|
-
1. **Qwen OAuth** — Log in with your qwen.ai account (free
|
|
9
|
+
1. **Qwen OAuth** — Log in with your qwen.ai account (free tier discontinued 2026-04-15)
|
|
10
10
|
2. **Alibaba Cloud Coding Plan** — Use an API key from Alibaba Cloud
|
|
11
11
|
3. **API Key** — Bring your own API key
|
|
12
12
|
|
|
@@ -9,15 +9,21 @@ This guide provides solutions to common issues and debugging tips, including top
|
|
|
9
9
|
|
|
10
10
|
## Authentication or login errors
|
|
11
11
|
|
|
12
|
+
- **Error: `Qwen OAuth free tier was discontinued on 2026-04-15`**
|
|
13
|
+
- **Cause:** Qwen OAuth is no longer available as of April 15, 2026.
|
|
14
|
+
- **Solution:** Switch to a different authentication method. Run `qwen` → `/auth` and choose one of:
|
|
15
|
+
- **API Key**: Use an API key from Alibaba Cloud Model Studio ([Beijing](https://bailian.console.aliyun.com/) / [intl](https://modelstudio.console.alibabacloud.com/)). See the API setup guide ([Beijing](https://bailian.console.aliyun.com/cn-beijing/?tab=doc#/doc/?type=model&url=3023091) / [intl](https://modelstudio.console.alibabacloud.com/ap-southeast-1?tab=doc#/doc/?type=model&url=2974721)).
|
|
16
|
+
- **Alibaba Cloud Coding Plan**: Subscribe for a fixed monthly fee with higher quotas. See the Coding Plan guide ([Beijing](https://bailian.console.aliyun.com/cn-beijing/?tab=coding-plan#/efm/coding-plan-index) / [intl](https://modelstudio.console.alibabacloud.com/?tab=coding-plan#/efm/coding-plan-index)).
|
|
17
|
+
|
|
12
18
|
- **Error: `UNABLE_TO_GET_ISSUER_CERT_LOCALLY`, `UNABLE_TO_VERIFY_LEAF_SIGNATURE`, or `unable to get local issuer certificate`**
|
|
13
19
|
- **Cause:** You may be on a corporate network with a firewall that intercepts and inspects SSL/TLS traffic. This often requires a custom root CA certificate to be trusted by Node.js.
|
|
14
20
|
- **Solution:** Set the `NODE_EXTRA_CA_CERTS` environment variable to the absolute path of your corporate root CA certificate file.
|
|
15
21
|
- Example: `export NODE_EXTRA_CA_CERTS=/path/to/your/corporate-ca.crt`
|
|
16
22
|
|
|
17
23
|
- **Error: `Device authorization flow failed: fetch failed`**
|
|
18
|
-
- **Cause:** Node.js could not reach Qwen OAuth endpoints (often a proxy or SSL/TLS trust issue). When available, Qwen Code will also print the underlying error cause (for example: `UNABLE_TO_VERIFY_LEAF_SIGNATURE`).
|
|
24
|
+
- **Cause:** Node.js could not reach Qwen OAuth endpoints (often a proxy or SSL/TLS trust issue). When available, Qwen Code will also print the underlying error cause (for example: `UNABLE_TO_VERIFY_LEAF_SIGNATURE`). Note: this error is specific to the legacy Qwen OAuth flow.
|
|
19
25
|
- **Solution:**
|
|
20
|
-
-
|
|
26
|
+
- If you are still using Qwen OAuth, switch to API Key or Coding Plan via `/auth`.
|
|
21
27
|
- If you are behind a proxy, set it via `qwen --proxy <url>` (or the `proxy` setting in `settings.json`).
|
|
22
28
|
- If your network uses a corporate TLS inspection CA, set `NODE_EXTRA_CA_CERTS` as described above.
|
|
23
29
|
|
|
@@ -41,7 +47,7 @@ This guide provides solutions to common issues and debugging tips, including top
|
|
|
41
47
|
Refer to [Qwen Code Configuration](../configuration/settings) for more details.
|
|
42
48
|
|
|
43
49
|
- **Q: Why don't I see cached token counts in my stats output?**
|
|
44
|
-
- A: Cached token information is only displayed when cached tokens are being used. This feature is available for API key users (
|
|
50
|
+
- A: Cached token information is only displayed when cached tokens are being used. This feature is available for API key users (e.g., Alibaba Cloud Model Studio API key or Google Cloud Vertex AI). You can still view your total token usage using the `/stats` command.
|
|
45
51
|
|
|
46
52
|
## Common error messages and solutions
|
|
47
53
|
|