← All reports

Changes on 2026-08-06

40 total changes in 3 runs

23:45 EST

🤖 AI Batch Analysis

### 文档变更分析 #### 总体摘要 本次文档更新主要是对现有技术文档进行大规模的“瘦身”与现代化维护,重点在于清理过时的版本特定说明、精简冗余的解释性文本,并将许多默认行为标准化,不再追溯旧版本的演进历史。 #### 关键变更主题 * **移除过时版本注释**: * 在 `checkpointing.md`、`desktop.md`、`discover-plugins.md`、`hooks.md` 等多个页面中,大量删除了 `Requires v2.x.x` 或 `Before v2.x.x` 的说明。 * 这表明文档已更新假设用户使用较新的版本,不再为旧版本的行为提供向后兼容的注脚。例如,会话重命名、上下文成本估算、语言服务器活动追踪等功能现在被视为标准功能。 * **精简描述与决策指南**: * **删除类比和废话**:如 `discover-plugins.md` 中删除了“App Store”的类比段落。 * **简化决策矩阵**:`plugins.md` 中删除了详细的“何时使用独立配置 vs 插件”的对比列表,仅保留简短的提示。 * **聚焦当前状态**:描述重点从“功能在某个版本是如何演变的”转变为“功能现在是怎样的”。例如,`checkpointing.md` 简化了关于子代理编辑的恢复逻辑描述。 * **结构与引用优化**: * 通用问题排查部分被缩减,转而引用专门的故障排除页面(如 `discover-plugins.md` 和 `hooks.md`)。 * 删除了关于 `CLAUDE_PLUGIN_ROOT` 缓存机制的长篇解释,现在仅作为标准用法展示。 * **特定行为说明的标准化**: * `sandboxing.md` 中删除了关于 `v2.1.191` 网络域名特定行为的详细说明,将其描述为当前默认行为。 * `hooks-guide.md` 中删除了关于权限规则优先级的冗长解释。 #### 影响等级:**Low** (功能性) / **Medium** (可读性) **理由**:此次变更主要是文档维护层面的优化,**没有引入破坏性变更**,也没有更改代码 API 或核心功能。其影响在于提升了文档的清晰度和维护性,移除了干扰信息的噪音,使开发者能更快获取当前的有效信息。 #### 开发者行动项 1. **审查内部文档**:如果您基于旧版本文档编写了内部 Wiki 或操作指南,请检查并移除其中引用的旧版本限制(如“需 v2.1.221 或更高版本”),这些功能现在应被视为默认可用。 2. **检查插件配置**:文档现在更加突出 `${CLAUDE_PLUGIN_ROOT}` 和 `${CLAUDE_PLUGIN_DATA}` 的使用,而不再详细解释缓存机制。请确保您的插件开发中正确使用了这些环境变量来引用路径。 3. **更新故障排查流程**:由于通用问题排查条目被缩减并指向专门页面,遇到插件或钩子问题时,应直接查阅最新的“Troubleshooting”章节,而不是依赖主页面上的简短列表。 4. **关注行为默认值**:如果您依赖某些特定的旧版本行为(例如 LSP 插件未被标记为未使用的旧逻辑),需注意这些历史行为描述已被移除,当前文档描述的是最新的默认行为。 5. **简化决策流程**:在创建新技能或插件时,参考 `plugins.md` 中的简化建议,从独立配置开始快速迭代,待需分享时再转为插件。
💭 Model Reasoning
1. **Analyze the Request:** * **Role:** World-class programmer analyzing documentation changes. * **Task:** Analyze a batch of 9 documentation pages, summarize changes, and explain why they matter. * **Format:** Markdown, concise, insightful, focus on developers. * **Language:** Chinese. 2. **Analyze the Pages and Changes:** * **Page 1: `checkpointing.md`** * *Changes:* Removed specific version references (e.g., "Before v2.1.208", "Before v2.1.218"). Simplified the introduction sentence. Clarified the subagent editing behavior (foreground vs. background). Condensed the "Not a replacement for version control" section. * *Theme:* Cleaning up version-specific footnotes (likely those versions are now very old or the baseline is higher), improving clarity on subagent behavior. * **Page 2: `desktop.md`** * *Changes:* Removed a specific version requirement note ("Requires Claude Code v2.1.221 or later") regarding session renaming. The feature is now assumed to be standard. * *Theme:* Removing version constraints/footnotes. * **Page 3: `discover-plugins.md`** * *Changes:* Removed "app store" analogy paragraph. Removed specific version numbers (v2.1.143, v2.1.144, v2.1.145, v2.1.203, v2.1.187, v2.1.206) associated with features like context cost, last updated, unused plugins tracking. Simplified "Common issues" section by removing generic troubleshooting bullets (pointing to a dedicated page instead). * *Theme:* Heavy cleanup of legacy version notes, generalizing feature descriptions as standard behavior. * **Page 4: `hooks.md`** * *Changes:* Removed "start with the guide" suggestion (seems redundant). Removed specific version note about `allowManagedHooksOnly`. Simplified the matcher support sentence. Removed a detailed description of HTTP error handling (referencing a specific section instead). Removed a note about `CLAUDE_PLUGIN_ROOT` shell quoting. Truncated a table description (markdown diff cut-off, but looks like cleanup). * *Theme:* Streamlining text, removing redundant instructional text, removing version notes. * **Page 5: `hooks-guide.md`** * *Changes:* Removed note about v2.1.191 allowing `,` as a list separator. Removed detailed explanation of permission rule precedence regarding `allow` vs `deny`. * *Theme:* Removing version-specific syntax notes, simplifying permission explanations. * **Page 6: `plugin-marketplaces.md`** * *Changes:* Removed explanation of *why* `${CLAUDE_PLUGIN_ROOT}` is necessary (caching context). Removed "Test locally before distribution" section. * *Theme:* Removing explanatory text that might be considered obvious or detailed elsewhere, simplifying workflow descriptions. * **Page 7: `plugins.md`** * *Changes:* Removed detailed "Use standalone... / Use plugins when..." decision matrix. Removed note about updating if `/plugin` command is missing. Removed summary list of created plugin components. * *Theme:* Simplifying decision-making sections, removing upgrade troubleshooting text (assuming users are on newer versions). * **Page 8: `plugins-reference.md`** * *Changes:* Removed introductory paragraph about reference content. Removed "Integration behavior" lists (reducing to simple sentences). Removed note about server capabilities integrating seamlessly. Removed version note about v2.1.205 LSP server failure handling. Removed explanation of symlink flexibility. Removed directory structure example for `.claude-plugin/`. Removed detailed explanation of `version` field vs commit SHA. * *Theme:* Aggressive text reduction, removing "how it works" fluff, focusing on specs, removing version-specific behavioral changes. * **Page 9: `sandboxing.md`** * *Changes:* Removed explanation of path resolution in the `.` example. Removed mention of specific version (v2.1.191) for domain restrictions. Removed specific troubleshooting item about Seccomp filter on Linux. * *Theme:* Removing specific version notes, simplifying explanations. 3. **Synthesize the Analysis:** * **Overall Summary:** The documentation update focuses on "cleaning house." It's a major effort to remove legacy version constraints (e.g., "Before v2.x"), simplify verbose explanations, and streamline decision-making matrices. The docs are shifting from "explaining evolution" to "stating current behavior." * **Key Themes:** * *Deprecation of Legacy Version Notes:* Massive removal of "Requires v2.x" or "Before v2.x" statements. This implies the baseline supported version has moved up significantly, or the product has matured enough that these historical notes are just noise. * *Conciseness & Redundancy Reduction:* Removal of analogies (app store), detailed "how-to" decision trees (standalone vs plugins), and repetitive integration behavior lists. * *Focus on Current State:* Descriptions now state what *is* happening, not what *changed* in version X to make it happen. * *Consolidation:* Troubleshooting sections are trimmed to point to dedicated reference pages rather than duplicating info. * **Impact Level:** **Low** (Functional Impact) / **Medium** (Readability Impact). * *Reasoning:* There are no *breaking changes* to the API or functionality described. The code behavior isn't changing; the documentation is just getting cleaner. Developers will find it easier to read, but nothing breaks. * **Action Items:** * *Update Baseline Assumptions:* If you maintain internal docs based on these, ensure they align with the assumption that features like "session renaming" and "context cost estimation" are standard. * *Simplify Internal Guides:* Follow Anthropic's lead and strip version-specific "what's new" sections from your own internal developer wikis to reduce maintenance burden. * *Review Plugin/Sandbox Configs:* While behavior hasn't changed, the docs now emphasize specific paths (like `${CLAUDE_PLUGIN_ROOT}`) without explaining *why* (caching). Ensure your plugins actually use these variables as they are now more prominently displayed as "the way" to do things. * *Check Migration Guides:* If you were relying on "Before v2.x" notes to support old versions, note that the official docs no longer support that narrative. 4. **Drafting the Response (in Chinese):** * *Summary:* 此次更新主要是文档的“瘦身”与现代化,清理了大量过时的版本说明和冗余的解释性文本。 * *Themes:* 移除版本特定注释, 精简描述与结构, 去除冗余解释. * *Impact:* Low (Functional). Medium (Usability). It makes the docs cleaner. * *Action Items:* Update internal docs to match the cleaner style; verify local scripts aren't looking for features listed as "new" in removed text; ensure plugin configs use the referenced environment variables. 5. **Refining the Output:** * Make the tone professional and insightful. * Ensure the markdown is formatted correctly. * Translate concepts accurately (e.g., "Legacy version notes" -> "过时的版本注释"). *(Self-Correction during drafting)*: The "Impact" isn't breaking, so labeling it "Breaking" is wrong. It's a maintenance update. I will label it "Low" for functionality but mention the benefit is "High" for clarity. Actually, standard practice is usually Low/Medium/High for impact on *users*. I'll stick with Low/Medium. Let's go with **Low** because it doesn't change how they write code, only how they read docs. *Action items:* Be specific. Mention the plugin path variables. *(Final Polish)*: Check the page `sandboxing.md` change about Seccomp filter. If that troubleshooting note was removed, does that mean the issue is fixed or just the note was removed? Likely the latter (cleanup). I should advise developers to look for dedicated troubleshooting pages if issues arise, as the docs now point elsewhere. 6. **Final Output Generation.** (Proceed to generate markdown).
20:38 EST

🤖 AI Batch Analysis

### 整体摘要 本次文档更新主要进行了大规模的文本清理,移除了大量针对旧版本(如 v2.1.12x)的特定说明,反映了当前版本的稳定性。同时,重点引入了 v2.1.223 版本的会话管理优化和设置合并逻辑的更新,并澄清了 Bedrock 平台对自动缓存的支持情况。 ### 关键变更主题 * **文档标准化与去版本化**:移除了诸如 "As of v2.1.121" 等版本限制说明,相关功能现已成为当前版本的通用标准。 * **会话管理增强**:Headless 模式下,现在可以通过 Session ID 在本机任意目录恢复会话,不再受限于当前项目目录或 git worktree。 * **配置合并逻辑更新**:明确了 v2.1.223 中 `env` 块和部分遥测设置在多个管理源之间的精细合并行为,修正了之前“不合并”的描述。 * **平台特性澄清**:更新了关于 Amazon Bedrock 上 "Automatic prompt caching" 的支持情况,明确指出除旧版集成外均支持。 * **功能移除与行为调整**:Skill 工具不再支持调用内置的 `/review` 命令;自定义状态栏现在会隐藏底部的键盘快捷键提示(如 `esc to interrupt`)。 ### 影响等级:**Medium** 尽管大部分变更属于文档维护性质的清理,但 **会话恢复逻辑的改变**(允许跨目录查找)和 **设置合并规则的更新** 对于构建复杂自动化流程或管理多源配置的开发者具有实质性的行为影响。 ### 开发者行动项 * **检查会话恢复脚本**:如果您编写了依赖 `--resume` 的脚本,请注意现在可以在不同目录下运行恢复命令,无需再严格保持在原目录。 * **审查管理配置**:如果您在使用 Server-managed settings 和 Device-managed settings,请重新检查 `env` 变量和 `OTEL_LOGS_EXPORTER` 的优先级,确认它们按预期合并。 * **更新 Skill 集成**:如果您的插件或 Skill 逻辑依赖于调用 `/review` 命令,请尽快移除或替换该逻辑,因为该入口已被禁用。 * **关注 Bedrock 缓存**:在 Bedrock 上使用缓存时,注意区分新版集成(支持自动缓存)和旧版集成(仅支持显式断点)。
💭 Model Reasoning
1. **Analyze the Request:** * **Role:** World-class programmer with expertise in developer tools and documentation. * **Task:** Analyze a batch of documentation changes (27 pages total) and summarize them. * **Format:** Markdown, concise, insightful, focus on what matters to developers. * **Language:** Chinese. 2. **Analyze the Input Data (Diff by Diff):** * `claude-code-on-the-web.md`: UI text change. "Open in CLI" -> "Open in > Terminal". (Minor UI update). * `cli-reference.md`: `--debug` flag syntax clarification. Now emphasizes `=` form for filtering. * `data-usage.md`: Removed specific version "v2.1.126". (Generalization/Cleanup). * `google-vertex-ai.md`: Removed specific version "v2.1.121". (Generalization/Cleanup). * `headless.md`: * Removed "As of v2.1.128". * Session resume: Now allows running commands from *different* directories (finds session by ID anywhere). Previously restricted to current directory/worktree. (Behavioral change/Feature improvement). * `hooks.md`: Clarified `PostToolUse` hook behavior regarding interrupts. Canceling a tool does *not* fire the hook. (Behavioral clarification). * `iam.md`: Added details about `env` block merging and cross-source lock keys in v2.1.223. (New feature/clarification on managed settings merging). * `mcp.md`: * Removed "As of v2.1.121". * Removed "v2.1.121 or later" for `alwaysLoad`. (Generalization). * `model-config.md`: Clarified merge behavior for `availableModels`. (Clarification). * `monitoring-usage.md`: Added detail about `OTEL_LOGS_EXPORTER` merging behavior across admin sources in v2.1.223. (New feature/clarification). * `plugins.md`: Removed "v2.1.128 or later". (Generalization). * `plugins-reference.md`: Removed "Note" block about version requirement for `prune`. (Generalization). * `settings.md`: Removed "v2.1.119 or later" for `agentPushNotifEnabled`. (Generalization). * `skills.md` & `slash-commands.md`: Removed `/review` from the list of built-in commands available through Skill tool. (Feature removal/behavior change). * `statusline.md`: Updated text about footer hints. Custom status line now stops showing *most* footer keyboard hints, not just the specific ones mentioned before. (Behavioral change). * `terminal-config.md`: Removed "Note" about custom theme version requirement. (Generalization). * `about-claude/pricing.md`: * "one cache read" -> "after one cache read". * "e.g." -> "for example". * "listed below" -> "listed in the following table". * Added: Fast mode pricing *does* apply to Claude Managed Agents. * Removed "Code Execution" -> "code execution". * `api/rate-limits.md`: * UI text updates: "Settings > Limits" -> "Settings > Billing", "Change Limit" -> "Adjust limit", "Limits" -> "Rate limits". (UI/UX update). * `build-with-claude/overview.md` & `build-with-claude/text-generation.md`: Updated platform availability for "Automatic prompt caching" to include `bedrock`. * `build-with-claude/prompt-caching.md`: Updated note to say automatic caching is available everywhere *except* legacy Bedrock. * `build-with-claude/batch-processing.md`: Updated link `settings/limits` -> `settings/billing`. * `build-with-claude/claude-on-amazon-bedrock.md`: Added "Automatic prompt caching" to the list of unsupported features (confirming the previous edit's nuance). * `build-with-claude/claude-in-microsoft-foundry.md`: PHP composer install command update. 3. **Synthesize and Categorize Themes:** * **Theme 1: Documentation Maintenance/Cleanup.** Many pages removed specific version numbers (e.g., "As of v2.1.121"). This suggests a cleanup pass where features are now standard enough to not require version caveats, or the docs are being synced with the latest stable release. * **Theme 2: Settings & IAM Merging Logic.** Updates in `iam.md` and `monitoring-usage.md` regarding `v2.1.223` highlight new merge behaviors for environment variables and telemetry settings across different managed sources. * **Theme 3: Session & Workflow Improvements.** `headless.md` changes regarding session ID lookup across directories (v2.1.223) is a meaningful usability improvement. * **Theme 4: Platform Feature Availability (Bedrock).** Clarification on Automatic Prompt Caching support on Bedrock (available generally, but not on legacy integrations). * **Theme 5: UI & Pricing Consistency.** Updates to pricing pages (Fast mode, Managed Agents) and Console navigation (Limits vs. Billing). 4. **Determine Impact Level:** * *Low:* Most text cleanups, grammar fixes, removal of old version notes. * *Medium:* The session ID lookup change (`headless.md`) and the settings merge logic (`iam.md`, `monitoring-usage.md`) are important for developers managing complex setups or CI/CD pipelines. The removal of `/review` from Skill tools might break specific automation scripts. 5. **Draft the Response (in Chinese):** * *Overall Summary:* 批量更新主要聚焦于文档清理、版本说明移除,以及 v2.1.223 版本引入的新功能说明(如跨目录会话恢复和设置合并逻辑)。同时也更新了 Bedrock 平台的特性支持说明。 * *Key Themes:* * 文档清理:移除了大量 "As of v2.1.x" 等旧版本限制说明,表明相关功能已成为当前版本的通用标准。 * 会话管理优化:Headless 模式下现在可以通过 ID 在任意目录恢复会话,不再局限于当前目录。 * 设置合并逻辑:明确了 v2.1.223 中 `env` 块和遥测设置在多个管理源之间的合并行为。 * 平台特性更新:澄清了 Bedrock 对 "Automatic prompt caching" 的支持情况(除旧版集成外均支持)。 * 功能移除/变更:Skill 工具不再支持内置的 `/review` 命令;自定义状态栏会隐藏更多底部提示。 * *Impact Level:* **Medium**。虽然大部分是文本清理,但会话恢复逻辑的改变和设置合并规则的更新对深度用户和开发者工具有重要影响。 * *Action Items:* * 检查依赖会话 ID 恢复的脚本,确认其是否受益于新的跨目录查找功能。 * 审查 IAM 和遥测配置,特别是涉及多个管理源(managed settings)的场景,以确保符合新的合并逻辑。 * 如果使用了 Skill 工具调用 `/review`,需更新相关代码,因为该功能已被移除。 * 了解 Bedrock 集成对自动缓存的具体支持情况。 6. **Refine and Polish:** Ensure the tone is professional and concise. (Self-correction: Make sure to mention the specific version v2.1.223 for the behavioral changes as that's "source of truth"). 7. **Final Output Generation** (similar to the drafted Chinese text).
01:42 EST

🤖 AI Batch Analysis

# 文档变更分析 ## 1. Overall Summary 本次文档更新重点介绍了 **v2.1.221** 版本引入的 **MCP 发现缓存** 功能,通过懒加载机制优化远程 MCP 服务器的启动性能,并明确了 CLI 在非交互模式(`-p`)下的行为细节及限制。 ## 2. Key Themes across pages * **MCP 发现缓存**: 远程(HTTP/SSE)MCP 服务器现在会缓存其工具列表(在 `/mcp` 中显示为 `cached` 状态)。系统在启动时直接加载缓存,仅在实际调用工具时才建立连接,显著减少启动延迟。 * **CLI 非交互模式 (`-p`) 细节**: 明确了 `-p` 模式下使用 `--mcp-config` 时的行为——系统会等待未就绪的服务器连接(受 `MCP_TIMEOUT` 限制),但已缓存的服务器会跳过等待。同时澄清了 `--bg` 和 `--cloud` 与 `-p` 存在冲突,会被拒绝。 * **启动阻塞逻辑优化**: 更新了 `alwaysLoad` 的行为描述,具有有效缓存条目的远程服务器将不再阻塞启动过程,进一步优化了冷启动速度。 ## 3. Impact Level **Medium** *Reasoning*: 这是一项重要的性能优化,改变了开发者对 MCP 服务器“启动即连接”的心理预期。虽然默认行为提升了体验,但在排查连接问题时,开发者必须理解新的 `cached` 状态及其带来的延迟连接特性。 ## 4. Action items for developers * **检查版本**: 确保使用 Claude Code **v2.1.221** 或更高版本以启用 MCP 缓存优化。 * **调整启动行为**: 若业务逻辑依赖服务器在启动时立即连接,请设置环境变量 `MCP_DISCOVERY_CACHE=0` 禁用缓存。 * **注意超时设置**: 在脚本或 CI 中使用 `claude -p --mcp-config` 时,留意默认的 **30秒** 启动等待时间 (`MCP_TIMEOUT`)。 * **排查连接状态**: 遇到 MCP 工具问题时,检查 `/mcp` 面板是否显示 `cached` 状态,这意味着服务器尚未建立物理连接。
💭 Model Reasoning
1. **Understand the Goal**: The user wants a concise, insightful batch analysis of 4 documentation changes (`cli-reference.md`, `headless.md`, `mcp.md`, `sub-agents.md`) in markdown format, using Chinese. The persona is a world-class programmer. I need to summarize changes, identify key themes, assess impact, and list action items. 2. **Analyze the Changes**: * **`cli-reference.md`**: Updated the description of the `--mcp-config` flag. * *Change*: Added detail about behavior when used with `-p` (print/non-interactive mode). It now waits for pending servers to connect before the first turn (up to `MCP_TIMEOUT`, default 30s). If a server has a cached tool list, it skips the wait. Requires v2.1.221+. * *Theme*: MCP server connection timing/behavior in CLI print mode. * **`headless.md`**: * *Change 1*: Minor grammar fix ("the CLI options you need" vs "any CLI options"). * *Change 2*: Clarified that not *all* CLI options combine with `-p`. Specifically mentions `--bg` and `--cloud` as conflicts. * *Change 3*: Updated the "MCP server fields" section. Added a paragraph about `--mcp-config` with `-p` (similar to `cli-reference.md`): waits for pending servers, cached tool list status, requires v2.1.221+. * *Theme*: Refining behavior documentation for non-interactive mode (`-p`) and MCP connection timing. * **`mcp.md`**: * *Change 1*: Added a new paragraph about "cached" status. Explains that remote (HTTP/SSE) servers can show "cached [time] ago · connects on first use · [count] tools". Means tool list is loaded from cache, server connects on first tool use. Can be disabled via `MCP_DISCOVERY_CACHE=0`. Requires v2.1.221+. * *Change 2*: Updated "Automatic lifecycle" section. Mentions that at startup, remote plugin servers can also show `cached` status and connect on first use. * *Change 3*: Updated `alwaysLoad` section. Clarifies that setting `alwaysLoad: true` blocks startup until connection (unless cached). Remote servers with cached entries supply tools without connecting, so they don't block startup. * *Theme*: Introduction of "Discovery Cache" for remote MCP servers to improve startup performance. * **`sub-agents.md`**: * *Change 1*: Updated a note about "inline server definitions". Added a sentence about remote servers potentially showing `cached` status and connecting on first use, similar to the other files. * *Theme*: Consistency in documenting the "cached" status feature for remote servers. 3. **Synthesize Key Themes**: * **MCP Discovery Cache (v2.1.221+)**: The core change is the introduction of a caching mechanism for remote MCP server tool lists. This optimizes startup times by connecting servers only when needed ("lazy loading") if the tool list is cached. * **Non-interactive Mode (`-p`) Behavior**: Specifics on how `-p` interacts with MCP config (waits for servers, handles cached lists) and CLI option compatibility (rejects `--bg`/`--cloud`). * **Startup Latency Optimization**: The caching and "connect on first use" mechanism is explicitly designed to reduce startup delays. 4. **Assess Impact**: * *Level*: **Medium**. * *Reasoning*: This is a performance/behavior optimization rather than a breaking API change (though version requirement v2.1.221+ is mentioned). Developers relying on MCP servers will see faster startups, but might need to know about the "cached" state if they debug connection issues. It changes the timing of when tools become available (immediately via cache, but connection might be delayed). 5. **Draft Action Items**: * Verify version compatibility (requires v2.1.221+). * Consider disabling the cache (`MCP_DISCOVERY_CACHE=0`) if you need immediate connections for all servers. * Update scripts if they rely on immediate connection of *all* MCP servers at startup (especially with `-p`), though the text says it waits up to 30s for pending ones. * Review `alwaysLoad` behavior changes regarding startup blocking. 6. **Format the Output (in Chinese)**: * *Summary*: Documentation updates highlight the new MCP Discovery Cache feature (v2.1.221+) which optimizes startup performance by lazy-loading remote servers and clarifies CLI behavior in print mode. * *Themes*: * MCP Server Caching: Remote servers can now load tool lists from cache ("cached" status) and connect on first use to speed up startup. * CLI Print Mode (`-p`): Clarifies that `-p` waits for MCP servers (up to timeout) and rejects conflicting flags (`--bg`, `--cloud`). * Performance Optimization: `alwaysLoad` behavior refined to respect cached states, reducing startup blocking. * *Impact*: Medium. Improves startup speed but requires understanding the new "cached" status and potential lazy connection behavior. * *Action Items*: * Check for Claude Code v2.1.221+ to leverage the new MCP caching behavior. * Set `MCP_DISCOVERY_CACHE=0` if you require all servers to connect immediately at startup. * Update documentation/training materials regarding the `/mcp` panel's new `cached` status indicators. * Be aware of the 30-second `MCP_TIMEOUT` default when using `--mcp-config` with `-p`. 7. **Refine Language**: Ensure professional "programmer-to-programmer" tone in Chinese. Use terms like "懒加载" (lazy load), "启动延迟" (startup latency), "MCP 服务器". * *Refinement on Theme 1*: Use "MCP 发现缓存". * *Refinement on Action Items*: Be specific about the env var. 8. **Final Polish**: Check against the prompt constraints (markdown, concise, insightful, Chinese). *(Self-Correction during drafting)*: The prompt asks for "Impact level" with reasoning. The reasoning needs to be specific. The action items need to be max 5. *Drafting the content*: **Summary**: 本次文档更新重点介绍了 v2.1.221 版本引入的 **MCP 发现缓存**功能,旨在优化远程服务器的启动性能,并明确了在非交互模式(`-p`)下的 CLI 行为与限制。 **Key Themes**: * **MCP 发现缓存机制**: 远程 MCP 服务器现在会缓存工具列表(显示为 `cached` 状态),仅在首次调用工具时才建立连接,从而显著减少启动延迟。 * **非交互模式优化**: 明确了 `-p` 模式下 `--mcp-config` 的行为,系统会等待服务器连接(最多 30 秒),但若服务器有缓存则跳过等待;同时澄清了 `--bg` 和 `--cloud` 与 `-p` 不兼容。 * **启动阻塞逻辑**: 优化了 `alwaysLoad` 的行为,具有缓存条目的远程服务器不再阻塞启动。 **Impact Level**: **Medium**。 *Reasoning*: 这是一项重大的性能优化,改变了服务器的连接时机。虽然默认行为提升了速度,但开发者需要理解新的“cached”状态,以便在排查连接问题时不会困惑。 **Action Items**: * 升级至 **Claude Code v2.1.221** 以利用 MCP 缓存带来的启动加速。 * 若需要强制所有服务器在启动时立即连接,请设置环境变量 `MCP_DISCOVERY_CACHE=0`。 * 在使用 `claude -p` 配合 `--mcp-config` 时,注意默认的 30 秒 `MCP_TIMEOUT` 启动等待行为。 * 排查 MCP 问题时,留意 `/mcp` 面板中的 `cached` 状态信息。 9. **Final Output Generation**. (Matches the drafted content).

📚 Claude Code