@qwen-code/qwen-code 0.15.12-preview.2 → 0.16.0-nightly.20260522.48b0a8bfc

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.
Files changed (97) hide show
  1. package/bundled/qc-helper/docs/configuration/settings.md +69 -71
  2. package/bundled/qc-helper/docs/features/_meta.ts +2 -0
  3. package/bundled/qc-helper/docs/features/approval-mode.md +119 -2
  4. package/bundled/qc-helper/docs/features/auto-mode.md +263 -0
  5. package/bundled/qc-helper/docs/features/commands.md +11 -10
  6. package/bundled/qc-helper/docs/features/lsp.md +87 -10
  7. package/bundled/qc-helper/docs/features/skills.md +3 -0
  8. package/bundled/qc-helper/docs/features/structured-output.md +309 -0
  9. package/bundled/qc-helper/docs/features/sub-agents.md +47 -5
  10. package/bundled/qc-helper/docs/qwen-serve.md +179 -24
  11. package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +11 -11
  12. package/bundled/review/SKILL.md +12 -3
  13. package/bundled/stuck/SKILL.md +124 -0
  14. package/chunks/{agent-UQY6A6OS.js → agent-GRCSD6XI.js} +15 -17
  15. package/chunks/{anthropicContentGenerator-4QE6LTVV.js → anthropicContentGenerator-RQJNXJIY.js} +7 -4
  16. package/chunks/{askUserQuestion-QFSCBTUO.js → askUserQuestion-PQPMPNM3.js} +2 -2
  17. package/chunks/{ca-VQSV6JHA.js → ca-UZ7BANMN.js} +29 -3
  18. package/chunks/{chunk-B7ZL7HUA.js → chunk-4AOCVI6J.js} +2 -1
  19. package/chunks/{chunk-PCL3EJGY.js → chunk-4U3O4VDA.js} +4722 -3823
  20. package/chunks/{chunk-AEJ2DKLP.js → chunk-C6WMLUNB.js} +1 -1
  21. package/chunks/{chunk-FSYKVGER.js → chunk-C7PY32RJ.js} +115 -23
  22. package/chunks/{chunk-JMZQICAL.js → chunk-CAVZVZX6.js} +2 -2
  23. package/chunks/{chunk-CAWKL3UC.js → chunk-CSWBPY3P.js} +2 -2
  24. package/chunks/{chunk-G27O2LD2.js → chunk-D5NTAHYL.js} +1 -1
  25. package/chunks/{chunk-BXNCPI75.js → chunk-DMIMF3CG.js} +2 -2
  26. package/chunks/{chunk-OCC4MZRS.js → chunk-F23NCRJ2.js} +1 -1
  27. package/chunks/{chunk-SOIEFHIK.js → chunk-G7YTSRES.js} +1 -100
  28. package/chunks/{chunk-SQNQIOD5.js → chunk-GGNTZ2NH.js} +92 -21
  29. package/chunks/{chunk-FKVKVE6N.js → chunk-KXZ4TJB4.js} +1 -1
  30. package/chunks/{chunk-CBVB66WY.js → chunk-L5E26RN6.js} +2 -2
  31. package/chunks/{chunk-UXW7MYAW.js → chunk-MAY32HXD.js} +376 -1
  32. package/chunks/{chunk-2WFU3IUH.js → chunk-OZO6R4KI.js} +11796 -4086
  33. package/chunks/{chunk-CM2IESUE.js → chunk-PR4T27R7.js} +1 -1
  34. package/chunks/{chunk-FYMSCRHM.js → chunk-PVVL5Q3W.js} +32 -1
  35. package/chunks/{chunk-MXBWOU2L.js → chunk-TM4RMEYN.js} +17 -349
  36. package/chunks/{chunk-YHEAJFCI.js → chunk-USE2VQ5P.js} +3 -0
  37. package/chunks/chunk-UY2AYRZF.js +19126 -0
  38. package/chunks/{chunk-GJXIKCKL.js → chunk-XP27SJMH.js} +76 -5
  39. package/chunks/chunk-XTYIPAUG.js +379 -0
  40. package/chunks/{chunk-TPGOGCWM.js → chunk-YJLGXDQJ.js} +1 -1
  41. package/chunks/{contextCommand-MQRG6RMG.js → contextCommand-O2OLCMOG.js} +17 -19
  42. package/chunks/{cron-create-WUTD5ZTH.js → cron-create-IGYXQVG4.js} +28 -2
  43. package/chunks/{cron-delete-N3UQYCRA.js → cron-delete-ETKIZCWT.js} +2 -2
  44. package/chunks/{cron-list-Z6RJJ4YH.js → cron-list-BVCUSWRU.js} +2 -2
  45. package/chunks/{de-M2IPQRBS.js → de-V4IE2OOZ.js} +29 -3
  46. package/chunks/{dist-RRYNPBOE.js → dist-4L54HRX2.js} +2 -2
  47. package/chunks/{dist-WP4AH3VK.js → dist-BXDUQ2QY.js} +1 -1
  48. package/chunks/{dist-M6GFCZ7S.js → dist-MN2PDDPR.js} +1 -1
  49. package/chunks/{edit-3KCBTA25.js → edit-NRL5ZYWP.js} +32 -18
  50. package/chunks/{en-N5GMPCVT.js → en-HGJ2SPLM.js} +32 -3
  51. package/chunks/{enter-worktree-VWS5QZTU.js → enter-worktree-TLT6EXVN.js} +41 -17
  52. package/chunks/{exit-worktree-RVXFWAPD.js → exit-worktree-PE7RZMLE.js} +41 -17
  53. package/chunks/{exitPlanMode-UL5DILDG.js → exitPlanMode-JYMKAHYD.js} +15 -17
  54. package/chunks/{fr-BTHRYEXO.js → fr-CJULI7ZX.js} +29 -3
  55. package/chunks/{geminiContentGenerator-O2OPGHJG.js → geminiContentGenerator-GYIOVT4A.js} +3 -3
  56. package/chunks/{glob-57BSREPN.js → glob-T7KIVIWT.js} +15 -17
  57. package/chunks/{grep-XO5JOC7T.js → grep-4KI7ZJR5.js} +15 -17
  58. package/chunks/{ja-D63TAEBO.js → ja-L7CHRQEW.js} +29 -3
  59. package/chunks/{keychain-token-storage-DMFP5IJM.js → keychain-token-storage-335UOLJ6.js} +2 -2
  60. package/chunks/{ls-SUILOZZB.js → ls-7HD6XG3V.js} +3 -3
  61. package/chunks/{lsp-6TQBWVMZ.js → lsp-ZZSFCIWD.js} +2 -2
  62. package/chunks/{monitor-BECPGO3K.js → monitor-L5YPPGVO.js} +45 -26
  63. package/chunks/notebook-edit-HYXLIC3D.js +756 -0
  64. package/chunks/{openaiContentGenerator-KEZQHIRM.js → openaiContentGenerator-XRP5JM6P.js} +12 -11
  65. package/chunks/{pt-XUV7FSKC.js → pt-M6JULLEQ.js} +29 -3
  66. package/chunks/{qwenContentGenerator-RPMRXTNH.js → qwenContentGenerator-EOX3HZXX.js} +17 -19
  67. package/chunks/{qwenOAuth2-JSQ7EPR3.js → qwenOAuth2-EEJGROP7.js} +9 -3
  68. package/chunks/{read-file-LGHEIQNH.js → read-file-3XOYPTIB.js} +7 -8
  69. package/chunks/{ripGrep-6SFSXZ2G.js → ripGrep-5QUURWGU.js} +15 -17
  70. package/chunks/{ru-7KHWMN3A.js → ru-QILM4HBC.js} +29 -3
  71. package/chunks/{send-message-Q2JRAC3J.js → send-message-ULK4MQXJ.js} +23 -2
  72. package/chunks/{serve-27O2AFE3.js → serve-AZ44ZNWF.js} +8864 -1351
  73. package/chunks/{shell-J7K5KYCH.js → shell-O6OTTSIP.js} +15 -17
  74. package/chunks/{skill-2R7P4ATS.js → skill-MUGS3H4M.js} +23 -10
  75. package/chunks/{src-CGEDVW67.js → src-YCQBAYCP.js} +292 -28
  76. package/chunks/{syntheticOutput-S4DRGMQM.js → syntheticOutput-IS2X5OZ2.js} +3 -3
  77. package/chunks/{task-stop-7THHVAQS.js → task-stop-7QSJGSSP.js} +2 -2
  78. package/chunks/{todoWrite-WKUGUTPX.js → todoWrite-7CVACFUX.js} +3 -3
  79. package/chunks/{tool-search-XOH3ZWVS.js → tool-search-UFDQJOXT.js} +7 -8
  80. package/chunks/{web-fetch-OZE6ZQUF.js → web-fetch-ENQ2I5JA.js} +7 -4
  81. package/chunks/{write-file-74NQ27Q2.js → write-file-GBLDDYQT.js} +29 -18
  82. package/chunks/{zh-VGHU6XBB.js → zh-PWL2NKY3.js} +32 -3
  83. package/chunks/{zh-TW-O36Q4V7E.js → zh-TW-S3YGWICZ.js} +32 -3
  84. package/cli.js +61338 -76795
  85. package/locales/ca.js +44 -5
  86. package/locales/de.js +44 -5
  87. package/locales/en.js +49 -5
  88. package/locales/fr.js +45 -5
  89. package/locales/ja.js +43 -5
  90. package/locales/pt.js +43 -5
  91. package/locales/ru.js +43 -5
  92. package/locales/zh-TW.js +46 -4
  93. package/locales/zh.js +46 -4
  94. package/package.json +2 -2
  95. package/chunks/chunk-5P5XGNYH.js +0 -93
  96. package/chunks/chunk-SYCJMSIJ.js +0 -82
  97. package/chunks/chunk-Y6Z2O3WR.js +0 -33
@@ -0,0 +1,263 @@
1
+ # Auto Mode
2
+
3
+ Auto Mode uses an LLM classifier to evaluate each tool call and decide
4
+ whether to auto-approve it. It sits between Auto-Edit (which only
5
+ auto-approves file edits) and YOLO (which auto-approves everything).
6
+
7
+ This page is the reference for configuring and troubleshooting Auto Mode.
8
+ For an introduction, see the
9
+ [Approval Mode overview](./approval-mode.md#4-auto-mode---classifier-driven-approval).
10
+
11
+ ## How it works
12
+
13
+ When you're in Auto Mode and the agent tries to run a tool, Qwen Code
14
+ walks three layers in order:
15
+
16
+ 1. **acceptEdits fast-path** — Edit / Write whose target path is inside
17
+ the workspace is auto-approved without invoking the classifier.
18
+ 2. **Safe-tool allowlist** — Read-only and metadata-only built-in tools
19
+ (Read, Grep, Glob, LS, LSP, TodoWrite, AskUserQuestion, etc.) are
20
+ auto-approved without invoking the classifier.
21
+ 3. **LLM classifier** — Everything else (shell commands, web fetches,
22
+ sub-agent spawns, edits outside the workspace, MCP tools) is sent to
23
+ a two-stage classifier:
24
+ - **Stage 1 (fast)** — outputs `{ shouldBlock }` only. Around ~300ms.
25
+ If `shouldBlock` is `false`, the action is allowed and the call
26
+ proceeds.
27
+ - **Stage 2 (thinking)** — only runs when Stage 1 said block. Uses
28
+ chain-of-thought review to reduce Stage 1 false positives. Can
29
+ downgrade Stage 1's block to allow. Outputs the user-visible
30
+ `reason` on block.
31
+
32
+ The classifier uses your configured fast model
33
+ (`/model --fast`). If no fast model is configured, the main session
34
+ model is used instead.
35
+
36
+ ## Hard rules still win
37
+
38
+ Auto Mode does **not** replace hard permission rules. Before the classifier
39
+ runs:
40
+
41
+ - `permissions.deny` rules block the action with the rule's reason. The
42
+ classifier never sees it.
43
+ - `permissions.allow` rules with specific specifiers (e.g.
44
+ `Bash(git status)`, `Read(./docs/**)`) still auto-allow without the
45
+ classifier.
46
+ - `permissions.ask` rules force manual confirmation even in Auto Mode.
47
+
48
+ ## Over-broad allow rules are stripped while in Auto Mode
49
+
50
+ Rules like the following would let the agent execute arbitrary code
51
+ without classifier review:
52
+
53
+ - `Bash` / `Bash(*)` / `Bash()` — auto-allow every shell command
54
+ - `Bash(python:*)`, `Bash(node*)`, `Bash(bash*)` — interpreter wildcards
55
+ - `Agent` / `Agent(coder)` — any allow on the Agent tool
56
+ - `Skill` / `Skill(pdf)` — any allow on the Skill tool
57
+
58
+ When you enter Auto Mode, Qwen Code temporarily removes these rules from
59
+ the active permission set and prints a notice listing them. The rules
60
+ come back the moment you leave Auto Mode. `settings.json` is never
61
+ modified.
62
+
63
+ If you genuinely need these broad rules, use YOLO mode instead.
64
+
65
+ ## Configuring hints
66
+
67
+ Auto Mode reads `permissions.autoMode` from your `settings.json`. The
68
+ entries are natural-language descriptions, not rule patterns — they are
69
+ injected additively into the classifier's system prompt alongside the
70
+ built-in defaults.
71
+
72
+ ```json
73
+ {
74
+ "permissions": {
75
+ "autoMode": {
76
+ "hints": {
77
+ "allow": [
78
+ "Running poetry install and poetry update in this Python project",
79
+ "Cleaning build artifacts under ./dist or ./build",
80
+ "Reading any file under /Users/me/code/"
81
+ ],
82
+ "deny": [
83
+ "Any network call to intranet.example.com endpoints",
84
+ "Modifying anything under ~/.ssh or ~/.aws",
85
+ "Running migration scripts that touch the production DB"
86
+ ]
87
+ },
88
+ "environment": [
89
+ "This is a private monorepo with strict commit signing",
90
+ "Production credentials live in 1Password, never in plain files"
91
+ ]
92
+ }
93
+ }
94
+ }
95
+ ```
96
+
97
+ ### Length and count limits
98
+
99
+ To keep the classifier system prompt small:
100
+
101
+ - Each entry is capped at 200 characters (longer entries are truncated
102
+ with a warning).
103
+ - `hints.allow` and `hints.deny` accept up to 50 entries each.
104
+ - `environment` accepts up to 20 entries.
105
+
106
+ ### Layering across settings files
107
+
108
+ `autoMode` is merged across system / user / workspace settings the same
109
+ way other permission settings are: arrays are concatenated and
110
+ de-duplicated.
111
+
112
+ ## Reading the decision
113
+
114
+ When the classifier blocks an action, the tool call fails with one of
115
+ the following error texts:
116
+
117
+ - **`Blocked by auto mode policy: <reason>`** — the classifier judged
118
+ the action unsafe. The reason comes from Stage 2 of the classifier.
119
+ - **`Auto mode classifier unavailable; action blocked for safety`** —
120
+ the classifier API was unreachable, timed out, or returned an
121
+ un-parseable response. This is fail-closed behavior: when in doubt,
122
+ block.
123
+
124
+ The main LLM sees the same message in the tool result and adjusts its
125
+ approach (asks you, switches tactic, gives up).
126
+
127
+ ### Classifier reason language
128
+
129
+ Classifier reasons are produced by the LLM and are not translated. If you
130
+ want non-English reasons, add a hint like
131
+ `Respond reasons in Chinese` to `permissions.autoMode.environment`.
132
+
133
+ ## Fallback to manual approval
134
+
135
+ Auto Mode protects you from getting stuck:
136
+
137
+ - After **3 consecutive policy blocks** the next tool call falls back to
138
+ the standard manual-approval prompt. This catches the case where the
139
+ agent keeps trying minor variants of a forbidden command.
140
+ - After **2 consecutive unavailable** results (classifier API failures)
141
+ the next tool call also falls back. This avoids waiting on a broken
142
+ classifier.
143
+
144
+ The session itself stays in Auto Mode — only the single fallback call
145
+ goes through manual approval. The counters reset when you approve the
146
+ fallback call or switch modes.
147
+
148
+ If you find yourself constantly hitting fallback, the most likely causes
149
+ are an outage on the classifier API or hints that need tuning. Switch to
150
+ Default Mode while you investigate.
151
+
152
+ ## Troubleshooting
153
+
154
+ **"Auto mode keeps blocking my commands"**
155
+
156
+ Look at the reason in the error message. If the classifier is being too
157
+ conservative for your context, add an entry to
158
+ `permissions.autoMode.hints.allow` describing the pattern in
159
+ natural-language. Examples:
160
+
161
+ - `"Building Docker images for this project (docker build ...)"`
162
+ - `"Running database migrations against the local test DB"`
163
+
164
+ **"Auto mode classifier unavailable"**
165
+
166
+ The classifier API didn't respond. Possible causes:
167
+
168
+ - Network issue between you and the model endpoint.
169
+ - The configured fast model is no longer available — check `/model --fast`.
170
+ - The transcript is too long and exceeds the fast-model context window.
171
+
172
+ While diagnosing, switch back to Default Mode: `/approval-mode default`.
173
+
174
+ **"Falling back to manual approval"**
175
+
176
+ You've hit either the 3-consecutive-block or 2-consecutive-unavailable
177
+ guard. Approve or reject the prompt as you normally would. After one
178
+ approved fallback the consecutive counter resets.
179
+
180
+ **The classifier sees sensitive data in my prompts**
181
+
182
+ Tool inputs are projected through each tool's `toAutoClassifierInput`
183
+ method before they reach the classifier. Long edit content, web fetch
184
+ prompts, and sub-agent prompts are truncated. Tool results (file
185
+ contents, web pages) are never sent to the classifier — only the user's
186
+ text and assistant tool-use calls go through.
187
+
188
+ If a specific tool is exposing fields you'd rather redact, file an issue
189
+ with the tool name; the projection is per-tool and is meant to be
190
+ tightened over time.
191
+
192
+ ## Limitations
193
+
194
+ - **Not offline-capable.** The classifier requires an LLM call.
195
+ - **Adds latency on the slow path.** Allowlist + acceptEdits cover most
196
+ calls without latency, but a `run_shell_command` typically adds
197
+ ~300ms (fast classifier path) or ~3-5s (slow path with thinking
198
+ review).
199
+ - **Not a substitute for `deny` rules.** The classifier is best-effort.
200
+ For commands you're sure should never run, put them in
201
+ `permissions.deny`.
202
+ - **MCP tools default to conservative blocking.** Third-party MCP tools
203
+ (`mcp__*`) opt-in to argument forwarding via the
204
+ `toAutoClassifierInput` override. Tools that have not opted in expose
205
+ only their name to the classifier — most such calls are
206
+ conservatively blocked unless you've written an explicit `allow`
207
+ rule. This is fail-closed by design (credentials and voluminous
208
+ content do not leak into the classifier LLM). If you trust a
209
+ specific MCP tool, add `permissions.allow: ["mcp__server__tool"]` so
210
+ it bypasses the classifier entirely.
211
+
212
+ ## FAQ
213
+
214
+ **Does Auto Mode send my code to a third party?**
215
+
216
+ Auto Mode reuses your existing model configuration — same endpoint as
217
+ the main agent. If you've configured Qwen Code to use a self-hosted
218
+ model, the classifier runs against that endpoint too.
219
+
220
+ **Will my secrets / `.env` contents reach the classifier?**
221
+
222
+ The classifier sees only what each tool's `toAutoClassifierInput`
223
+ projection exposes:
224
+
225
+ - `read_file` and other read-only tools: not invoked (they're on the
226
+ fast-path allowlist).
227
+ - `edit` / `write_file`: file_path plus the first 80 characters of
228
+ old/new content. Full content is not forwarded.
229
+ - `run_shell_command`: the full command (it has to — that's what the
230
+ classifier judges).
231
+ - `web_fetch`: the URL only. The prompt field is not forwarded.
232
+ - `agent`: subagent type plus the full prompt. The prompt is the
233
+ instruction the sub-agent will follow, so the classifier needs it
234
+ in full to detect attacks that would steer the sub-agent toward
235
+ destructive actions — same reason `run_shell_command` forwards the
236
+ full command.
237
+
238
+ Tool results (the actual content returned by tools) are stripped from
239
+ the classifier transcript entirely.
240
+
241
+ MCP tools (`mcp__*`) follow a stricter default: their parameters are
242
+ not forwarded unless the MCP tool author explicitly opted in via the
243
+ `toAutoClassifierInput` override. The classifier sees the tool name
244
+ but no arguments, so most MCP calls will be conservatively blocked
245
+ unless the user has written an explicit allow rule. This is fail-
246
+ closed by design — third-party tools should not leak credentials or
247
+ voluminous file content into the classifier LLM without intent.
248
+
249
+ **Can I disable the first-time information message?**
250
+
251
+ It only shows once per user-settings file. After dismissal,
252
+ `ui.autoModeAcknowledged: true` is set in your user settings.
253
+
254
+ **How is this different from Auto-Edit?**
255
+
256
+ Auto-Edit auto-approves file edits and nothing else — shell commands
257
+ still ask. Auto Mode uses a classifier to also auto-approve safe shell
258
+ commands and other tool calls while still blocking risky ones.
259
+
260
+ **How is this different from YOLO?**
261
+
262
+ YOLO auto-approves everything without any review. Auto Mode has the
263
+ classifier in the loop and blocks risky actions.
@@ -212,16 +212,17 @@ this setting.
212
212
 
213
213
  Commands for obtaining information and performing system settings.
214
214
 
215
- | Command | Description | Usage Examples |
216
- | ----------- | ----------------------------------------------- | -------------------------------- |
217
- | `/help` | Display help information for available commands | `/help` or `/?` |
218
- | `/about` | Display version information | `/about` |
219
- | `/stats` | Display detailed statistics for current session | `/stats` |
220
- | `/settings` | Open settings editor | `/settings` |
221
- | `/auth` | Change authentication method | `/auth` |
222
- | `/bug` | Submit issue about Qwen Code | `/bug Button click unresponsive` |
223
- | `/copy` | Copy last output content to clipboard | `/copy` |
224
- | `/quit` | Exit Qwen Code immediately | `/quit` or `/exit` |
215
+ | Command | Description | Usage Examples |
216
+ | --------------- | ----------------------------------------------- | -------------------------------- |
217
+ | `/help` | Display help information for available commands | `/help` or `/?` |
218
+ | `/status` | Display version information | `/status` or `/about` |
219
+ | `/status paths` | Display current session file and log paths | `/status paths` |
220
+ | `/stats` | Display detailed statistics for current session | `/stats` |
221
+ | `/settings` | Open settings editor | `/settings` |
222
+ | `/auth` | Change authentication method | `/auth` |
223
+ | `/bug` | Submit issue about Qwen Code | `/bug Button click unresponsive` |
224
+ | `/copy` | Copy last output content to clipboard | `/copy` |
225
+ | `/quit` | Exit Qwen Code immediately | `/quit` or `/exit` |
225
226
 
226
227
  ### 1.9 Common Shortcuts
227
228
 
@@ -344,7 +344,7 @@ You can override trust requirements for specific servers in their configuration:
344
344
  2. **Check if the server is installed**: Run the command manually (e.g. `clangd --version`) to verify
345
345
  3. **Check the command**: The server binary must be in your system `PATH`, or specified as an absolute path (e.g. `/opt/llvm/bin/clangd`). Relative paths that escape the workspace are blocked
346
346
  4. **Check workspace trust**: The workspace must be trusted for LSP (use `/trust`)
347
- 5. **Check logs**: Look for `[LSP]` entries in the debug log (see Debugging section below)
347
+ 5. **Check logs**: Start Qwen Code with `--debug`, then search for LSP-related entries in the debug log (see Debugging section below)
348
348
  6. **Check the process**: Run `ps aux | grep <server-name>` to verify the server process is running
349
349
 
350
350
  ### Slow Performance
@@ -361,19 +361,78 @@ You can override trust requirements for specific servers in their configuration:
361
361
 
362
362
  ### Debugging
363
363
 
364
- LSP debug logs are automatically written to session log files in `~/.qwen/debug/`. To check LSP-related entries:
364
+ LSP does not have a separate debug flag. Use Qwen Code's normal debug mode together with the LSP feature flag:
365
365
 
366
366
  ```bash
367
- # View the latest session log
368
- grep '\[LSP\]' ~/.qwen/debug/latest
367
+ qwen --experimental-lsp --debug
368
+ ```
369
+
370
+ Debug logs are written to the session debug log directory. To check LSP-related entries:
371
+
372
+ ```bash
373
+ # Default runtime directory
374
+ rg "LSP|Native LSP|clangd|connection closed" ~/.qwen/debug/latest
375
+ # Or, without ripgrep:
376
+ grep -E "LSP|Native LSP|clangd|connection closed" ~/.qwen/debug/latest
377
+
378
+ # If QWEN_RUNTIME_DIR is configured
379
+ rg "LSP|Native LSP|clangd|connection closed" "$QWEN_RUNTIME_DIR/debug/latest"
380
+ ```
381
+
382
+ Useful entries include:
383
+
384
+ - `[LSP] ...`: Logs emitted by the native LSP service and server manager.
385
+ - `[CONFIG] Native LSP status after discovery: ...`: LSP server configuration discovered for the session.
386
+ - `[CONFIG] Native LSP status after startup: ...`: Server startup result, including ready/failed counts.
387
+ - `[STATUS] LSP status snapshot for /status: ...`: Status snapshot printed when running `/status` in debug mode.
369
388
 
370
- # Common error messages to look for:
371
- # "command path is unsafe" → relative path escapes workspace, use absolute path or add to PATH
372
- # "command not found" → server binary not installed or not in PATH
373
- # "requires trusted workspace" → run /trust first
389
+ You can also run `/status` in the CLI to see a short LSP summary:
390
+
391
+ ```text
392
+ LSP: disabled
393
+ LSP: enabled, 1/1 ready
394
+ LSP: enabled, 0/1 ready (1 failed)
395
+ LSP: enabled, no servers configured
396
+ LSP: enabled, status unavailable
374
397
  ```
375
398
 
376
- You can also verify the server process is running:
399
+ For per-server details, run `/lsp`:
400
+
401
+ ```text
402
+ **LSP Server Status**
403
+
404
+ | Server | Command | Languages | Status |
405
+ |--------|---------|-----------|--------|
406
+ | clangd | `clangd` | c, cpp | READY |
407
+ | pyright | `pyright-langserver` | python | FAILED - startup failed |
408
+ ```
409
+
410
+ Common error messages to look for:
411
+
412
+ ```text
413
+ command path is unsafe -> relative path escapes workspace, use absolute path or add to PATH
414
+ command not found -> server binary not installed or not in PATH
415
+ requires trusted workspace -> run /trust first
416
+ LSP connection closed -> server started but exited or closed stdio before replying to initialize
417
+ ```
418
+
419
+ For clangd startup failures, verify the server directly from the project root:
420
+
421
+ ```bash
422
+ clangd --version
423
+ clangd --check=/path/to/file.cpp --log=verbose
424
+ ```
425
+
426
+ C/C++ projects should usually provide a `compile_commands.json` or `compile_flags.txt`. If the compile database is in a build directory, pass it to clangd:
427
+
428
+ ```json
429
+ {
430
+ "cpp": {
431
+ "command": "clangd",
432
+ "args": ["--background-index", "--compile-commands-dir=build"]
433
+ }
434
+ }
435
+ ```
377
436
 
378
437
  ```bash
379
438
  ps aux | grep clangd # or typescript-language-server, jdtls, etc.
@@ -402,7 +461,25 @@ qwen --experimental-lsp
402
461
 
403
462
  ### Q: How do I know which language servers are running?
404
463
 
405
- Check the debug log for `[LSP]` entries (`grep '\[LSP\]' ~/.qwen/debug/latest`), or verify the process directly with `ps aux | grep <server-name>`.
464
+ Start Qwen Code with LSP and debug mode enabled:
465
+
466
+ ```bash
467
+ qwen --experimental-lsp --debug
468
+ ```
469
+
470
+ Then run `/status` for a short summary, `/lsp` for per-server status, or inspect the debug log:
471
+
472
+ ```bash
473
+ # Default runtime directory
474
+ rg "LSP|Native LSP|<server-name>" ~/.qwen/debug/latest
475
+ # Or:
476
+ grep -E "LSP|Native LSP|<server-name>" ~/.qwen/debug/latest
477
+
478
+ # If QWEN_RUNTIME_DIR is configured
479
+ rg "LSP|Native LSP|<server-name>" "$QWEN_RUNTIME_DIR/debug/latest"
480
+ ```
481
+
482
+ LSP uses Qwen Code's normal `--debug` mode; there is no separate LSP debug flag.
406
483
 
407
484
  ### Q: Can I use multiple language servers for the same file type?
408
485
 
@@ -74,6 +74,7 @@ Create a `SKILL.md` file with YAML frontmatter and Markdown content:
74
74
  ---
75
75
  name: your-skill-name
76
76
  description: Brief description of what this Skill does and when to use it
77
+ priority: 10
77
78
  ---
78
79
 
79
80
  # Your Skill Name
@@ -91,11 +92,13 @@ Qwen Code currently validates that:
91
92
 
92
93
  - `name` is a non-empty string matching `/^[\p{L}\p{N}_:.-]+$/u` — Unicode letters and digits (CJK / Cyrillic / accented Latin all OK), plus `_`, `:`, `.`, `-`. Whitespace, slashes, brackets and other structurally unsafe characters are rejected at parse time.
93
94
  - `description` is a non-empty string
95
+ - `priority` is optional. When present, it must be a finite number. Higher values sort earlier in the `/skills` listing only — slash-command completion (typing `/`) and the `/help` custom commands view stay alphabetical, so a high-priority Skill never reorders built-in commands. Omitted or invalid values are treated as unset, which behaves like `0`.
94
96
 
95
97
  Recommended conventions:
96
98
 
97
99
  - Prefer lowercase ASCII with hyphens for shareable names (e.g. `tsx-helper`)
98
100
  - Make `description` specific: include both **what** the Skill does and **when** to use it (key words users will naturally mention)
101
+ - Use `priority` sparingly for Skills that should reliably appear before the default alphabetical order in `/skills`. Negative priorities are allowed and sort below unset Skills.
99
102
 
100
103
  ### Optional: gate a Skill on file paths (`paths:`)
101
104