@qwen-code/qwen-code 0.18.1-nightly.20260616.a68b2e1e7 → 0.18.1-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.
Files changed (38) hide show
  1. package/bundled/qc-helper/docs/features/sub-agents.md +3 -3
  2. package/bundled/review/SKILL.md +3 -1
  3. package/bundled/simplify/SKILL.md +1 -1
  4. package/chunks/{agent-PXMT2XR5.js → agent-WK5GYOPC.js} +2 -2
  5. package/chunks/{agent-headless-SY7VJUHV.js → agent-headless-KZJALDQF.js} +2 -2
  6. package/chunks/{chunk-ABRZC6FA.js → chunk-27STU35P.js} +5 -5
  7. package/chunks/{chunk-UOB6KPGG.js → chunk-BW7CMDF3.js} +1 -1
  8. package/chunks/{chunk-TSBXGR73.js → chunk-DYCU43TE.js} +3 -3
  9. package/chunks/{chunk-A3OEZT2F.js → chunk-E322ZT4P.js} +3 -3
  10. package/chunks/{chunk-H4ZDM3N6.js → chunk-Q3NN2XUW.js} +104 -45
  11. package/chunks/{chunk-M5PJ5QAF.js → chunk-RLFLJVHU.js} +1 -1
  12. package/chunks/{computer-use-7SEQDSHB.js → computer-use-4ELNIZMF.js} +2 -2
  13. package/chunks/{contextCommand-KM5OWV65.js → contextCommand-E2V26QGD.js} +4 -4
  14. package/chunks/{edit-BMUKPLA7.js → edit-IC3ECG44.js} +2 -2
  15. package/chunks/{enter-worktree-LXJ5WJ5A.js → enter-worktree-ETQWM7BB.js} +2 -2
  16. package/chunks/{enterPlanMode-QWRZ54ZF.js → enterPlanMode-VL3F45RF.js} +2 -2
  17. package/chunks/{exit-worktree-5HTQPNZO.js → exit-worktree-F5BJXBFB.js} +2 -2
  18. package/chunks/{exitPlanMode-5WQAXNDA.js → exitPlanMode-VOC7G5FJ.js} +2 -2
  19. package/chunks/{geminiContentGenerator-CAKHT5YE.js → geminiContentGenerator-7D2QZ5FE.js} +1 -1
  20. package/chunks/{glob-5DN6NSCD.js → glob-XTABUPPR.js} +2 -2
  21. package/chunks/{grep-BJILOLCD.js → grep-MRCXYH2N.js} +2 -2
  22. package/chunks/{monitor-SUEMSRN3.js → monitor-LNRRNJJB.js} +2 -2
  23. package/chunks/{notebook-edit-6F6Z5P6U.js → notebook-edit-IS3UYVGM.js} +2 -2
  24. package/chunks/{openaiContentGenerator-DO27LL6O.js → openaiContentGenerator-P772OZ6K.js} +2 -2
  25. package/chunks/{qwenContentGenerator-DQLGLQSH.js → qwenContentGenerator-Y6YGZRHH.js} +3 -3
  26. package/chunks/{read-file-3TBLYTOQ.js → read-file-2JIJ646W.js} +1 -1
  27. package/chunks/{ripGrep-3INYT3QV.js → ripGrep-Z74CN4MW.js} +2 -2
  28. package/chunks/{scheduler-23KQW6CX.js → scheduler-KFG4TT3A.js} +2 -2
  29. package/chunks/{serve-Y5E4LKUI.js → serve-XDZAE3KF.js} +4 -4
  30. package/chunks/{shell-4H6XQXVY.js → shell-BTAJJJHO.js} +2 -2
  31. package/chunks/{skill-SE6FECZR.js → skill-LSM726DP.js} +1 -1
  32. package/chunks/{src-76DUBH3A.js → src-JMUZP4A4.js} +4 -2
  33. package/chunks/{team-create-Q5DTDDH4.js → team-create-S5ZBN464.js} +2 -2
  34. package/chunks/{tool-search-ABZMSDTU.js → tool-search-NUOEJ4LF.js} +1 -1
  35. package/chunks/{workflow-NEMDQB75.js → workflow-ZI3ZXNU6.js} +3 -3
  36. package/chunks/{write-file-VAEHZPSL.js → write-file-MHQLLZWY.js} +2 -2
  37. package/cli.js +12 -10
  38. package/package.json +2 -2
@@ -12,9 +12,9 @@ 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)
15
+ ## Fork Subagent
16
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.
17
+ In addition to named subagents, Qwen Code supports **forking** — selected explicitly with `subagent_type: "fork"` (available in interactive sessions). A fork inherits the parent's full conversation context and runs detached in the background. Omitting `subagent_type` does **not** fork; it launches the general-purpose subagent, which runs to completion and returns its result inline.
18
18
 
19
19
  ### How Fork Differs from Named Subagents
20
20
 
@@ -59,7 +59,7 @@ Fork children cannot create further forks. This is enforced at runtime — if a
59
59
  ## How Subagents Work
60
60
 
61
61
  1. **Configuration**: You create Subagents configurations that define their behavior, tools, and system prompts
62
- 2. **Delegation**: The main AI can automatically delegate tasks to appropriate Subagents — or implicitly fork when no specific subagent type is needed
62
+ 2. **Delegation**: The main AI can automatically delegate tasks to appropriate Subagents — or fork itself (`subagent_type: "fork"`) when it wants to inherit the full conversation context and discard the intermediate output
63
63
  3. **Execution**: Subagents work independently, using their configured tools to complete tasks
64
64
  4. **Results**: They return results and execution summaries back to the main conversation
65
65
 
@@ -159,7 +159,9 @@ Assign severity based on the tool's own categorization:
159
159
 
160
160
  ## Step 4: Parallel multi-dimensional review
161
161
 
162
- Launch review agents by invoking all `task` tools in a **single response**. The runtime executes agent tools concurrently — they will run in parallel. You MUST include all tool calls in one response; do NOT send them one at a time. Launch **9 agents** for same-repo reviews (Agent 6 has three persona variants 6a/6b/6c that each count as a separate parallel agent), or **8 agents** (skip Agent 7: Build & Test) for cross-repo lightweight mode since there is no local codebase to build/test. Each agent should focus exclusively on its dimension.
162
+ Launch review agents by invoking all `agent` tools in a **single response**. The runtime executes agent tools concurrently — they will run in parallel. You MUST include all tool calls in one response; do NOT send them one at a time. Launch **9 agents** for same-repo reviews (Agent 6 has three persona variants 6a/6b/6c that each count as a separate parallel agent), or **8 agents** (skip Agent 7: Build & Test) for cross-repo lightweight mode since there is no local codebase to build/test. Each agent should focus exclusively on its dimension.
163
+
164
+ **Every agent MUST be an awaitable subagent: set `subagent_type: "general-purpose"` on every `agent` call.** Do NOT fork them — do not omit `subagent_type`, and never set `subagent_type: "fork"`. A fork runs fire-and-forget and its findings never come back to you, so the review would stall in Step 5 with nothing to aggregate. You need every agent's findings returned to you inline.
163
165
 
164
166
  **IMPORTANT**: Keep each agent's prompt **short** (under 200 words) to fit all tool calls in one response. Do NOT paste the full diff — give each agent:
165
167
 
@@ -39,7 +39,7 @@ Use `git diff HEAD` whenever staged changes exist. Otherwise use `git diff`.
39
39
 
40
40
  ## Step 2: Launch three review passes in parallel
41
41
 
42
- Use the `agent` tool and launch all review passes in a single response so they run concurrently. Each pass must receive the same review scope and diff command. These passes are read-only: each one inspects and reports findings only and must not modify files — all edits happen later in Step 4.
42
+ Use the `agent` tool and launch all review passes in a single response so they run concurrently. **Set `subagent_type: "general-purpose"` on every call — each pass must be an awaitable subagent whose findings return to you inline. Do NOT fork them: do not omit `subagent_type`, and never set `subagent_type: "fork"`. A fork runs fire-and-forget and never returns its findings, so there would be nothing to aggregate in Step 3.** Each pass must receive the same review scope and diff command. These passes are read-only: each one inspects and reports findings only and must not modify files — all edits happen later in Step 4.
43
43
 
44
44
  Keep each review prompt short and focused. Do not paste the full diff into the prompt. Tell each pass to read the diff itself and inspect only files relevant to its findings.
45
45
 
@@ -7,7 +7,7 @@ import {
7
7
  hasRebuiltToolRegistry,
8
8
  rebuildToolRegistryOnOverride,
9
9
  resolveSubagentApprovalMode
10
- } from "./chunk-H4ZDM3N6.js";
10
+ } from "./chunk-Q3NN2XUW.js";
11
11
  import "./chunk-K5PGHDBN.js";
12
12
  import "./chunk-VXHYMZXW.js";
13
13
  import "./chunk-O4PICXES.js";
@@ -23,7 +23,7 @@ import "./chunk-CPVI5J2L.js";
23
23
  import "./chunk-ZMIBJS45.js";
24
24
  import "./chunk-77WXWU44.js";
25
25
  import "./chunk-B4ZF2KSI.js";
26
- import "./chunk-A3OEZT2F.js";
26
+ import "./chunk-E322ZT4P.js";
27
27
  import "./chunk-3PJXIDKI.js";
28
28
  import "./chunk-UWCTAVOD.js";
29
29
  import "./chunk-OFEVLU4C.js";
@@ -4,7 +4,7 @@ import {
4
4
  AgentHeadless,
5
5
  ContextState,
6
6
  templateString
7
- } from "./chunk-H4ZDM3N6.js";
7
+ } from "./chunk-Q3NN2XUW.js";
8
8
  import "./chunk-K5PGHDBN.js";
9
9
  import "./chunk-VXHYMZXW.js";
10
10
  import "./chunk-O4PICXES.js";
@@ -20,7 +20,7 @@ import "./chunk-CPVI5J2L.js";
20
20
  import "./chunk-ZMIBJS45.js";
21
21
  import "./chunk-77WXWU44.js";
22
22
  import "./chunk-B4ZF2KSI.js";
23
- import "./chunk-A3OEZT2F.js";
23
+ import "./chunk-E322ZT4P.js";
24
24
  import "./chunk-3PJXIDKI.js";
25
25
  import "./chunk-UWCTAVOD.js";
26
26
  import "./chunk-OFEVLU4C.js";
@@ -6,7 +6,7 @@ import {
6
6
  getLanguageSettingsOptions,
7
7
  t,
8
8
  writeStderrLine
9
- } from "./chunk-UOB6KPGG.js";
9
+ } from "./chunk-BW7CMDF3.js";
10
10
  import {
11
11
  DEFAULT_STOP_HOOK_BLOCK_CAP,
12
12
  DEFAULT_TOOL_OUTPUT_BATCH_BUDGET,
@@ -17,11 +17,11 @@ import {
17
17
  SkillError,
18
18
  ideContextStore,
19
19
  require_main
20
- } from "./chunk-H4ZDM3N6.js";
20
+ } from "./chunk-Q3NN2XUW.js";
21
21
  import {
22
22
  isWithinRoot,
23
23
  stripRuntimeSnapshotPrefix
24
- } from "./chunk-A3OEZT2F.js";
24
+ } from "./chunk-E322ZT4P.js";
25
25
  import {
26
26
  atomicWriteFileSync
27
27
  } from "./chunk-LXYWINWF.js";
@@ -19966,7 +19966,7 @@ __name(getPackageJson, "getPackageJson");
19966
19966
  // packages/cli/src/utils/version.ts
19967
19967
  async function getCliVersion() {
19968
19968
  const pkgJson = await getPackageJson();
19969
- return "0.18.1-nightly.20260616.a68b2e1e7";
19969
+ return "0.18.1-preview.0";
19970
19970
  }
19971
19971
  __name(getCliVersion, "getCliVersion");
19972
19972
 
@@ -20116,7 +20116,7 @@ import { execFile } from "node:child_process";
20116
20116
 
20117
20117
  // packages/cli/src/generated/git-commit.ts
20118
20118
  init_esbuild_shims();
20119
- var GIT_COMMIT_INFO = "d1b122e3a";
20119
+ var GIT_COMMIT_INFO = "d638823b9";
20120
20120
 
20121
20121
  // packages/cli/src/utils/systemInfo.ts
20122
20122
  var debugLogger4 = createDebugLogger("STATUS");
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  resolveBundleDir
5
- } from "./chunk-H4ZDM3N6.js";
5
+ } from "./chunk-Q3NN2XUW.js";
6
6
  import {
7
7
  Storage
8
8
  } from "./chunk-HA2UEYZP.js";
@@ -2,18 +2,18 @@
2
2
  "use strict";
3
3
  import {
4
4
  t
5
- } from "./chunk-UOB6KPGG.js";
5
+ } from "./chunk-BW7CMDF3.js";
6
6
  import {
7
7
  computeThresholds,
8
8
  getCoreSystemPrompt
9
- } from "./chunk-H4ZDM3N6.js";
9
+ } from "./chunk-Q3NN2XUW.js";
10
10
  import {
11
11
  buildSkillLlmContent
12
12
  } from "./chunk-CPVI5J2L.js";
13
13
  import {
14
14
  DiscoveredMCPTool,
15
15
  uiTelemetryService
16
- } from "./chunk-A3OEZT2F.js";
16
+ } from "./chunk-E322ZT4P.js";
17
17
  import {
18
18
  ToolNames
19
19
  } from "./chunk-6WPY6ES3.js";
@@ -72004,11 +72004,11 @@ async function createContentGenerator(generatorConfig, config, isInitialAuth) {
72004
72004
  let baseGenerator;
72005
72005
  try {
72006
72006
  if (authType === "openai" /* USE_OPENAI */) {
72007
- const { createOpenAIContentGenerator } = await import("./openaiContentGenerator-DO27LL6O.js");
72007
+ const { createOpenAIContentGenerator } = await import("./openaiContentGenerator-P772OZ6K.js");
72008
72008
  baseGenerator = createOpenAIContentGenerator(generatorConfig, config);
72009
72009
  } else if (authType === "qwen-oauth" /* QWEN_OAUTH */) {
72010
72010
  const { getQwenOAuthClient: getQwenOauthClient } = await import("./qwenOAuth2-KK433U33.js");
72011
- const { QwenContentGenerator } = await import("./qwenContentGenerator-DQLGLQSH.js");
72011
+ const { QwenContentGenerator } = await import("./qwenContentGenerator-Y6YGZRHH.js");
72012
72012
  try {
72013
72013
  const qwenClient = await getQwenOauthClient(
72014
72014
  config,
@@ -72029,7 +72029,7 @@ async function createContentGenerator(generatorConfig, config, isInitialAuth) {
72029
72029
  const { createAnthropicContentGenerator } = await import("./anthropicContentGenerator-DCI26OQF.js");
72030
72030
  baseGenerator = createAnthropicContentGenerator(generatorConfig, config);
72031
72031
  } else if (authType === "gemini" /* USE_GEMINI */ || authType === "vertex-ai" /* USE_VERTEX_AI */) {
72032
- const { createGeminiContentGenerator } = await import("./geminiContentGenerator-CAKHT5YE.js");
72032
+ const { createGeminiContentGenerator } = await import("./geminiContentGenerator-7D2QZ5FE.js");
72033
72033
  baseGenerator = createGeminiContentGenerator(generatorConfig, config);
72034
72034
  } else {
72035
72035
  throw new Error(
@@ -224,7 +224,7 @@ import {
224
224
  truncateSpanError,
225
225
  truncateToolOutput,
226
226
  uiTelemetryService
227
- } from "./chunk-A3OEZT2F.js";
227
+ } from "./chunk-E322ZT4P.js";
228
228
  import {
229
229
  DEFAULT_QWEN_EMBEDDING_MODEL,
230
230
  DEFAULT_QWEN_MODEL
@@ -45525,6 +45525,17 @@ function isContextLengthExceededError(error) {
45525
45525
  }
45526
45526
  __name(isContextLengthExceededError, "isContextLengthExceededError");
45527
45527
 
45528
+ // packages/core/src/core/stream-transport-retry.ts
45529
+ init_esbuild_shims();
45530
+ var RETRYABLE_STREAM_TRANSPORT_CODES = /* @__PURE__ */ new Set([
45531
+ "ECONNRESET",
45532
+ "ETIMEDOUT",
45533
+ "UND_ERR_BODY_TIMEOUT",
45534
+ "UND_ERR_CONNECT_TIMEOUT",
45535
+ "UND_ERR_HEADERS_TIMEOUT",
45536
+ "UND_ERR_SOCKET"
45537
+ ]);
45538
+
45528
45539
  // packages/core/src/core/toolCallIdUtils.ts
45529
45540
  init_esbuild_shims();
45530
45541
  var DUPLICATE_ID_SUFFIX = "__qwen_dup_";
@@ -45704,6 +45715,10 @@ var INVALID_STREAM_RETRY_CONFIG = {
45704
45715
  maxRetries: 2,
45705
45716
  initialDelayMs: 2e3
45706
45717
  };
45718
+ var TRANSPORT_STREAM_RETRY_CONFIG = {
45719
+ maxRetries: 2,
45720
+ initialDelayMs: 1e3
45721
+ };
45707
45722
  var MAX_OUTPUT_RECOVERY_ATTEMPTS = 3;
45708
45723
  var OUTPUT_RECOVERY_MESSAGE = "Output token limit hit. Resume directly \u2014 no apology, no recap of what you were doing. Pick up mid-thought if that is where the cut happened. Break remaining work into smaller pieces.";
45709
45724
  var OUTPUT_RECOVERY_TAIL_CHARS = 1200;
@@ -46613,6 +46628,7 @@ var GeminiChat = class {
46613
46628
  let lastError = new Error("Request failed after all retries.");
46614
46629
  let rateLimitRetryCount = 0;
46615
46630
  let invalidStreamRetryCount = 0;
46631
+ let transportStreamRetryCount = 0;
46616
46632
  let reactiveCompressionAttempted = false;
46617
46633
  let suppressNextRetryEvent = false;
46618
46634
  const cgConfig = self2.config.getContentGeneratorConfig();
@@ -46622,10 +46638,11 @@ var GeminiChat = class {
46622
46638
  const hasUserMaxTokensOverride = cgConfig?.samplingParams?.max_tokens !== void 0 && cgConfig?.samplingParams?.max_tokens !== null || !!process.env["QWEN_CODE_MAX_OUTPUT_TOKENS"];
46623
46639
  let lastFinishReason;
46624
46640
  for (let attempt = 0; attempt < INVALID_CONTENT_RETRY_OPTIONS.maxAttempts; attempt++) {
46641
+ let streamYieldedChunk = false;
46625
46642
  try {
46626
46643
  if (suppressNextRetryEvent) {
46627
46644
  suppressNextRetryEvent = false;
46628
- } else if (attempt > 0 || rateLimitRetryCount > 0 || invalidStreamRetryCount > 0) {
46645
+ } else if (attempt > 0 || rateLimitRetryCount > 0 || invalidStreamRetryCount > 0 || transportStreamRetryCount > 0) {
46629
46646
  yield { type: "retry" /* RETRY */ };
46630
46647
  }
46631
46648
  const stream2 = await self2.makeApiCallAndProcessStream(
@@ -46636,6 +46653,7 @@ var GeminiChat = class {
46636
46653
  );
46637
46654
  lastFinishReason = void 0;
46638
46655
  for await (const chunk of stream2) {
46656
+ streamYieldedChunk = true;
46639
46657
  const fr = chunk.candidates?.[0]?.finishReason;
46640
46658
  if (fr) lastFinishReason = fr;
46641
46659
  yield { type: "chunk" /* CHUNK */, value: chunk };
@@ -46656,13 +46674,13 @@ var GeminiChat = class {
46656
46674
  }
46657
46675
  self2.clearPendingPartialState();
46658
46676
  }, "popPartialIfPushed");
46677
+ const classification = classifyRetryError(error, {
46678
+ authType: cgConfig?.authType,
46679
+ extraRetryErrorCodes
46680
+ });
46659
46681
  const isRateLimit = isRateLimitError(error, extraRetryErrorCodes);
46660
46682
  if (isRateLimit) {
46661
46683
  const details = getRateLimitErrorDetails(error);
46662
- const classification = classifyRetryError(error, {
46663
- authType: cgConfig?.authType,
46664
- extraRetryErrorCodes
46665
- });
46666
46684
  const diagnosticFields = {
46667
46685
  classificationDiagnosis: classification.diagnosis,
46668
46686
  errorKind: classification.kind,
@@ -46713,6 +46731,38 @@ var GeminiChat = class {
46713
46731
  ...diagnosticFields
46714
46732
  });
46715
46733
  }
46734
+ const isRetryableStreamTransportError = classification.kind === "transport" && classification.transportCode !== void 0 && RETRYABLE_STREAM_TRANSPORT_CODES.has(
46735
+ classification.transportCode
46736
+ );
46737
+ if (isRetryableStreamTransportError && !streamYieldedChunk && transportStreamRetryCount < TRANSPORT_STREAM_RETRY_CONFIG.maxRetries) {
46738
+ popPartialIfPushed();
46739
+ transportStreamRetryCount++;
46740
+ const delayMs = TRANSPORT_STREAM_RETRY_CONFIG.initialDelayMs * transportStreamRetryCount;
46741
+ debugLogger21.warn("Transport stream retry scheduled", {
46742
+ retryPath: "stream",
46743
+ retryDecision: "retry",
46744
+ attempt: transportStreamRetryCount,
46745
+ maxRetries: TRANSPORT_STREAM_RETRY_CONFIG.maxRetries,
46746
+ retryDelayMs: delayMs,
46747
+ errorKind: classification.kind,
46748
+ transportCode: classification.transportCode
46749
+ });
46750
+ yield { type: "retry" /* RETRY */ };
46751
+ suppressNextRetryEvent = true;
46752
+ attempt--;
46753
+ await delay2(delayMs, params.config?.abortSignal).promise;
46754
+ continue;
46755
+ }
46756
+ if (isRetryableStreamTransportError) {
46757
+ debugLogger21.warn("Transport stream retry not taken", {
46758
+ retryPath: "stream",
46759
+ retryDecision: streamYieldedChunk ? "skipped_after_chunk" : "exhausted",
46760
+ attempts: transportStreamRetryCount,
46761
+ maxRetries: TRANSPORT_STREAM_RETRY_CONFIG.maxRetries,
46762
+ errorKind: classification.kind,
46763
+ transportCode: classification.transportCode
46764
+ });
46765
+ }
46716
46766
  const contextOverflow = getContextLengthExceededInfo(error);
46717
46767
  if (contextOverflow.isExceeded) {
46718
46768
  if (!reactiveCompressionAttempted) {
@@ -63039,7 +63089,7 @@ var FORK_BOILERPLATE_TAG = "fork-boilerplate";
63039
63089
  var FORK_DIRECTIVE_PREFIX = "Directive: ";
63040
63090
  var FORK_AGENT = {
63041
63091
  name: FORK_SUBAGENT_TYPE,
63042
- description: "Implicit fork \u2014 inherits full conversation context. Not selectable via subagent_type; triggered by omitting subagent_type.",
63092
+ description: 'Fork yourself \u2014 inherits your full conversation context. Selected explicitly via `subagent_type: "fork"` (only in interactive sessions). Runs detached in the background; you are notified when it completes.',
63043
63093
  tools: ["*"],
63044
63094
  systemPrompt: "You are a forked worker process. Follow the directive in the conversation history. Execute tasks directly using available tools. Do not spawn sub-agents.",
63045
63095
  approvalMode: "default",
@@ -70734,7 +70784,7 @@ The Agent tool launches specialized agents (subprocesses) that autonomously hand
70734
70784
  Available agent types and the tools they have access to:
70735
70785
  ${subagentDescriptions}
70736
70786
 
70737
- ${isForkSubagentEnabled(this.config) ? `When using the Agent tool, specify a subagent_type to use a specialized agent, or omit it to fork yourself \u2014 a fork inherits your full conversation context.` : `When using the Agent tool, specify a subagent_type parameter to select which agent type to use. If omitted, the general-purpose agent is used.`}
70787
+ ${isForkSubagentEnabled(this.config) ? `When using the Agent tool, specify a subagent_type to select which agent type to use. If omitted, the general-purpose agent is used and returns its result to you inline. A fork (\`subagent_type: "fork"\`) runs detached and fire-and-forget \u2014 its result does NOT come back to you, so use it ONLY for work whose output you won't need. When you need the agent's findings back (review, audit, aggregation, verification), use a regular subagent, never a fork.` : `When using the Agent tool, specify a subagent_type parameter to select which agent type to use. If omitted, the general-purpose agent is used.`}
70738
70788
 
70739
70789
  When NOT to use the Agent tool:
70740
70790
  - If you want to read a specific file path, use the ${ToolNames.READ_FILE} tool or the ${ToolNames.GLOB} tool instead of the ${ToolNames.AGENT} tool, to find the match more quickly
@@ -70758,9 +70808,9 @@ Usage notes:
70758
70808
  ${isForkSubagentEnabled(this.config) ? `
70759
70809
  ## When to fork
70760
70810
 
70761
- Fork yourself (omit \`subagent_type\`) when the intermediate tool output isn't worth keeping in your context. The criterion is qualitative \u2014 "will I need this output again" \u2014 not task size.
70762
- - **Research**: fork open-ended questions. If research can be broken into independent questions, launch parallel forks in one message. A fork beats a fresh subagent for this \u2014 it inherits context and shares your cache.
70763
- - **Implementation**: prefer to fork implementation work that requires more than a couple of edits. Do research before jumping to implementation.
70811
+ A fork (\`subagent_type: "fork"\`) runs detached and fire-and-forget: it inherits your full context, but its findings do NOT come back to you in a form you can act on. **Never fork work whose output you need** \u2014 reviews, audits, parallel investigations you must aggregate, verification, anything where you have to read or combine the results. For all of that, launch regular awaitable subagents instead (omit \`subagent_type\` for general-purpose, or name a specific type); each returns its result to you inline, and several in one message still run concurrently. Omitting \`subagent_type\` does NOT fork.
70812
+
70813
+ Fork only when you genuinely won't need the result back \u2014 a detached background chore the user asked you to kick off and move on from. The criterion is qualitative: "will I need to read this output?" If yes, don't fork.
70764
70814
 
70765
70815
  Forks are cheap because they share your prompt cache. Don't set \`model\` on a fork \u2014 a different model can't reuse the parent's cache. Pass a short \`name\` (one or two words, lowercase) so the user can track the fork.
70766
70816
 
@@ -70839,20 +70889,22 @@ assistant: Uses the ${ToolNames.AGENT} tool to launch the test-runner agent
70839
70889
  return 'Parameter "subagent_type" must be a non-empty string.';
70840
70890
  }
70841
70891
  const lowerType = params.subagent_type.toLowerCase();
70842
- const subagentExists = this.availableSubagents.some(
70843
- (subagent) => subagent.name.toLowerCase() === lowerType
70844
- );
70845
- if (!subagentExists) {
70846
- const availableNames = this.availableSubagents.map((s) => s.name);
70847
- return `Subagent "${params.subagent_type}" not found. Available subagents: ${availableNames.join(", ")}`;
70892
+ if (lowerType !== FORK_SUBAGENT_TYPE) {
70893
+ const subagentExists = this.availableSubagents.some(
70894
+ (subagent) => subagent.name.toLowerCase() === lowerType
70895
+ );
70896
+ if (!subagentExists) {
70897
+ const availableNames = this.availableSubagents.map((s) => s.name);
70898
+ return `Subagent "${params.subagent_type}" not found. Available subagents: ${availableNames.join(", ")}`;
70899
+ }
70848
70900
  }
70849
70901
  }
70850
70902
  if (params.isolation !== void 0) {
70851
70903
  if (params.isolation !== "worktree") {
70852
70904
  return 'Parameter "isolation" must be "worktree" when set.';
70853
70905
  }
70854
- if (!params.subagent_type) {
70855
- return 'Parameter "isolation" requires "subagent_type" to be set.';
70906
+ if (!params.subagent_type || params.subagent_type.toLowerCase() === FORK_SUBAGENT_TYPE) {
70907
+ return 'Parameter "isolation" requires an explicit subagent_type (and cannot be "fork").';
70856
70908
  }
70857
70909
  }
70858
70910
  return null;
@@ -71506,8 +71558,14 @@ var AgentToolInvocation = class extends BaseToolInvocation {
71506
71558
  let restoreParentPM = /* @__PURE__ */ __name(() => {
71507
71559
  }, "restoreParentPM");
71508
71560
  try {
71509
- const isFork = !this.params.subagent_type && isForkSubagentEnabled(this.config);
71510
- const effectiveSubagentType = this.params.subagent_type ?? (isFork ? void 0 : DEFAULT_BUILTIN_SUBAGENT_TYPE);
71561
+ const requestedType = this.params.subagent_type;
71562
+ const isForkRequested = requestedType?.toLowerCase() === FORK_SUBAGENT_TYPE;
71563
+ const isFork = isForkRequested && isForkSubagentEnabled(this.config);
71564
+ const effectiveSubagentType = isFork ? void 0 : isForkRequested ? (
71565
+ // Explicit fork requested but unavailable (non-interactive) →
71566
+ // fall back to the awaitable general-purpose subagent.
71567
+ DEFAULT_BUILTIN_SUBAGENT_TYPE
71568
+ ) : requestedType ?? DEFAULT_BUILTIN_SUBAGENT_TYPE;
71511
71569
  let subagentConfig;
71512
71570
  if (isFork) {
71513
71571
  subagentConfig = FORK_AGENT;
@@ -124022,19 +124080,19 @@ var Config = class {
124022
124080
  }, "registerStructuredOutputIfRequested");
124023
124081
  if (this.getBareMode()) {
124024
124082
  await registerLazy(ToolNames.READ_FILE, async () => {
124025
- const { ReadFileTool } = await import("./read-file-3TBLYTOQ.js");
124083
+ const { ReadFileTool } = await import("./read-file-2JIJ646W.js");
124026
124084
  return new ReadFileTool(this);
124027
124085
  });
124028
124086
  await registerLazy(ToolNames.EDIT, async () => {
124029
- const { EditTool } = await import("./edit-BMUKPLA7.js");
124087
+ const { EditTool } = await import("./edit-IC3ECG44.js");
124030
124088
  return new EditTool(this);
124031
124089
  });
124032
124090
  await registerLazy(ToolNames.NOTEBOOK_EDIT, async () => {
124033
- const { NotebookEditTool } = await import("./notebook-edit-6F6Z5P6U.js");
124091
+ const { NotebookEditTool } = await import("./notebook-edit-IS3UYVGM.js");
124034
124092
  return new NotebookEditTool(this);
124035
124093
  });
124036
124094
  await registerLazy(ToolNames.SHELL, async () => {
124037
- const { ShellTool: ShellTool2 } = await import("./shell-4H6XQXVY.js");
124095
+ const { ShellTool: ShellTool2 } = await import("./shell-BTAJJJHO.js");
124038
124096
  return new ShellTool2(this);
124039
124097
  });
124040
124098
  await registerStructuredOutputIfRequested();
@@ -124044,11 +124102,11 @@ var Config = class {
124044
124102
  return registry;
124045
124103
  }
124046
124104
  await registerLazy(ToolNames.TOOL_SEARCH, async () => {
124047
- const { ToolSearchTool } = await import("./tool-search-ABZMSDTU.js");
124105
+ const { ToolSearchTool } = await import("./tool-search-NUOEJ4LF.js");
124048
124106
  return new ToolSearchTool(this);
124049
124107
  });
124050
124108
  await registerLazy(ToolNames.AGENT, async () => {
124051
- const { AgentTool: AgentTool2 } = await import("./agent-PXMT2XR5.js");
124109
+ const { AgentTool: AgentTool2 } = await import("./agent-WK5GYOPC.js");
124052
124110
  return new AgentTool2(this);
124053
124111
  });
124054
124112
  await registerLazy(ToolNames.TASK_STOP, async () => {
@@ -124060,7 +124118,7 @@ var Config = class {
124060
124118
  return new SendMessageTool(this);
124061
124119
  });
124062
124120
  await registerLazy(ToolNames.SKILL, async () => {
124063
- const { SkillTool } = await import("./skill-SE6FECZR.js");
124121
+ const { SkillTool } = await import("./skill-LSM726DP.js");
124064
124122
  return new SkillTool(this);
124065
124123
  });
124066
124124
  await registerLazy(ToolNames.LS, async () => {
@@ -124068,7 +124126,7 @@ var Config = class {
124068
124126
  return new LSTool(this);
124069
124127
  });
124070
124128
  await registerLazy(ToolNames.READ_FILE, async () => {
124071
- const { ReadFileTool } = await import("./read-file-3TBLYTOQ.js");
124129
+ const { ReadFileTool } = await import("./read-file-2JIJ646W.js");
124072
124130
  return new ReadFileTool(this);
124073
124131
  });
124074
124132
  if (this.getUseRipgrep()) {
@@ -124081,7 +124139,7 @@ var Config = class {
124081
124139
  }
124082
124140
  if (useRipgrep) {
124083
124141
  await registerLazy(ToolNames.GREP, async () => {
124084
- const { RipGrepTool: RipGrepTool2 } = await import("./ripGrep-3INYT3QV.js");
124142
+ const { RipGrepTool: RipGrepTool2 } = await import("./ripGrep-Z74CN4MW.js");
124085
124143
  return new RipGrepTool2(this);
124086
124144
  });
124087
124145
  } else {
@@ -124094,34 +124152,34 @@ var Config = class {
124094
124152
  )
124095
124153
  );
124096
124154
  await registerLazy(ToolNames.GREP, async () => {
124097
- const { GrepTool } = await import("./grep-BJILOLCD.js");
124155
+ const { GrepTool } = await import("./grep-MRCXYH2N.js");
124098
124156
  return new GrepTool(this);
124099
124157
  });
124100
124158
  }
124101
124159
  } else {
124102
124160
  await registerLazy(ToolNames.GREP, async () => {
124103
- const { GrepTool } = await import("./grep-BJILOLCD.js");
124161
+ const { GrepTool } = await import("./grep-MRCXYH2N.js");
124104
124162
  return new GrepTool(this);
124105
124163
  });
124106
124164
  }
124107
124165
  await registerLazy(ToolNames.GLOB, async () => {
124108
- const { GlobTool } = await import("./glob-5DN6NSCD.js");
124166
+ const { GlobTool } = await import("./glob-XTABUPPR.js");
124109
124167
  return new GlobTool(this);
124110
124168
  });
124111
124169
  await registerLazy(ToolNames.EDIT, async () => {
124112
- const { EditTool } = await import("./edit-BMUKPLA7.js");
124170
+ const { EditTool } = await import("./edit-IC3ECG44.js");
124113
124171
  return new EditTool(this);
124114
124172
  });
124115
124173
  await registerLazy(ToolNames.NOTEBOOK_EDIT, async () => {
124116
- const { NotebookEditTool } = await import("./notebook-edit-6F6Z5P6U.js");
124174
+ const { NotebookEditTool } = await import("./notebook-edit-IS3UYVGM.js");
124117
124175
  return new NotebookEditTool(this);
124118
124176
  });
124119
124177
  await registerLazy(ToolNames.WRITE_FILE, async () => {
124120
- const { WriteFileTool } = await import("./write-file-VAEHZPSL.js");
124178
+ const { WriteFileTool } = await import("./write-file-MHQLLZWY.js");
124121
124179
  return new WriteFileTool(this);
124122
124180
  });
124123
124181
  await registerLazy(ToolNames.SHELL, async () => {
124124
- const { ShellTool: ShellTool2 } = await import("./shell-4H6XQXVY.js");
124182
+ const { ShellTool: ShellTool2 } = await import("./shell-BTAJJJHO.js");
124125
124183
  return new ShellTool2(this);
124126
124184
  });
124127
124185
  await registerLazy(ToolNames.TODO_WRITE, async () => {
@@ -124134,20 +124192,20 @@ var Config = class {
124134
124192
  });
124135
124193
  if (!this.sdkMode) {
124136
124194
  await registerLazy(ToolNames.EXIT_PLAN_MODE, async () => {
124137
- const { ExitPlanModeTool } = await import("./exitPlanMode-5WQAXNDA.js");
124195
+ const { ExitPlanModeTool } = await import("./exitPlanMode-VOC7G5FJ.js");
124138
124196
  return new ExitPlanModeTool(this);
124139
124197
  });
124140
124198
  await registerLazy(ToolNames.ENTER_PLAN_MODE, async () => {
124141
- const { EnterPlanModeTool } = await import("./enterPlanMode-QWRZ54ZF.js");
124199
+ const { EnterPlanModeTool } = await import("./enterPlanMode-VL3F45RF.js");
124142
124200
  return new EnterPlanModeTool(this);
124143
124201
  });
124144
124202
  }
124145
124203
  await registerLazy(ToolNames.ENTER_WORKTREE, async () => {
124146
- const { EnterWorktreeTool } = await import("./enter-worktree-LXJ5WJ5A.js");
124204
+ const { EnterWorktreeTool } = await import("./enter-worktree-ETQWM7BB.js");
124147
124205
  return new EnterWorktreeTool(this);
124148
124206
  });
124149
124207
  await registerLazy(ToolNames.EXIT_WORKTREE, async () => {
124150
- const { ExitWorktreeTool } = await import("./exit-worktree-5HTQPNZO.js");
124208
+ const { ExitWorktreeTool } = await import("./exit-worktree-F5BJXBFB.js");
124151
124209
  return new ExitWorktreeTool(this);
124152
124210
  });
124153
124211
  await registerLazy(ToolNames.WEB_FETCH, async () => {
@@ -124177,7 +124235,7 @@ var Config = class {
124177
124235
  }
124178
124236
  if (this.isAgentTeamEnabled()) {
124179
124237
  await registerLazy(ToolNames.TEAM_CREATE, async () => {
124180
- const { TeamCreateTool } = await import("./team-create-Q5DTDDH4.js");
124238
+ const { TeamCreateTool } = await import("./team-create-S5ZBN464.js");
124181
124239
  return new TeamCreateTool(this);
124182
124240
  });
124183
124241
  await registerLazy(ToolNames.TEAM_DELETE, async () => {
@@ -124199,16 +124257,16 @@ var Config = class {
124199
124257
  }
124200
124258
  if (this.isWorkflowsEnabled()) {
124201
124259
  await registerLazy(ToolNames.WORKFLOW, async () => {
124202
- const { WorkflowTool } = await import("./workflow-NEMDQB75.js");
124260
+ const { WorkflowTool } = await import("./workflow-ZI3ZXNU6.js");
124203
124261
  return new WorkflowTool(this);
124204
124262
  });
124205
124263
  }
124206
124264
  if (this.isComputerUseEnabled()) {
124207
- const { registerComputerUseTools } = await import("./computer-use-7SEQDSHB.js");
124265
+ const { registerComputerUseTools } = await import("./computer-use-4ELNIZMF.js");
124208
124266
  await registerComputerUseTools(registerLazy, this);
124209
124267
  }
124210
124268
  await registerLazy(ToolNames.MONITOR, async () => {
124211
- const { MonitorTool } = await import("./monitor-SUEMSRN3.js");
124269
+ const { MonitorTool } = await import("./monitor-LNRRNJJB.js");
124212
124270
  return new MonitorTool(this);
124213
124271
  });
124214
124272
  if (this.pendingMcpBudgetCallback) {
@@ -142743,6 +142801,7 @@ export {
142743
142801
  AgentCore,
142744
142802
  SubagentError,
142745
142803
  SubagentErrorCode,
142804
+ FORK_SUBAGENT_TYPE,
142746
142805
  WORKTREE_BRANCH_PREFIX,
142747
142806
  worktreeBranchForSlug,
142748
142807
  WORKTREE_SESSION_FILE,
@@ -7,7 +7,7 @@ import {
7
7
  OpenAIContentConverter,
8
8
  TaggedThinkingParser,
9
9
  openaiRequestCaptureContext
10
- } from "./chunk-A3OEZT2F.js";
10
+ } from "./chunk-E322ZT4P.js";
11
11
  import {
12
12
  createChildAbortController
13
13
  } from "./chunk-64WXLC72.js";
@@ -4,7 +4,7 @@ import {
4
4
  Client,
5
5
  StdioClientTransport,
6
6
  extract
7
- } from "./chunk-H4ZDM3N6.js";
7
+ } from "./chunk-Q3NN2XUW.js";
8
8
  import "./chunk-K5PGHDBN.js";
9
9
  import "./chunk-VXHYMZXW.js";
10
10
  import "./chunk-O4PICXES.js";
@@ -22,7 +22,7 @@ import "./chunk-77WXWU44.js";
22
22
  import "./chunk-B4ZF2KSI.js";
23
23
  import {
24
24
  safeJsonStringify
25
- } from "./chunk-A3OEZT2F.js";
25
+ } from "./chunk-E322ZT4P.js";
26
26
  import "./chunk-3PJXIDKI.js";
27
27
  import "./chunk-UWCTAVOD.js";
28
28
  import "./chunk-OFEVLU4C.js";
@@ -4,9 +4,9 @@ import {
4
4
  collectContextData,
5
5
  contextCommand,
6
6
  formatContextUsageText
7
- } from "./chunk-TSBXGR73.js";
8
- import "./chunk-UOB6KPGG.js";
9
- import "./chunk-H4ZDM3N6.js";
7
+ } from "./chunk-DYCU43TE.js";
8
+ import "./chunk-BW7CMDF3.js";
9
+ import "./chunk-Q3NN2XUW.js";
10
10
  import "./chunk-K5PGHDBN.js";
11
11
  import "./chunk-VXHYMZXW.js";
12
12
  import "./chunk-O4PICXES.js";
@@ -22,7 +22,7 @@ import "./chunk-CPVI5J2L.js";
22
22
  import "./chunk-ZMIBJS45.js";
23
23
  import "./chunk-77WXWU44.js";
24
24
  import "./chunk-B4ZF2KSI.js";
25
- import "./chunk-A3OEZT2F.js";
25
+ import "./chunk-E322ZT4P.js";
26
26
  import "./chunk-3PJXIDKI.js";
27
27
  import "./chunk-UWCTAVOD.js";
28
28
  import "./chunk-OFEVLU4C.js";
@@ -13,7 +13,7 @@ import {
13
13
  getDiffStat,
14
14
  needsUtf8Bom,
15
15
  safeLiteralReplace
16
- } from "./chunk-H4ZDM3N6.js";
16
+ } from "./chunk-Q3NN2XUW.js";
17
17
  import "./chunk-K5PGHDBN.js";
18
18
  import "./chunk-VXHYMZXW.js";
19
19
  import "./chunk-O4PICXES.js";
@@ -36,7 +36,7 @@ import {
36
36
  getLanguageFromFilePath,
37
37
  getSpecificMimeType,
38
38
  logFileOperation
39
- } from "./chunk-A3OEZT2F.js";
39
+ } from "./chunk-E322ZT4P.js";
40
40
  import "./chunk-3PJXIDKI.js";
41
41
  import "./chunk-UWCTAVOD.js";
42
42
  import "./chunk-OFEVLU4C.js";
@@ -4,7 +4,7 @@ import {
4
4
  GitWorktreeService,
5
5
  writeWorktreeSession,
6
6
  writeWorktreeSessionMarker
7
- } from "./chunk-H4ZDM3N6.js";
7
+ } from "./chunk-Q3NN2XUW.js";
8
8
  import "./chunk-K5PGHDBN.js";
9
9
  import "./chunk-VXHYMZXW.js";
10
10
  import "./chunk-O4PICXES.js";
@@ -20,7 +20,7 @@ import "./chunk-CPVI5J2L.js";
20
20
  import "./chunk-ZMIBJS45.js";
21
21
  import "./chunk-77WXWU44.js";
22
22
  import "./chunk-B4ZF2KSI.js";
23
- import "./chunk-A3OEZT2F.js";
23
+ import "./chunk-E322ZT4P.js";
24
24
  import "./chunk-3PJXIDKI.js";
25
25
  import "./chunk-UWCTAVOD.js";
26
26
  import "./chunk-OFEVLU4C.js";
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import "./chunk-H4ZDM3N6.js";
3
+ import "./chunk-Q3NN2XUW.js";
4
4
  import "./chunk-K5PGHDBN.js";
5
5
  import "./chunk-VXHYMZXW.js";
6
6
  import "./chunk-O4PICXES.js";
@@ -16,7 +16,7 @@ import "./chunk-CPVI5J2L.js";
16
16
  import "./chunk-ZMIBJS45.js";
17
17
  import "./chunk-77WXWU44.js";
18
18
  import "./chunk-B4ZF2KSI.js";
19
- import "./chunk-A3OEZT2F.js";
19
+ import "./chunk-E322ZT4P.js";
20
20
  import "./chunk-3PJXIDKI.js";
21
21
  import "./chunk-UWCTAVOD.js";
22
22
  import "./chunk-OFEVLU4C.js";
@@ -6,7 +6,7 @@ import {
6
6
  readWorktreeSession,
7
7
  readWorktreeSessionMarker,
8
8
  worktreeBranchForSlug
9
- } from "./chunk-H4ZDM3N6.js";
9
+ } from "./chunk-Q3NN2XUW.js";
10
10
  import "./chunk-K5PGHDBN.js";
11
11
  import "./chunk-VXHYMZXW.js";
12
12
  import "./chunk-O4PICXES.js";
@@ -22,7 +22,7 @@ import "./chunk-CPVI5J2L.js";
22
22
  import "./chunk-ZMIBJS45.js";
23
23
  import "./chunk-77WXWU44.js";
24
24
  import "./chunk-B4ZF2KSI.js";
25
- import "./chunk-A3OEZT2F.js";
25
+ import "./chunk-E322ZT4P.js";
26
26
  import "./chunk-3PJXIDKI.js";
27
27
  import "./chunk-UWCTAVOD.js";
28
28
  import "./chunk-OFEVLU4C.js";
@@ -9,7 +9,7 @@ import {
9
9
  ContextState,
10
10
  createApprovalModeOverride,
11
11
  isAutonomousPrePlanMode
12
- } from "./chunk-H4ZDM3N6.js";
12
+ } from "./chunk-Q3NN2XUW.js";
13
13
  import "./chunk-K5PGHDBN.js";
14
14
  import "./chunk-VXHYMZXW.js";
15
15
  import "./chunk-O4PICXES.js";
@@ -25,7 +25,7 @@ import "./chunk-CPVI5J2L.js";
25
25
  import "./chunk-ZMIBJS45.js";
26
26
  import "./chunk-77WXWU44.js";
27
27
  import "./chunk-B4ZF2KSI.js";
28
- import "./chunk-A3OEZT2F.js";
28
+ import "./chunk-E322ZT4P.js";
29
29
  import "./chunk-3PJXIDKI.js";
30
30
  import "./chunk-UWCTAVOD.js";
31
31
  import "./chunk-OFEVLU4C.js";
@@ -212,7 +212,7 @@ var GeminiContentGenerator = class {
212
212
 
213
213
  // packages/core/src/core/geminiContentGenerator/index.ts
214
214
  function createGeminiContentGenerator(config, gcConfig) {
215
- const version = "0.18.1-nightly.20260616.a68b2e1e7";
215
+ const version = "0.18.1-preview.0";
216
216
  const userAgent = config.userAgent || `QwenCode/${version} (${process.platform}; ${process.arch})`;
217
217
  const baseHeaders = {
218
218
  "User-Agent": userAgent
@@ -3,7 +3,7 @@
3
3
  import {
4
4
  escape,
5
5
  glob
6
- } from "./chunk-H4ZDM3N6.js";
6
+ } from "./chunk-Q3NN2XUW.js";
7
7
  import "./chunk-K5PGHDBN.js";
8
8
  import "./chunk-VXHYMZXW.js";
9
9
  import "./chunk-O4PICXES.js";
@@ -21,7 +21,7 @@ import {
21
21
  DEFAULT_FILE_FILTERING_OPTIONS
22
22
  } from "./chunk-77WXWU44.js";
23
23
  import "./chunk-B4ZF2KSI.js";
24
- import "./chunk-A3OEZT2F.js";
24
+ import "./chunk-E322ZT4P.js";
25
25
  import "./chunk-3PJXIDKI.js";
26
26
  import "./chunk-UWCTAVOD.js";
27
27
  import "./chunk-OFEVLU4C.js";
@@ -5,7 +5,7 @@ import {
5
5
  isCommandAvailable,
6
6
  isGitRepository,
7
7
  recordGrepResultFileReads
8
- } from "./chunk-H4ZDM3N6.js";
8
+ } from "./chunk-Q3NN2XUW.js";
9
9
  import "./chunk-K5PGHDBN.js";
10
10
  import "./chunk-VXHYMZXW.js";
11
11
  import "./chunk-O4PICXES.js";
@@ -21,7 +21,7 @@ import "./chunk-CPVI5J2L.js";
21
21
  import "./chunk-ZMIBJS45.js";
22
22
  import "./chunk-77WXWU44.js";
23
23
  import "./chunk-B4ZF2KSI.js";
24
- import "./chunk-A3OEZT2F.js";
24
+ import "./chunk-E322ZT4P.js";
25
25
  import "./chunk-3PJXIDKI.js";
26
26
  import "./chunk-UWCTAVOD.js";
27
27
  import "./chunk-OFEVLU4C.js";
@@ -14,7 +14,7 @@ import {
14
14
  normalizeMonitorCommand,
15
15
  splitCommands,
16
16
  stripAnsi
17
- } from "./chunk-H4ZDM3N6.js";
17
+ } from "./chunk-Q3NN2XUW.js";
18
18
  import "./chunk-K5PGHDBN.js";
19
19
  import "./chunk-VXHYMZXW.js";
20
20
  import "./chunk-O4PICXES.js";
@@ -30,7 +30,7 @@ import "./chunk-CPVI5J2L.js";
30
30
  import "./chunk-ZMIBJS45.js";
31
31
  import "./chunk-77WXWU44.js";
32
32
  import "./chunk-B4ZF2KSI.js";
33
- import "./chunk-A3OEZT2F.js";
33
+ import "./chunk-E322ZT4P.js";
34
34
  import "./chunk-3PJXIDKI.js";
35
35
  import "./chunk-UWCTAVOD.js";
36
36
  import "./chunk-OFEVLU4C.js";
@@ -9,7 +9,7 @@ import {
9
9
  createPatch,
10
10
  detectLineEnding,
11
11
  getDiffStat
12
- } from "./chunk-H4ZDM3N6.js";
12
+ } from "./chunk-Q3NN2XUW.js";
13
13
  import "./chunk-K5PGHDBN.js";
14
14
  import "./chunk-VXHYMZXW.js";
15
15
  import "./chunk-O4PICXES.js";
@@ -42,7 +42,7 @@ import {
42
42
  parseNotebook,
43
43
  serializeNotebook,
44
44
  toNotebookSource
45
- } from "./chunk-A3OEZT2F.js";
45
+ } from "./chunk-E322ZT4P.js";
46
46
  import "./chunk-3PJXIDKI.js";
47
47
  import "./chunk-UWCTAVOD.js";
48
48
  import "./chunk-OFEVLU4C.js";
@@ -12,11 +12,11 @@ import {
12
12
  OpenRouterOpenAICompatibleProvider,
13
13
  createOpenAIContentGenerator,
14
14
  determineProvider
15
- } from "./chunk-M5PJ5QAF.js";
15
+ } from "./chunk-RLFLJVHU.js";
16
16
  import "./chunk-3NRO6NHX.js";
17
17
  import {
18
18
  OpenAIContentConverter
19
- } from "./chunk-A3OEZT2F.js";
19
+ } from "./chunk-E322ZT4P.js";
20
20
  import "./chunk-3PJXIDKI.js";
21
21
  import "./chunk-UWCTAVOD.js";
22
22
  import "./chunk-OFEVLU4C.js";
@@ -3,9 +3,9 @@
3
3
  import {
4
4
  DashScopeOpenAICompatibleProvider,
5
5
  OpenAIContentGenerator
6
- } from "./chunk-M5PJ5QAF.js";
6
+ } from "./chunk-RLFLJVHU.js";
7
7
  import "./chunk-3NRO6NHX.js";
8
- import "./chunk-H4ZDM3N6.js";
8
+ import "./chunk-Q3NN2XUW.js";
9
9
  import "./chunk-K5PGHDBN.js";
10
10
  import "./chunk-VXHYMZXW.js";
11
11
  import "./chunk-O4PICXES.js";
@@ -21,7 +21,7 @@ import "./chunk-CPVI5J2L.js";
21
21
  import "./chunk-ZMIBJS45.js";
22
22
  import "./chunk-77WXWU44.js";
23
23
  import "./chunk-B4ZF2KSI.js";
24
- import "./chunk-A3OEZT2F.js";
24
+ import "./chunk-E322ZT4P.js";
25
25
  import "./chunk-3PJXIDKI.js";
26
26
  import "./chunk-UWCTAVOD.js";
27
27
  import "./chunk-OFEVLU4C.js";
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  ReadFileTool
5
- } from "./chunk-A3OEZT2F.js";
5
+ } from "./chunk-E322ZT4P.js";
6
6
  import "./chunk-3PJXIDKI.js";
7
7
  import "./chunk-UWCTAVOD.js";
8
8
  import "./chunk-OFEVLU4C.js";
@@ -3,7 +3,7 @@
3
3
  import {
4
4
  RipGrepTool,
5
5
  _resetRipGrepCachesForTest
6
- } from "./chunk-H4ZDM3N6.js";
6
+ } from "./chunk-Q3NN2XUW.js";
7
7
  import "./chunk-K5PGHDBN.js";
8
8
  import "./chunk-VXHYMZXW.js";
9
9
  import "./chunk-O4PICXES.js";
@@ -19,7 +19,7 @@ import "./chunk-CPVI5J2L.js";
19
19
  import "./chunk-ZMIBJS45.js";
20
20
  import "./chunk-77WXWU44.js";
21
21
  import "./chunk-B4ZF2KSI.js";
22
- import "./chunk-A3OEZT2F.js";
22
+ import "./chunk-E322ZT4P.js";
23
23
  import "./chunk-3PJXIDKI.js";
24
24
  import "./chunk-UWCTAVOD.js";
25
25
  import "./chunk-OFEVLU4C.js";
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-MRO43B25.js";
6
6
  import {
7
7
  FILE_HISTORY_DIR
8
- } from "./chunk-H4ZDM3N6.js";
8
+ } from "./chunk-Q3NN2XUW.js";
9
9
  import "./chunk-K5PGHDBN.js";
10
10
  import "./chunk-VXHYMZXW.js";
11
11
  import "./chunk-O4PICXES.js";
@@ -21,7 +21,7 @@ import "./chunk-CPVI5J2L.js";
21
21
  import "./chunk-ZMIBJS45.js";
22
22
  import "./chunk-77WXWU44.js";
23
23
  import "./chunk-B4ZF2KSI.js";
24
- import "./chunk-A3OEZT2F.js";
24
+ import "./chunk-E322ZT4P.js";
25
25
  import "./chunk-3PJXIDKI.js";
26
26
  import "./chunk-UWCTAVOD.js";
27
27
  import "./chunk-OFEVLU4C.js";
@@ -65,7 +65,7 @@ import {
65
65
  loadSettings,
66
66
  mapDomainErrorToErrorKind,
67
67
  reloadEnvironment
68
- } from "./chunk-ABRZC6FA.js";
68
+ } from "./chunk-27STU35P.js";
69
69
  import {
70
70
  ClientSideConnection,
71
71
  PROTOCOL_VERSION,
@@ -76,7 +76,7 @@ import {
76
76
  SUPPORTED_LANGUAGES,
77
77
  writeStderrLine,
78
78
  writeStdoutLine
79
- } from "./chunk-UOB6KPGG.js";
79
+ } from "./chunk-BW7CMDF3.js";
80
80
  import {
81
81
  ALL_PROVIDERS,
82
82
  APPROVAL_MODES,
@@ -107,7 +107,7 @@ import {
107
107
  resolveBaseUrl,
108
108
  shouldShowStep,
109
109
  writeWorkspaceContextFile
110
- } from "./chunk-H4ZDM3N6.js";
110
+ } from "./chunk-Q3NN2XUW.js";
111
111
  import "./chunk-K5PGHDBN.js";
112
112
  import "./chunk-VXHYMZXW.js";
113
113
  import "./chunk-O4PICXES.js";
@@ -153,7 +153,7 @@ import {
153
153
  resolveTelemetrySettings,
154
154
  shutdownTelemetry,
155
155
  withDaemonRequestSpan
156
- } from "./chunk-A3OEZT2F.js";
156
+ } from "./chunk-E322ZT4P.js";
157
157
  import "./chunk-3PJXIDKI.js";
158
158
  import "./chunk-UWCTAVOD.js";
159
159
  import "./chunk-OFEVLU4C.js";
@@ -7,7 +7,7 @@ import {
7
7
  buildLongRunningForegroundHint,
8
8
  detectBlockedSleepPattern,
9
9
  parseNumstat
10
- } from "./chunk-H4ZDM3N6.js";
10
+ } from "./chunk-Q3NN2XUW.js";
11
11
  import "./chunk-K5PGHDBN.js";
12
12
  import "./chunk-VXHYMZXW.js";
13
13
  import "./chunk-O4PICXES.js";
@@ -23,7 +23,7 @@ import "./chunk-CPVI5J2L.js";
23
23
  import "./chunk-ZMIBJS45.js";
24
24
  import "./chunk-77WXWU44.js";
25
25
  import "./chunk-B4ZF2KSI.js";
26
- import "./chunk-A3OEZT2F.js";
26
+ import "./chunk-E322ZT4P.js";
27
27
  import "./chunk-3PJXIDKI.js";
28
28
  import "./chunk-UWCTAVOD.js";
29
29
  import "./chunk-OFEVLU4C.js";
@@ -10,7 +10,7 @@ import "./chunk-ZMIBJS45.js";
10
10
  import {
11
11
  SkillLaunchEvent,
12
12
  logSkillLaunch
13
- } from "./chunk-A3OEZT2F.js";
13
+ } from "./chunk-E322ZT4P.js";
14
14
  import "./chunk-3PJXIDKI.js";
15
15
  import "./chunk-UWCTAVOD.js";
16
16
  import "./chunk-OFEVLU4C.js";
@@ -88,6 +88,7 @@ import {
88
88
  ExtensionSettingScope,
89
89
  ExtensionUpdateState,
90
90
  FILE_HISTORY_DIR,
91
+ FORK_SUBAGENT_TYPE,
91
92
  FileDiscoveryService,
92
93
  FileEncoding,
93
94
  FileHistoryService,
@@ -663,7 +664,7 @@ import {
663
664
  writeWorktreeSession,
664
665
  writeWorktreeSessionMarker,
665
666
  zaiProvider
666
- } from "./chunk-H4ZDM3N6.js";
667
+ } from "./chunk-Q3NN2XUW.js";
667
668
  import "./chunk-K5PGHDBN.js";
668
669
  import {
669
670
  runSideQuery
@@ -1017,7 +1018,7 @@ import {
1017
1018
  withDaemonRequestSpan,
1018
1019
  withDaemonSpan,
1019
1020
  withInteractionSpan
1020
- } from "./chunk-A3OEZT2F.js";
1021
+ } from "./chunk-E322ZT4P.js";
1021
1022
  import "./chunk-3PJXIDKI.js";
1022
1023
  import "./chunk-UWCTAVOD.js";
1023
1024
  import {
@@ -1327,6 +1328,7 @@ export {
1327
1328
  ExtensionUninstallEvent,
1328
1329
  ExtensionUpdateState,
1329
1330
  FILE_HISTORY_DIR,
1331
+ FORK_SUBAGENT_TYPE,
1330
1332
  FatalAuthenticationError,
1331
1333
  FatalBudgetExceededError,
1332
1334
  FatalCancellationError,
@@ -3,7 +3,7 @@
3
3
  import {
4
4
  InProcessBackend,
5
5
  TeamManager
6
- } from "./chunk-H4ZDM3N6.js";
6
+ } from "./chunk-Q3NN2XUW.js";
7
7
  import "./chunk-K5PGHDBN.js";
8
8
  import "./chunk-VXHYMZXW.js";
9
9
  import "./chunk-O4PICXES.js";
@@ -33,7 +33,7 @@ import "./chunk-CPVI5J2L.js";
33
33
  import "./chunk-ZMIBJS45.js";
34
34
  import "./chunk-77WXWU44.js";
35
35
  import "./chunk-B4ZF2KSI.js";
36
- import "./chunk-A3OEZT2F.js";
36
+ import "./chunk-E322ZT4P.js";
37
37
  import "./chunk-3PJXIDKI.js";
38
38
  import "./chunk-UWCTAVOD.js";
39
39
  import "./chunk-OFEVLU4C.js";
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  DiscoveredMCPTool
5
- } from "./chunk-A3OEZT2F.js";
5
+ } from "./chunk-E322ZT4P.js";
6
6
  import "./chunk-3PJXIDKI.js";
7
7
  import "./chunk-UWCTAVOD.js";
8
8
  import "./chunk-OFEVLU4C.js";
@@ -8,7 +8,7 @@ import {
8
8
  generateAgentWorktreeSlug,
9
9
  rebuildToolRegistryOnOverride,
10
10
  writeWorktreeSessionMarker
11
- } from "./chunk-H4ZDM3N6.js";
11
+ } from "./chunk-Q3NN2XUW.js";
12
12
  import "./chunk-K5PGHDBN.js";
13
13
  import "./chunk-VXHYMZXW.js";
14
14
  import "./chunk-O4PICXES.js";
@@ -24,7 +24,7 @@ import "./chunk-CPVI5J2L.js";
24
24
  import "./chunk-ZMIBJS45.js";
25
25
  import "./chunk-77WXWU44.js";
26
26
  import "./chunk-B4ZF2KSI.js";
27
- import "./chunk-A3OEZT2F.js";
27
+ import "./chunk-E322ZT4P.js";
28
28
  import "./chunk-3PJXIDKI.js";
29
29
  import "./chunk-UWCTAVOD.js";
30
30
  import "./chunk-OFEVLU4C.js";
@@ -738,7 +738,7 @@ function sanitizeForErrorMessage(value) {
738
738
  __name(sanitizeForErrorMessage, "sanitizeForErrorMessage");
739
739
  function createProductionDispatch(config, signal) {
740
740
  return async (prompt, opts) => {
741
- const { AgentHeadless, ContextState } = await import("./agent-headless-SY7VJUHV.js");
741
+ const { AgentHeadless, ContextState } = await import("./agent-headless-KZJALDQF.js");
742
742
  const ctx = new ContextState();
743
743
  ctx.set("task_prompt", prompt);
744
744
  if (opts.agentType === void 0 && opts.model === void 0 && opts.isolation === void 0 && opts.schema === void 0) {
@@ -12,7 +12,7 @@ import {
12
12
  detectLineEnding,
13
13
  getDiffStat,
14
14
  needsUtf8Bom
15
- } from "./chunk-H4ZDM3N6.js";
15
+ } from "./chunk-Q3NN2XUW.js";
16
16
  import "./chunk-K5PGHDBN.js";
17
17
  import "./chunk-VXHYMZXW.js";
18
18
  import "./chunk-O4PICXES.js";
@@ -34,7 +34,7 @@ import {
34
34
  getLanguageFromFilePath,
35
35
  getSpecificMimeType,
36
36
  logFileOperation
37
- } from "./chunk-A3OEZT2F.js";
37
+ } from "./chunk-E322ZT4P.js";
38
38
  import "./chunk-3PJXIDKI.js";
39
39
  import "./chunk-UWCTAVOD.js";
40
40
  import "./chunk-OFEVLU4C.js";
package/cli.js CHANGED
@@ -91,7 +91,7 @@ import {
91
91
  updateOutputLanguageFile,
92
92
  validateCustomTheme,
93
93
  writeOutputLanguageAndRegisterPath
94
- } from "./chunks/chunk-ABRZC6FA.js";
94
+ } from "./chunks/chunk-27STU35P.js";
95
95
  import {
96
96
  AgentSideConnection,
97
97
  PROTOCOL_VERSION,
@@ -104,7 +104,7 @@ import {
104
104
  formatContextUsageText,
105
105
  isTerminalGoalStatusKind,
106
106
  require_react
107
- } from "./chunks/chunk-TSBXGR73.js";
107
+ } from "./chunks/chunk-DYCU43TE.js";
108
108
  import {
109
109
  SUPPORTED_LANGUAGES,
110
110
  clearScreen,
@@ -117,7 +117,7 @@ import {
117
117
  ta,
118
118
  writeStderrLine,
119
119
  writeStdoutLine
120
- } from "./chunks/chunk-UOB6KPGG.js";
120
+ } from "./chunks/chunk-BW7CMDF3.js";
121
121
  import {
122
122
  noteInteraction
123
123
  } from "./chunks/chunk-MRO43B25.js";
@@ -137,6 +137,7 @@ import {
137
137
  DISPLAY_MODE,
138
138
  EXTENSIONS_CONFIG_FILENAME,
139
139
  ExtensionManager,
140
+ FORK_SUBAGENT_TYPE,
140
141
  FileDiscoveryService,
141
142
  FileSearchFactory,
142
143
  GitWorktreeService,
@@ -340,7 +341,7 @@ import {
340
341
  writeRuntimeStatus,
341
342
  writeWorktreeSession,
342
343
  writeWorktreeSessionMarker
343
- } from "./chunks/chunk-H4ZDM3N6.js";
344
+ } from "./chunks/chunk-Q3NN2XUW.js";
344
345
  import {
345
346
  external_exports
346
347
  } from "./chunks/chunk-K5PGHDBN.js";
@@ -416,7 +417,7 @@ import {
416
417
  stripRuntimeSnapshotPrefix,
417
418
  uiTelemetryService,
418
419
  withInteractionSpan
419
- } from "./chunks/chunk-A3OEZT2F.js";
420
+ } from "./chunks/chunk-E322ZT4P.js";
420
421
  import "./chunks/chunk-3PJXIDKI.js";
421
422
  import "./chunks/chunk-UWCTAVOD.js";
422
423
  import {
@@ -59187,7 +59188,7 @@ var serveCommand = {
59187
59188
  process.exit(1);
59188
59189
  }
59189
59190
  }
59190
- const { runQwenServe } = await import("./chunks/serve-Y5E4LKUI.js");
59191
+ const { runQwenServe } = await import("./chunks/serve-XDZAE3KF.js");
59191
59192
  try {
59192
59193
  await runQwenServe({
59193
59194
  port: argv.port,
@@ -71729,7 +71730,7 @@ async function extractMetadata(conversation, config) {
71729
71730
  const gitBranch = firstRecord?.gitBranch;
71730
71731
  let gitRepo;
71731
71732
  if (cwd5) {
71732
- const { getGitRepoName } = await import("./chunks/src-76DUBH3A.js");
71733
+ const { getGitRepoName } = await import("./chunks/src-JMUZP4A4.js");
71733
71734
  gitRepo = getGitRepoName(cwd5);
71734
71735
  }
71735
71736
  let model;
@@ -72995,6 +72996,7 @@ var forkCommand = {
72995
72996
  const params = {
72996
72997
  description: deriveForkDescription(directive),
72997
72998
  prompt: directive,
72999
+ subagent_type: FORK_SUBAGENT_TYPE,
72998
73000
  run_in_background: true
72999
73001
  };
73000
73002
  let result;
@@ -83921,7 +83923,7 @@ var SystemController = class extends BaseController {
83921
83923
  throw new Error("Request aborted");
83922
83924
  }
83923
83925
  try {
83924
- const mod = await import("./chunks/contextCommand-KM5OWV65.js");
83926
+ const mod = await import("./chunks/contextCommand-E2V26QGD.js");
83925
83927
  if (signal.aborted) {
83926
83928
  throw new Error("Request aborted");
83927
83929
  }
@@ -148247,7 +148249,7 @@ var QwenAgent = class {
148247
148249
  async initialize(args) {
148248
148250
  this.clientCapabilities = args.clientCapabilities;
148249
148251
  const authMethods = buildAuthMethods();
148250
- const version = "0.18.1-nightly.20260616.a68b2e1e7";
148252
+ const version = "0.18.1-preview.0";
148251
148253
  return {
148252
148254
  protocolVersion: PROTOCOL_VERSION,
148253
148255
  agentInfo: {
@@ -152332,7 +152334,7 @@ ${finalArgs[promptIndex + 1]}`;
152332
152334
  process.exit(0);
152333
152335
  }
152334
152336
  if (config.isInteractive()) {
152335
- void import("./chunks/scheduler-23KQW6CX.js").then((m) => m.startBackgroundHousekeeping(config, settings)).catch((err) => {
152337
+ void import("./chunks/scheduler-KFG4TT3A.js").then((m) => m.startBackgroundHousekeeping(config, settings)).catch((err) => {
152336
152338
  debugLogger80.warn("failed to start background housekeeping:", err);
152337
152339
  });
152338
152340
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qwen-code/qwen-code",
3
- "version": "0.18.1-nightly.20260616.a68b2e1e7",
3
+ "version": "0.18.1-preview.0",
4
4
  "description": "Qwen Code - AI-powered coding assistant",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,7 +25,7 @@
25
25
  "bundled"
26
26
  ],
27
27
  "config": {
28
- "sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.18.1-nightly.20260616.a68b2e1e7"
28
+ "sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.18.1-preview.0"
29
29
  },
30
30
  "dependencies": {},
31
31
  "optionalDependencies": {