← All reports

Changes on 2026-06-30

69 total changes in 6 runs

20:02 EST

🤖 AI Batch Analysis

1. **Overall Summary** 本次文档更新主要澄清了 `PreToolUse` 钩子的触发边界(指出 `@` 引用不会触发工具调用),并修正了在 `settings.json` 中通过 PowerShell 访问项目根目录环境变量时的语法说明。 2. **Key Themes** * **钩子执行逻辑与限制:** 明确了通过 `@` 引用的文件是在构建 prompt 时直接插入内容,不会产生工具调用,因此不会触发 `PreToolUse` 钩子(包括匹配 `Read` 的钩子)。 * **PowerShell 作用域问题:** 解释了 PowerShell 在 shell 模式下将 `${CLAUDE_PROJECT_DIR}` 视为本地变量而非环境变量,导致 `settings.json` 中的钩子无法正确读取路径。 3. **Impact Level** **Medium (中等)** 虽然不是 API 的破坏性变更,但这修正了开发者容易产生的两个误解:一是以为可以通过 Hook 拦截 `@` 引用,二是 PowerShell 脚本因变量语法错误而失败。这对配置自动化流程和安全权限的开发者至关重要。 4. **Action items** * **审查权限控制:** 如果之前试图通过 `PreToolUse` Hook 来拦截通过 `@` 引用的敏感文件,请改为使用权限配置中的 [`Read` deny 规则](/en/permissions#read-and-edit)。 * **修复 PowerShell 脚本:** 检查定义在 `settings.json` 中的 PowerShell 钩子,将裸变量形式 `${CLAUDE_PROJECT_DIR}` 修改为环境变量形式 `$env:CLAUDE_PROJECT_DIR`。 * **考虑切换执行形式:** 或者,将钩子配置切换为 [exec form](/en/permissions#read-and-edit),以便在 `args` 元素中使用变量替换功能。
💭 Model Reasoning
1. **Analyze the Request:** * **Role:** World-class programmer analyzing documentation changes. * **Input:** A diff of a single file (`hooks.md`). * **Language:** Chinese (requested: "请用中文回复"). * **Format:** Concise markdown. * **Structure:** 1. Overall Summary (1-2 sentences). 2. Key Themes (bullets). 3. Impact Level (Low/Medium/High/Breaking) with reasoning. 4. Action Items (bullets, max 5). 2. **Analyze the Diff (`hooks.md`):** * *Change 1 (Line 1328-1333):* Added a `<Warning>` block regarding `PreToolUse`. * *Content:* `PreToolUse` only runs when a *tool call* occurs. Files referenced with `@` are inserted into the prompt directly without a tool call. Therefore, `PreToolUse` (even for `Read` hooks) does *not* fire for `@` references. To block paths from `@`, use a `Read` deny rule. * *Significance:* Corrects a potential misunderstanding about when hooks trigger versus how context injection works. * *Change 2 (Line 3034-3048):* Added a section about referencing the project root (`CLAUDE_PROJECT_DIR`) in PowerShell hooks. * *Content:* PowerShell treats `${CLAUDE_PROJECT_DIR}` as a local variable in shell form. To access the environment variable, use `$env:CLAUDE_PROJECT_DIR`. Note: `${...}` substitution in shell form only works for plugin hooks. For `settings.json` hooks, use `$env:` or switch to `exec` form. * *Significance:* Specific technical fix for PowerShell users writing hooks in `settings.json`. Explains the difference between shell form and exec form regarding variable substitution. 3. **Draft the Content (Internal Monologue/Translation):** * *Summary:* The documentation clarifies when `PreToolUse` hooks are triggered (specifically excluding `@` file references) and provides instructions for correctly accessing the project root directory in PowerShell hooks defined in `settings.json`. * *Themes:* Hook execution lifecycle (when they don't run), Platform-specific syntax (PowerShell variable scoping). * *Impact:* Medium/High for PowerShell users, Medium for logic correctness (security/permissions). Let's go with **Medium**. It's not a breaking change to the API, but it fixes logic bugs developers might write (expecting hooks to fire on `@`, or failing PowerShell scripts due to missing env vars). * *Action Items:* * Review `PreToolUse` logic if expecting to intercept `@` references. * Update PowerShell hooks to use `$env:CLAUDE_PROJECT_DIR` instead of `${CLAUDE_PROJECT_DIR}` in `settings.json`. * Consider using `exec` form if variable substitution is preferred. 4. **Refine and Translate to Chinese:** * *Summary:* 本次文档更新阐明了 `PreToolUse` 钩子的触发时机(明确排除了通过 `@` 引用的文件),并提供了在 `settings.json` 中定义 PowerShell 钩子时正确访问项目根目录(`CLAUDE_PROJECT_DIR`)的指导。 * *Themes:* * **Hook 生命周期与边界:** 明确了 `@` 引用不会触发工具调用,因此 `PreToolUse` 无法拦截。 * **PowerShell 环境变量处理:** 解决了在 `settings.json` 中使用 shell 形式运行 PowerShell 时访问 `CLAUDE_PROJECT_DIR` 的语法问题。 * *Impact:* **中等**。虽然不是破坏性变更,但解决了常见的逻辑误区和环境变量配置错误,直接影响基于 hooks 的安全控制和脚本执行。 * *Action Items:* * 如果依赖 `PreToolUse` 来监控或拦截 `Read` 操作,请改用权限中的 `Read` deny 规则来处理 `@` 引用。 * 检查定义在 `settings.json` 中的 PowerShell 钩子,将 `${CLAUDE_PROJECT_DIR}` 替换为 `$env:CLAUDE_PROJECT_DIR`。 * 或考虑将 PowerShell 钩子切换为 `exec` 形式以利用变量替换功能。 5. **Final Review against Constraints:** * Concise? Yes. * Insightful? Yes, addresses the "why" (PowerShell local var vs env var, direct prompt injection). * Markdown format? Yes. * Chinese? Yes. * Max 5 action items? Yes (3 items). 6. **Generate Output.** (Proceed to generate the markdown response).

📚 Claude Code

18:13 EST

🤖 AI Batch Analysis

### Overall Summary 本次更新优化了 `enforceAvailableModels` 的默认模型选择逻辑,并大幅重构了代码示例,将 Shell 脚本中脆弱的文本解析替换为健壮的 `jq` JSON 处理,同时简化了批处理相关的示例代码。 ### Key Themes * **代码示例现代化与健壮性**:在 `extended-thinking`、`streaming` 和 `batch-processing` 页面中,全面移除了依赖 `sed`、`grep` 及 Shell 字符串截取(如 `${event#*...}`)的旧式解析代码,统一改用 `jq` 进行标准 JSON 处理,显著降低了脚本因格式变化而失效的风险。 * **文档逻辑简化**:`batch-processing` 中的示例去掉了复杂的轮询 (`until`)、手动分页循环和繁重的 JSONL 结果处理逻辑,转而展示最核心的 API 调用,建议开发者依赖 SDK 处理复杂流程。 * **配置行为精细化**:`settings.md` 中的 `enforceAvailableModels` 逻辑得到修正,现在如果用户的默认模型已包含在允许列表中,系统将保留该模型,而不是强制降级到列表的第一项。 ### Impact Level **Medium (中)** * **理由**:`settings.md` 中的变更涉及软件的实际运行行为(模型降级策略),对受管环境下的开发者具有直接影响。代码示例的变更虽然仅为文档层面,但指出了更佳实践,有助于提升开发者编写脚本的稳定性。 ### Action Items * **审查模型配置**:如果您在受管设置中启用了 `enforceAvailableModels`,请验证新的逻辑(保留白名单中的默认模型)是否符合您的预期降级策略。 * **重构 Shell 脚本**:检查现有项目或 CI 流程中是否引用了文档中的旧版 Shell 解析逻辑,建议引入 `jq` 工具并参考新版文档重写,以提高解析 API 响应的可靠性。 * **更新批处理参考**:若您依赖文档中的 `batch-processing` 示例构建自动轮询或结果处理脚本,请注意新版文档已移除 `while/until` 循环模版,需自行补充或迁移至 SDK。
💭 Model Reasoning
1. **Analyze the Request:** * **Role:** World-class programmer analyzing documentation changes. * **Format:** Markdown, concise, insightful. * **Language:** Chinese (requested: "请用中文回复"). * **Input:** 4 diff snippets from documentation pages (`settings.md`, `extended-thinking.md`, `streaming.md`, `batch-processing.md`). * **Output Requirements:** 1. Overall Summary (1-2 sentences). 2. Key Themes (bullets). 3. Impact Level (Low/Medium/High/Breaking) with reasoning. 4. Action Items (bullets, max 5). 2. **Analyze Page 1: `settings.md`** * *Diff:* Changed description for `enforceAvailableModels`. * *Change:* Added condition: "but only when the default model for the user's account type is not in the allowlist; an allowlisted default is kept as-is." * *Meaning:* Previously, if `enforceAvailableModels` was true, the default model *always* fell back to the first allowlisted entry. Now, if the user's actual default model is *already* in the allowlist, it stays as that model. It only swaps if the default isn't allowed. This is a refinement in logic/behavior, likely a fix for an overly restrictive default behavior. 3. **Analyze Page 2: `build-with-claude/extended-thinking.md`** * *Diff:* Changed shell script parsing logic for `TOOL_USE_ID`. * *Old:* `grep -o 'toolu_[A-Za-z0-9]*'` * *New:* `jq -r '.[] | select(.type == "tool_use") | .id'` * *Meaning:* Moved from fragile regex parsing to robust `jq` JSON parsing. This improves reliability and correctness. 4. **Analyze Page 3: `build-with-claude/streaming.md`** * *Diff:* Simplified a shell script example for streaming text deltas. * *Old:* Manual `while` loop with `grep` and string manipulation (`text=${event#*'"text":"'"}`). * *New:* `jq -rj 'select(.delta.type? == "text_delta") | .delta.text'` * *Meaning:* Major simplification and robustness improvement using `jq`. 5. **Analyze Page 4: `build-with-claude/batch-processing.md`** * *Diff:* Three major sections simplified using `jq` or removing complex bash logic. * *Section 1 (Status Check):* Removed the `until` loop polling logic, replaced with a single `curl` + `jq` command to show how to check status. (Refactoring for clarity/simplicity). * *Section 2 (Pagination):* Removed the complex bash loop handling `has_more` and `after_id`. Replaced with a simple curl showing the concept, noting SDKs handle it automatically. * *Section 3 (Results):* Simplified the complex `sed`/`grep` logic for parsing JSONL results into a simple `curl` -> `jq` pipeline. Also simplified the CLI example. * *Meaning:* The docs are moving away from "production-ready, complex bash scripts" towards "simple, illustrative snippets using `jq`", relying on the reader to understand the logic or use SDKs. This makes the examples much more readable and maintainable. 6. **Synthesize Analysis:** * *Overall Summary:* The changes focus on refining a model allowlist logic setting and significantly modernizing code examples by replacing fragile shell string parsing with robust JSON processing (`jq`). * *Key Themes:* * **Code Example Modernization:** Shift from fragile `sed`/`grep` parsing in shell scripts to robust `jq` usage across `extended-thinking`, `streaming`, and `batch-processing` pages. * **Simplification:** Complex logic (polling loops, pagination handling) in `batch-processing` examples was stripped down to focus on the core API interaction, moving implementation details (like loops) to the reader or SDKs. * **Logic Refinement:** `enforceAvailableModels` behavior update to preserve user defaults if they are compliant. * *Impact Level:* * **Medium** (Behavioral change) / **Low** (Documentation cleanup). * *Reasoning:* The `enforceAvailableModels` change affects actual software behavior (likely a bug fix or feature tweak), so developers using that setting need to be aware. The code examples are just documentation improvements, but they represent a significant drop in complexity for readers. * *Decision:* **Medium** (due to the setting change). If strictly doc changes, it's Low. But setting changes usually imply software changes. The prompt asks to analyze *documentation changes*, but one of them describes a logic change. I will categorize it as **Medium** because of the logic change in `settings.md`, but note the documentation improvements are Low. * *Action Items:* * Review `enforceAvailableModels` configuration if you rely on "Default" model behavior (it might not swap anymore if your default is already allowed). * Update internal shell scripts using `grep`/`sed` to parse API responses; consider adopting `jq` for better reliability. * Review batch processing scripts if they copy-pasted the old logic; the new examples are much simpler but less "turnkey" for loops. 7. **Drafting the Response (in Chinese):** * *Summary:* 本次更新优化了 `enforceAvailableModels` 的默认模型选择逻辑,并大幅简化了代码示例,将 Shell 脚本中脆弱的文本解析替换为更健壮的 `jq` JSON 处理。 * *Themes:* * 代码示例现代化:全面引入 `jq` 工具替代 `sed`、`grep` 等命令行字符串处理,提升示例代码的可读性和鲁棒性。 * 文档简化:移除了 `batch-processing` 中复杂的轮询和分页逻辑示例,聚焦于 API 核心调用,建议开发者使用 SDK 处理复杂流程。 * 配置逻辑修正:微调了 `enforceAvailableModels` 设置的行为,现在会优先保留已包含在白名单中的默认模型。 * *Impact:* **Medium** (中) * *Reasoning:* `settings.md` 中的逻辑变更直接影响工具行为,可能改变现有的模型降级策略。代码示例的变更虽然仅为文档层面,但显著降低了脚本的维护复杂度。 * *Action Items:* * 检查依赖 `enforceAvailableModels` 设置的项目,确认新的默认模型保留策略符合预期。 * 参考新版文档重构现有的 Shell API 脚本,采用 `jq` 处理 JSON 响应,避免因字段顺序变化导致的解析错误。 * 如果使用了文档中的批处理或流式处理脚本模版,需根据新示例更新,旧版复杂的循环逻辑已不再推荐。 8. **Refinement:** Ensure tone is professional and concise. * *Refining the `settings.md` explanation:* It changes "Default option falls back to the first allowlisted entry" to "falls back... only when the default model... is not in the allowlist". This is a crucial nuance. * *Refining the code examples:* It's about "Robustness" (using `jq`) and "Clarity" (removing boilerplate). 9. **Final Output Generation:** (Translating thoughts to the final markdown output). * *Summary:* 本次更新主要包含两方面的改进:一是优化了 `enforceAvailableModels` 的配置逻辑,二是全面重构了 Shell 脚本示例,使用 `jq` 替代脆弱的正则表达式和字符串截取。 * *Themes:* * **脚本健壮性提升**:在 `extended-thinking`、`streaming` 和 `batch-processing` 页面中,移除了依赖 `sed`、`grep` 和字符串截取(`${var#*...}`)的旧式 Shell 代码,改用 `jq` 进行标准 JSON 解析。 * **示例代码简化**:`batch-processing` 中的示例去掉了复杂的轮询、分页循环和 JSONL 解析逻辑,专注于展示单次 API 调用,将实现复杂流程的责任移交给了 SDK 或开发者自行处理。 * **模型选择逻辑微调**:`enforceAvailableModels` 现在更加智能,若用户账户类型的默认模型已在白名单中,则不再强制降级到列表中的第一个模型。 * *Impact:* **Medium (中)** * *Reasoning:* `settings.md` 的变更涉及软件的实际运行逻辑(模型降级策略),对受管设置下的用户有直接影响。代码示例的重构虽然不影响现有程序,但大幅提升了文档质量,并指明了更好的脚本编写实践。 * *Action Items:* * **审查模型配置**:如果您的组织使用了 `enforceAvailableModels`,请测试新的默认模型保留逻辑,确保符合预期的模型降级行为。 * **升级脚本工具**:如果现有脚本或 CI 流程中直接复制了文档中的旧版 Shell 代码,建议引入 `jq` 工具并参考新文档重构解析逻辑,以提高容错率。 * **关注批处理示例**:若依赖文档中的 `batch-processing` 示例进行自动轮询,请注意新版文档仅展示状态检查逻辑,不再提供完整的 `until` 循环模版。 10. **Final Polish:** Check against constraints. Chinese language? Yes. Markdown? Yes. Concise? Yes. * *Self-Correction during drafting:* Make sure to emphasize *why* the bash change matters (it was fragile). The `settings` change is a "fix" or "refinement" to avoid unnecessary model switching. * *Final check on `enforceAvailableModels`:* Old: Default falls back to first allowlisted entry. New: Default falls back *only if* default is NOT in allowlist. Yes, that is correct. Ready to output.

📚 Claude Code

16:54 EST

🤖 AI Batch Analysis

# 文档变更分析 ## 总体摘要 本次变更主要引入了 **Claude Sonnet 5** 的支持,并为其确立了在各大云平台上的 1M 上下文窗口默认行为。同时优化了 API 文档,新增了详细的分页规范说明。 ## 关键主题 - **新增 Claude Sonnet 5 支持**:在 Amazon Bedrock、Google Vertex AI、Microsoft Foundry 以及 Desktop 应用的 Auto 模式中均已支持 - **Sonnet 5 上下文行为特殊化**:该模型在 Bedrock/Vertex/Foundry 上**默认强制启用 1M 上下文窗口**,无需手动添加 `[1m]` 后缀 - **默认模型升级**:Google Vertex AI 和 Microsoft Foundry 的默认 Sonnet 模型已从 4.6 升级至 5 - **API 分页规范标准化**:新增 `page`/`next_page` 光标分页机制文档,统一列表端点的分页行为 - **文档链接修正**:Models API 链接路径已规范化调整 ## 影响等级:Medium - Sonnet 5 作为新模型引入是重要功能增强,但属于增量更新 - 1M 上下文的默认行为变更简化了配置,但开发者需注意与其他模型的差异化处理 - API 分页文档是补充性说明,不涉及破坏性变更 ## 开发者行动项 - 在 Bedrock/Vertex/Foundry 上使用 Sonnet 5 时,**无需**添加 `[1m]` 后缀,它会自动获得 1M 上下文 - 如需更新默认模型配置,将环境变量中的 `claude-sonnet-4-6` 替换为 `claude-sonnet-5` - 实现列表端点分页时,参考新增的 `page`/`next_page` 规范(注意部分端点仍使用 `after_id` 方案) - 若使用 SDK,可利用其内置的自动分页迭代器简化代码
💭 Model Reasoning
用户希望我分析一组文档变更并提供简洁的 markdown 格式分析。让我快速浏览一下这 7 个页面。 **Page: amazon-bedrock.md** - 添加了 Claude Sonnet 5 支持 1M 上下文窗口 - 说明 Sonnet 5 通过 Mantle endpoint 服务,总是运行 1M 窗口,无需 `[1m]` 变体 - 添加了 `anthropic.claude-sonnet-5` 作为 Mantle 模型 ID 示例 **Page: desktop.md** - Auto mode 现在在 Google Cloud Vertex AI 部署中也支持 Claude Sonnet 5 **Page: google-vertex-ai.md** - 将默认 Sonnet 模型从 `claude-sonnet-4-6` 更改为 `claude-sonnet-5` - 添加 Sonnet 5 支持 1M 上下文窗口,并说明总是运行 1M 窗口无需 `[1m]` 变体 **Page: microsoft-foundry.md** - 将默认 Sonnet 模型从 `claude-sonnet-4-6` 更改为 `claude-sonnet-5` **Page: model-config.md** - 添加说明:Sonnet 5 在 Bedrock、Vertex 和 Foundry 上总是运行 1M 窗口,无需后缀 **Page: api/overview.md** - 修正 Models API 链接从 `/api/models-list` 到 `/api/models/list` - 更新表格列宽(小改动) - 修改 "via" 为 "through"(措辞微调) - 添加了关于分页的新章节,详细说明 `page` 和 `next_page` 光标方案 - 部分列表端点使用不同的光标方案 **Page: api/rate-limits.md** - 删除了一段关于这些限制适用于 Standard 和 Priority Tier 的说明 我将整理这些变更的关键主题,包括 Sonnet 5 的支持、1M 上下文窗口的更新以及 API 分页机制的改进。这些变化主要围绕模型能力的提升和文档细节的调整。

📚 Anthropic API

14:53 EST

🤖 AI Batch Analysis

### 整体摘要 此次文档更新主要围绕 **Claude Sonnet 5 的正式发布与集成**,涵盖了从默认模型切换、API 参数破坏性变更(如采样参数弃用和新分词器)、到新工具(Web Search)和平台链接迁移的广泛调整。 ### 关键变更主题 * **Claude Sonnet 5 全面上线**:Sonnet 5 取代 4.6 成为 Anthropic API 及 Claude Code(部分计划)的默认模型。该模型原生支持 1M Token 上下文窗口和高分辨率视觉处理,但强制使用自适应推理,不再支持手动扩展思考和 Priority Tier。 * **破坏性 API 变更**: * **分词器升级**:Sonnet 5 使用新分词器,相同文本产生的 Token 数量增加约 30%,直接影响成本预算和上下文容量。 * **参数弃用**:Sonnet 5 拒绝 `temperature`、`top_p`、`top_k` 非默认值,以及手动的 `thinking` 配置(需返回 400 错误)。 * **新功能与工具增强**: * 引入 **Web Search** (`web_search_20260318`) 和 **Web Fetch** (`web_fetch_20260318`) 工具,支持域名过滤和缓存控制。 * 新增 `anthropic-user-profile-id` 请求头,用于代理场景下的用户归因。 * 新增 MCP Tunnels Beta 功能。 * **平台与定价调整**:文档链接从 `docs.claude.com` 迁移至 `platform.claude.com`。Sonnet 5 设有促销价格(至 2026 年 8 月),并拥有独立的速率限制额度。 ### 影响级别:高 / 破坏性 **理由**: 1. **默认行为改变**:API 和 Code 工具默认升级到 Sonnet 5,直接改变现有应用的模型行为。 2. **代码兼容性风险**:若代码中包含针对 Sonnet 的手动扩展思考配置或采样参数,在调用 Sonnet 5 时会报错。 3. **成本与容量不可测**:新分词器导致 Token 计数增加,可能导致现有预算超支或上下文溢出,需重新评估。 ### 开发者行动项 1. **升级模型引用**:将配置文件、代码和 CI/CD 流程中的 `claude-sonnet-4-6` 更新为 `claude-sonnet-5`,并确保 Claude Code 版本不低于 **v2.1.197**。 2. **移除弃用参数**:针对 Sonnet 5 移除 `temperature`、`top_p`、`top_k` 设置;移除手动 `thinking` 配置,改用 `output_config.effort` 控制自适应推理深度。 3. **重新评估 Token 预算**:考虑到新分词器使 Token 数增加约 30%,请重新计算请求成本并调整 `max_tokens` 设置以避免截断。 4. **集成新工具与 API**:考虑启用新的 Web Search/Web Fetch 工具以增强模型检索能力;如有代理需求,使用 `anthropic-user-profile-id` 请求头。 5. **检查速率限制**:注意 Sonnet 5 拥有独立的速率限制桶,与 Sonnet 4.x 不共享,且不支持 Priority Tier,需相应调整高并发场景的策略。
💭 Model Reasoning
1. **Understand the Goal**: The user wants a summary of documentation changes for Claude Code and the Anthropic API. The output must be in Chinese, concise, insightful, and in markdown format. 2. **Analyze the Input Data**: * **Total pages**: 39 (though only diffs for a subset are shown in the prompt, I must infer the scope based on the provided diffs). * **Page 1: `cli-reference.md`**: * Change: `--model` example updated from `claude-sonnet-4-6` to `claude-sonnet-5`. * **Page 2: `desktop.md`**: * Change: Auto mode availability. Previously "Opus 4.6 or later, or Sonnet 4.6", now "Opus 4.6 or later, or Sonnet 4.6 or later". * Change: Extended thinking settings. Added "Fable 5, Sonnet 5, and Opus 4.7 and later always use adaptive reasoning and have no fixed-budget mode." * **Page 3: `github-actions.md`**: * Change: `model` example updated from `claude-sonnet-4-6` to `claude-sonnet-5`. * Change: Added `wrap` to code block themes (`theme={null}` -> `theme={null} wrap`). * **Page 4: `hooks.md`**: * Change: Example JSON `model` field updated from `claude-sonnet-4-6` to `claude-sonnet-5`. * **Page 5: `model-config.md`**: * Change: Model aliases table. `sonnet` resolves to Sonnet 5 on Anthropic API (was 4.6). `sonnet[1m]` note updated regarding Sonnet 5's native 1M window. * Change: Note about version requirements: "Sonnet 5 requires Claude Code v2.1.197 or later." * Change: Defaults updated. Pro/Team/Enterprise subscriptions default to Sonnet 5 (was 4.6). * **Page 6: `monitoring-usage.md`**: * Change: Event attributes example `model` updated to `claude-sonnet-5`. * **Page 7: `settings.md`**: * Change: `fallbackModel` example updated to `claude-sonnet-5`. * **Page 8: `sub-agents.md`**: * Change: Example `model` ID updated to `claude-sonnet-5`. * Change: Code block themes updated (added `wrap`). * **Page 9: `intro.md`**: * Change: Intro text updated to mention Claude Sonnet 5 instead of 4.6. * **Page 10: `about-claude/models/overview.md`**: * Change: Comparison table updated for Sonnet 5 (ID `claude-sonnet-5`, pricing, context window 1M, knowledge cutoff Jan 2026). Extended thinking: "No" for Sonnet 5. * **Page 11: `about-claude/models/migration-guide.md`**: * Change: Added extensive migration guide from Sonnet 4.6 to Sonnet 5. * Key points: New tokenizer (+30% tokens), Adaptive thinking on by default, Manual extended thinking not supported, Sampling params (temp/top_p) deprecated and return 400 error. * **Page 12: `about-claude/pricing.md`**: * Change: Added Sonnet 5 pricing ($2/$10 intro price until Aug 2026, then $3/$15). * Change: Note about tokenizer usage for Opus 4.7+ and Sonnet 5. * **Page 13: `about-claude/model-deprecations.md`**: * Change: Table updated. `temperature`, `top_p`, `top_k` are deprecated on Sonnet 5 (return 400). * **Page 14: `api/messages.md`**: * Change: Links updated from `docs.claude.com` to `platform.claude.com`. * Change: Added header parameter `anthropic-user-profile-id`. * Change: Added tool definition updates (`strict`, `use_cache`, `WebSearchTool20260318`, `WebFetchTool20260318`). * **Page 15: `api/messages/count_tokens.md`**: * Change: Links updated. * Change: Added header parameter `anthropic-user-profile-id`. * Change: Tool definition updates similar to Page 14. * **Page 16: `api/messages/batches/create.md`**: * Change: Links updated. * Change: Added header parameter `anthropic-user-profile-id`. * Change: Tool definition updates. * **Page 17: `api/rate-limits.md`**: * Change: Added Claude Sonnet 5 to rate limit tables (same limits as Opus 4.x). Note that Sonnet 5 has a separate bucket from Sonnet 4.x. * **Page 18: `api/beta-headers.md`**: * Change: Added `mcp-tunnels-2026-06-22` for `/v1/tunnels`. * **Page 19: `api/service-tiers.md`**: * Change: Priority Tier is NOT supported on Claude Sonnet 5. * **Page 20: `build-with-claude/vision.md`**: * Change: Sonnet 5 added to High-resolution tier (2576px long edge). * **Page 21: `build-with-claude/extended-thinking.md`**: * Change: Table updated. Sonnet 5: Not supported (manual extended thinking), uses Adaptive thinking. * Change: Code examples formatted better. * **Page 22: `build-with-claude/prompt-caching.md`**: * Change: Added Sonnet 5 to pricing table. * **Page 23: `build-with-claude/batch-processing.md`**: * Change: Added Sonnet 5 to pricing table. * Change: Extended output beta header supports Sonnet 5. * **Page 24: `build-with-claude/context-windows.md`**: * Change: Sonnet 5 has 1M context window. * Change: Context awareness includes Sonnet 5. * **Page 25: `build-with-claude/search-results.md`**: * Change: Added Sonnet 5 to supported models list. 3. **Synthesize Findings**: * **Major Theme**: Introduction and integration of **Claude Sonnet 5**. * **Specifics**: * **Model Upgrade**: Default model changed from Sonnet 4.6 to Sonnet 5 for many plans. * **Breaking Changes (API)**: Sonnet 5 rejects manual `thinking` config (extended thinking) and sampling parameters (`temperature`, `top_p`, `top_k`). It uses adaptive thinking by default. * **Tokenization**: New tokenizer -> ~30% more tokens for same text. Impacts cost and context limits. * **Pricing**: Introductory pricing ($2/$10) until Aug 2026. * **Capabilities**: 1M context window (native), High-resolution vision support. No Priority Tier support. * **Documentation Updates**: URL changes (`docs.claude.com` -> `platform.claude.com`), addition of new headers (`anthropic-user-profile-id`), new tool definitions (`WebSearchTool20260318`). * **Beta Features**: MCP Tunnels. 4. **Drafting the Response (in Chinese)**: * **Summary**: Focus on the rollout of Sonnet 5 and API changes. * **Key Themes**: * Claude Sonnet 5 release (default upgrade). * Breaking API changes (thinking, sampling params, tokenizer). * New features (MCP Tunnels, Web Search tool, User Profile header). * Pricing and Rate Limits updates. * **Impact Level**: **High/Breaking**. Because of the breaking changes in parameters and the new tokenizer affecting token counts/costs. * **Action Items**: * Update model strings to `claude-sonnet-5`. * Remove manual `thinking` config for Sonnet 5; use `effort`. * Remove `temperature`, `top_p`, `top_k` for Sonnet 5. * Review token budgets due to new tokenizer. * Update Claude Code to v2.1.197+. 5. **Refining the Output**: * *Summary*: 文档主要更新围绕 **Claude Sonnet 5 的发布与集成**,涵盖从默认模型变更、API 行为破坏性更新(如参数弃用和分词器变更)到新功能(MCP Tunnels、新 Web Search 工具)的广泛调整。 * *Themes*: * **Sonnet 5 全面上线**:作为新版默认模型,引入 1M 上下文窗口、高分辨率视觉支持,但移除了手动扩展思考和采样参数支持。 * **破坏性 API 变更**:Sonnet 5 使用新的分词器(Token 数增加约 30%),强制使用自适应推理,且不再接受 `temperature`、`top_p`、`top_k` 非默认值。 * **新功能与工具增强**:新增 Web Search (`WebSearchTool20260318`) 和 Web Fetch 工具,引入 `anthropic-user-profile-id` 请求头及 MCP Tunnels Beta 支持。 * **价格与速率限制调整**:Sonnet 5 设有促销价格(2026 年 8 月前),拥有独立的速率限制额度,且不支持 Priority Tier。 * *Impact*: **Breaking / High**. Reason: API 参数弃用、分词器变更导致 Token 计数和成本预估失效,以及默认模型切换。 * *Action Items*: 1. **更新模型版本**:将代码中的 `claude-sonnet-4-6` 替换为 `claude-sonnet-5`,并升级 Claude Code 至 v2.1.197+。 2. **移除弃用参数**:针对 Sonnet 5,移除 `temperature`、`top_p`、`top_k` 参数及手动 `thinking` 配置,改用 `effort` 控制自适应推理。 3. **调整 Token 预算**:鉴于新分词器会使 Token 数增加约 30%,需重新评估成本预算和上下文窗口限制。 4. **更新 API 调用**:集成新的 `WebSearchTool20260318` 和 `WebFetchTool20260318`,并考虑使用 `anthropic-user-profile-id` 请求头。 5. **关注文档链接**:将过时的 `docs.claude.com` 链接更新为 `platform.claude.com`。 6. **Final Polish**: Ensure markdown formatting is clean and tone is professional. The translation looks accurate. *Self-Correction during drafting*: Make sure to mention that Sonnet 5 doesn't support Priority Tier, as that affects high-volume/low-latency users. Also, note the specific date for pricing changes. 7. **Final Output Generation**. (Matches the plan above).

📚 Claude Code

📚 Claude Code GitHub

12:21 EST

🤖 AI Batch Analysis

### 1. Overall Summary 此次更新的核心内容是正式推出了 **Claude Desktop for Linux (Beta)**,并调整了相关文档以反映 Linux 平台的安装方式、功能限制及更新机制。 ### 2. Key Themes across pages * **新增 Linux 平台支持**: 文档新增了针对 Ubuntu 和 Debian 的安装卡片(通过 `apt` 或 `.deb`),并在下载引导中加入了 Linux 选项。 * **功能差异说明**: 明确指出了 Linux Beta 版本目前暂不支持 "Computer Use" 功能,并修正了此前关于“桌面端仅支持 macOS/Windows”的描述。 * **更新机制变更**: 针对 Linux 平台,应用更新需通过 `apt` 手动执行,而非像 macOS 和 Windows 那样在启动时自动更新。 ### 3. Impact level **Medium** (中等) * **理由**: 这是一个重要的新功能发布(Linux 桌面端支持),极大地扩展了可用性。但由于处于 Beta 阶段且存在特定功能限制,对现有工作流没有破坏性影响。 ### 4. Action items for developers * **尝试新平台**: Linux 开发者(特别是 Ubuntu/Debian 用户)可以按照文档指引安装 Desktop 应用进行测试。 * **注意功能限制**: 如果你的工作流依赖 "Computer Use" 功能,请注意 Linux 桌面端暂不支持,可能仍需结合 CLI 使用。 * **更新部署策略**: 如果在团队中管理 Linux 环境,需配置 `apt` 源以获取应用更新,而不是依赖应用内的自动更新机制。
💭 Model Reasoning
1. **Analyze the Request:** * **Role:** World-class programmer analyzing documentation changes. * **Input:** A diff of two pages (`desktop.md` and `setup.md`). * **Output Format:** Markdown, specific sections (Overall Summary, Key Themes, Impact level, Action items). * **Language:** Chinese. * **Focus:** Concise, insightful, what matters to developers. 2. **Analyze the Diffs:** * **Page 1: `desktop.md`** * *Change 1:* Card group layout changed from `cols={2}` to `cols={3}`. * *Change 2:* Added a new card for "Get Claude for Linux (beta)" pointing to `/en/desktop-linux`. * *Change 3:* Updated text regarding Windows ARM64 installation (mostly kept same, but updated the context about Linux). * *Change 4:* Replaced text "The desktop app is not available on Linux; use the [CLI] instead." with "On Linux, install with apt; see [Claude Desktop on Linux]." * *Change 5:* In the "Features only available in CLI" section, updated "* **Linux**: the desktop app is available on macOS and Windows only..." to "* **Linux (beta)**: Computer Use isn't yet available in the Linux desktop app." * *Change 6:* In troubleshooting, updated auto-update instructions to specify macOS/Windows behavior vs. Linux behavior (`apt`). * **Page 2: `setup.md`** * *Change 1:* In a "Tip" box, added `[Linux](https://claude.com/download?...)` to the list of download options for the Desktop app. 3. **Synthesize the Narrative:** * **Main Story:** Claude Desktop now supports Linux (Beta). * **Details:** It's installable via `apt` or `.deb` (Debian/Ubuntu). * **Caveat:** "Computer Use" (a specific feature) is *not* yet available on Linux Desktop. * **Maintenance:** Updates are handled via `apt` on Linux, unlike the auto-update mechanism on Mac/Windows. 4. **Draft the Response (in Chinese):** * **Overall Summary:** The core change is the official introduction of Claude Desktop for Linux (Beta), replacing the previous requirement to use the CLI on that platform. * **Key Themes:** * Linux Support: Added installation options (apt/.deb). * Feature Parity: Mostly supported, but with a specific limitation (Computer Use). * Maintenance: Different update mechanism (apt) compared to auto-updates on other OSs. * **Impact Level:** Medium. It's a new platform support (big news), but it's Beta and has limitations (non-breaking). * **Action Items:** * Linux users can now try the Desktop app instead of just CLI. * Developers relying on "Computer Use" should stick to Mac/Windows for now. * Update documentation or internal knowledge bases regarding Linux support status. 5. **Refine the Output (Iterative translation and polishing):** * *Summary:* 此次更新的核心内容是正式推出了 **Claude Desktop for Linux (Beta)**,此前仅支持 CLI 的限制已被解除。 * *Themes:* * **Linux 平台支持**: 新增 Linux 版本(支持 Ubuntu/Debian,提供 apt 或 .deb 安装方式)。 * **功能差异说明**: 明确指出了 Linux 版本的限制(目前不支持 "Computer Use" 功能)。 * **维护机制**: 更新了 Linux 平台的更新方式,即使用 `apt` 而非自动更新。 * *Impact:* **Medium**。虽然增加了新平台支持,但标记为 Beta 且存在功能限制,对现有用户工作流无破坏性影响。 * *Action Items:* * Linux 开发者现在可以下载并测试 Desktop 应用。 * 依赖 "Computer Use" 的 Linux 用户应继续使用 CLI 或等待后续更新。 * 更新团队内部的文档或教程,移除“Linux 不支持 Desktop”的过时描述。 6. **Final Review against Constraints:** * Markdown format? Yes. * Chinese language? Yes. * Concise? Yes. * Developer-focused? Yes. 7. **Final Output Generation** (Proceed to generate the markdown block).

📚 Claude Code

03:55 EST

🤖 AI Batch Analysis

# 文档变更分析摘要 ### 1. 总体摘要 本次文档更新涵盖了 Claude Code v2.1.193 至 v2.1.196 版本的变更。重点强化了安全性与信任模型(特别是对 MCP 服务器和插件加载的限制),新增了 OpenTelemetry 可观测性功能(支持记录 AI 回复),并修复了多项配置逻辑问题,包括 Subagent 模型继承、插件名称解析及 Hooks 匹配器行为。 ### 2. 关键主题 * **安全与信任机制强化** * **MCP 服务器**:项目本地 `.mcp.json` 中的服务器在未受信任的工作区中不再自动加载,必须经过审批。 * **OAuth Scope**:`oauth.scopes` 未设置时,不再请求授权服务器的完整 scope 目录,改为仅请求必要 scope,以避免 `invalid_scope` 错误。 * **插件安装**:增强了对外部插件(如 GitHub 仓库)的安装控制,确保仅在信任后加载。 * **插件与市场生态** * **重命名支持**:`marketplace.json` 新增 `renames` 字段,允许插件重命名或移除时的平滑迁移(v2.1.193+)。 * **名称解析**:明确了 `marketplace.json` 中的名称与 `plugin.json` 名称不一致时的处理逻辑,CLI 现在能正确识别和启用此类插件。 * **可观测性增强** * **新日志事件**:新增 `assistant_response` 事件及 `OTEL_LOG_ASSISTANT_RESPONSES` 环境变量,允许开发者记录 Claude 的文本回复内容(v2.1.193+)。 * **配置与行为修正** * **Subagent 模型**:修复了 `CLAUDE_CODE_SUBAGENT_MODEL=inherit` 的行为,现在它会正确遵循调用参数和前置设置,而非强制继承主会话模型。 * **Hooks 匹配器**:精确匹配模式现在支持连字符(`-`),不再将其误判为正则表达式;改进了正则匹配的锚定说明。 * **Shell 模式**:支持文件路径实时自动补全(v2.1.193+)。 ### 3. 影响级别 **中** * **理由**:虽然大部分是新增功能和文档澄清,但 MCP 服务器的信任加载机制变更、OAuth Scope 请求行为的收紧以及插件名称解析逻辑的修正,可能会导致现有配置(特别是在 CI/CD 或受限环境中)的行为发生改变,需要开发者注意适配。 ### 4. 开发者行动项 * **审查 MCP 服务器配置**:如果您依赖项目本地的 `.mcp.json` 自动连接服务器,请确保在新的信任模型下手动完成审批流程,或将其移至受信任的设置文件中。 * **更新插件市场清单**:如果您维护插件市场并计划重命名插件,请务必在 `marketplace.json` 中添加 `renames` 字段以防止用户安装失败。 * **检查模型环境变量**:若您使用了 `CLAUDE_CODE_SUBAGENT_MODEL=inherit`,请验证其行为是否符合预期(v2.1.196 修复了其逻辑)。 * **利用新遥测功能**:如需监控 AI 回复内容,请配置 `OTEL_LOG_ASSISTANT_RESPONSES=1`。 * **更新 Hook 规则**:检查您的 Hook 匹配器,特别是包含连字符的名称(如 `code-reviewer`),确保其在 v2.1.195+ 版本中按精确字符串匹配而非正则表达式工作。
💭 Model Reasoning
1. **Understand the Goal:** The user wants a concise, insightful analysis of documentation changes for Claude Code. I need to analyze 16 changed pages, provide an overall summary, identify key themes, assess the impact level, and list action items for developers, all in Chinese. 2. **Analyze the Source Data (Diff by Diff):** * **Page: `amazon-bedrock.md` (+3 / -0)** * *Change:* Added a note about zero token counts in `/context` on versions before v2.1.196 due to Bedrock's API rejecting schema fields. Fixed in v2.1.196. * *Theme:* Bug fix documentation for Bedrock integration. * **Page: `claude-code-on-the-web.md` (+2 / -0)** * *Change:* Added `browser-intake-us5-datadoghq.com` to allowlist. Added note about v2.1.195 showing live checklist during cloud session setup. * *Theme:* Networking allowlists, Cloud UX improvements. * **Page: `discover-plugins.md` (+7 / -2)** * *Change:* Require `https://` prefix for adding Git-based marketplaces (v2.1.196). Clarified install behavior (interactive vs CLI). Fixed plugin enable/disable behavior when names differ between `marketplace.json` and `plugin.json` (v2.1.195). * *Theme:* Plugin management UX, Syntax requirements, Name resolution. * **Page: `hooks.md` (+29 / -20)** * *Change:* Updated matcher table. Added support for hyphens `-` in exact match (v2.1.195). Clarified regex behavior (unanchored). Fixed documentation for `SubagentStart` event regarding plugin-scoped names. * *Theme:* Hooks system refinement, Matcher logic changes (hyphen support). * **Page: `interactive-mode.md` (+3 / -1)** * *Change:* Background tasks terminated on memory pressure (v2.1.193). Shell mode live file path autocomplete (v2.1.193). * *Theme:* Resource management, Shell UX enhancements. * **Page: `jetbrains.md` (+1 / -1)** * *Change:* Updated security note wording to link to specific permission mode documentation. * *Theme:* Documentation consistency/linking. * **Page: `mcp.md` (+20 / -5)** * *Change:* Trust requirements for `.mcp.json` approvals (v2.1.196). OAuth token refresh failure notices (v2.1.195). Startup notices for auth (v2.1.193). Non-interactive auth handling (v2.1.196). OAuth scope request behavior change (v2.1.196 - no longer requests full catalog if `oauth.scopes` unset). `headersHelper` retry on 401/403 (v2.1.193). Plugin `headersHelper` working directory fix (v2.1.195). * *Theme:* MCP security/trust model, Authentication flows, OAuth scopes. * **Page: `model-config.md` (+4 / -3)** * *Change:* `ANTHROPIC_DEFAULT_OPUS_MODEL` precedence fix (v2.1.195). "Runtime default" terminology update. * *Theme:* Model selection logic/precedence. * **Page: `monitoring-usage.md` (+9 / -0)** * *Change:* New env var `OTEL_LOG_ASSISTANT_RESPONSES` (v2.1.193). New `assistant_response` event schema. * *Theme:* Observability/Telemetry new features. * **Page: `plugin-marketplaces.md` (+35 / -12)** * *Change:* Added `renames` field for marketplace manifest to handle plugin renaming/removal (v2.1.193). Removed `disable-model-invocation` from example. Added `disableSideloadFlags` mention. * *Theme:* Plugin lifecycle management (renaming). * **Page: `plugins-reference.md` (+3 / -3)** * *Change:* Clarified that `name` in `plugin.json` might differ from `marketplace.json`, and the marketplace name is used for references. * *Theme:* Plugin identification/naming. * **Page: `settings.md` (+12 / -8)** * *Change:* Added `autoMode.classifyAllShell` setting (v2.1.193). * *Theme:* Auto-mode configuration enhancements. * **Page: `skills.md` (+14 / -11)** * *Change:* Updated string substitution table (truncated in prompt, but likely similar to slash-commands). Added `${CLAUDE_SKILL_DIR}`. * *Theme:* Skills functionality. * **Page: `slash-commands.md` (+14 / -11)** * *Change:* Updated `disable-model-invocation` for scheduled tasks (v2.1.196). Updated string substitution table (added `${CLAUDE_SKILL_DIR}`). * *Theme:* Skills/Commands behavior, Scheduling. * **Page: `statusline.md` (+39 / -36)** * *Change:* Massive reformatting of the JSON fields table. Added `context_window.current_usage`. Removed `git_worktree` entry (seems to have moved or been clarified). * *Theme:* Documentation formatting, Statusline data schema. * **Page: `sub-agents.md` (+9 / -4)** * *Change:* `/doctor` reports duplicate agent names (v2.1.196). `CLAUDE_CODE_SUBAGENT_MODEL=inherit` behavior change (v2.1.196). Improved visual tree in subagent panel (v2.1.193). * *Theme:* Subagent debugging, Model inheritance. 3. **Synthesize and Structure the Analysis:** * **Overall Summary:** These changes represent a significant release wave (versions 2.1.193 through 2.1.196), focusing on bug fixes, security hardening (trust models for MCP/plugins), UX enhancements (shell autocomplete, cloud setup), and observability features (OTel). * **Key Themes:** * **Security & Trust Model:** Significant updates to how MCP servers and plugins are approved/loaded in untrusted repositories. OAuth scope handling is tightened. * **Plugin & Marketplace Evolution:** Better handling of plugin names, renaming support via `renames` field, and syntax requirements (https prefix). * **Observability & Telemetry:** New `assistant_response` event and environment variables for logging. * **Subagent & Model Configuration:** Fixes to model inheritance logic and duplicate agent detection. * **UX Polish:** Shell autocomplete, background task handling, cloud session setup checklists. * **Impact Level:** * *Reasoning:* There are several behavior changes regarding model inheritance, OAuth scope requests (potential breaking for some auth flows), and strict trust requirements for project-local MCP servers. The renaming of plugins requires marketplace updates. Therefore, **Medium-High** is appropriate, leaning towards Medium because many are "defaults" or "fixes" but the MCP trust change is significant. * **Action Items:** * Update plugin marketplaces if you want to rename plugins (use `renames`). * Check MCP server configurations; project-specific servers now require explicit trust/interaction to load. * Review `OTEL_LOG_ASSISTANT_RESPONSES` if you need response text in logs. * Verify shell command matchers in hooks if using hyphens. * Update `CLAUDE_CODE_SUBAGENT_MODEL` usage if relying on specific behavior of `inherit`. 4. **Drafting the Response (in Chinese):** * *Summary:* 本次文档更新涵盖了 Claude Code v2.1.193 至 v2.1.196 版本的变更。重点增强了安全性与信任模型(特别是 MCP 和插件系统),新增了 OpenTelemetry 可观测性功能,并修复了模型继承、钩子匹配及插件命名逻辑。 * *Themes:* * **安全与信任机制强化**:项目级别的 MCP 服务器和插件现在对未受信任的仓库有更严格的加载限制。 * **插件与市场生态**:引入了插件重命名机制,并修正了插件名称解析逻辑。 * **可观测性增强**:新增 `assistant_response` 事件及环境变量,支持记录 AI 回复内容。 * **配置与行为修正**:修复了 Subagent 模型继承、Hooks 匹配器(支持连字符)以及 OAuth Scope 请求行为。 * **用户体验优化**:包括 Shell 自动补全、云会话设置清单及后台任务内存管理。 * *Impact:* **中**。虽然主要是新功能和修复,但 MCP 服务器的信任加载机制变更、OAuth Scope 请求行为的变化以及插件名称解析逻辑的调整,可能影响现有配置的预期行为。 * *Action Items:* * **插件维护者**:若需重命名插件,请在 `marketplace.json` 中添加 `renames` 字段以支持自动迁移。 * **MCP 配置审查**:注意项目本地的 `.mcp.json` 服务器在未受信任的工作区中现在需要手动审批才能加载。 * **模型配置检查**:检查 `CLAUDE_CODE_SUBAGENT_MODEL` 环境变量的使用,特别是 `inherit` 值的行为变更。 * **监控与日志**:利用新增的 `OTEL_LOG_ASSISTANT_RESPONSES` 环境变量来丰富遥测数据。 * **Hook 规则更新**:如果您在 Hooks 中使用了带连字符的匹配器(如 `code-reviewer`),请确认其在当前版本下的精确匹配行为。 5. **Final Review against constraints:** * Markdown format? Yes. * Concise? Yes. * Chinese? Yes. * Focus on developer impact? Yes. 6. **Final Output Generation.** (Proceed to generate markdown).