# 文档变更分析摘要
### 1. 总体概览
本次更新主要增强了**AWS Bedrock 集成**的配置灵活性,优化了**日志与遥测**系统的数据结构,并改进了**开发者工作流**(特别是 PR/MR 会话恢复及 Windows 兼容性)。修复了特定环境变量下的 OAuth 认证 Bug。
### 2. 核心主题
* **AWS Bedrock 服务分级**: 新增 `ANTHROPIC_BEDROCK_SERVICE_TIER` 环境变量,允许在 `default`、`flex` 和 `priority` 之间权衡成本与延迟。
* **可观测性增强**:
* 修正了日志中 `status_code` 的数据类型(由字符串改为数值型),并明确了非 HTTP 错误时的行为。
* 新增 `at_mention` 事件 (`claude_code.at_mention`),用于追踪 `@` 提及(文件、目录、Agent 等)的解析情况。
* **工作流优化**:
* `/resume` 会话选择器现在支持直接粘贴 GitHub/GitLab/Bitbucket 的 PR 或 MR URL 来快速定位关联会话。
* 明确了 Claude Code 本地 MCP 服务器优先于 claude.ai 连接器的规则,并在 `/mcp` 中标记隐藏的重复项。
* **平台兼容性**: 阐明了 Windows 下状态行的 Shell 执行逻辑:优先使用 Git Bash,未安装时回退到 PowerShell。
### 3. 影响等级
**Medium** (中)
**理由**:
* **非破坏性**: 大多数更改为新功能或文档澄清。
* **潜在适配需求**: `monitoring-usage.md` 中 `status_code` 的类型变更(字符串 -> 数值)可能破坏现有的日志解析脚本,运维或监控开发者需注意。
* **功能价值**: 对 AWS Bedrock 用户和重度依赖会话历史的开发者有显著帮助。
### 4. 开发者行动项
* **AWS 用户**: 如果使用 Bedrock,评估是否需要设置 `ANTHROPIC_BEDROCK_SERVICE_TIER` (如 `priority`) 以优化延迟。
* **运维/监控人员**: 检查日志解析管道,更新 `status_code` 字段的解析逻辑(预期为数值而非字符串),并适配新的 `at_mention` 事件。
* **Windows 用户**: 若状态行配置异常,请确认是调用 Git Bash 还是 PowerShell 脚本,并参考文档中的修正示例。
* **MCP 用户**: 如果同时在 Claude Code 和 claude.ai 配置了相同的 MCP 服务器,检查 `/mcp` 列表以确认哪个处于激活状态。
* **尝试新工作流**: 在创建 PR 后,尝试将 PR URL 粘贴到 `/resume` 搜索框中以快速恢复上下文。
💭 Model Reasoning
1. **Analyze the Request:**
* **Role:** World-class programmer, expert in developer tools/docs.
* **Task:** Analyze documentation changes (6 pages) in a single batch.
* **Output Format:** Markdown, Chinese language, concise, insightful, developer-focused.
* **Specific Sections:** Overall Summary, Key Themes, Impact Level, Action Items.
2. **Analyze the Changes (Page by Page):**
* **`amazon-bedrock.md` (+4/-0):**
* *Change:* Added "Service tiers" section explaining `ANTHROPIC_BEDROCK_SERVICE_TIER` env var (`default`, `flex`, `priority`). Mentions sending `X-Amzn-Bedrock-Service-Tier` header.
* *Developer Impact:* Allows fine-tuning cost vs. latency on AWS Bedrock.
* **`common-workflows.md` (+13/-13):**
* *Change 1:* Updated text about linking sessions to PRs. Now mentions pasting PR URLs into `/resume` picker.
* *Change 2:* Updated the keyboard shortcuts table for the session picker. Added detail that pasting a PR/MR URL in search finds the associated session.
* *Developer Impact:* Improved workflow for resuming sessions associated with PRs/MRs across different platforms (GitHub, GitLab, etc.).
* **`mcp.md` (+1/-0):**
* *Change:* Clarified precedence: Claude Code local servers take precedence over claude.ai connectors pointing to the same URL. `/mcp` command shows duplicates as hidden.
* *Developer Impact:* Resolves potential confusion about which MCP server is being used when there are duplicates.
* **`monitoring-usage.md` (+8/-2):**
* *Change 1:* Changed `status_code` data type from "string" or "undefined" to "number" or "absent".
* *Change 2:* Added new event: `at_mention` event (`claude_code.at_mention`) to track mention resolution (file, directory, agent, mcp_resource).
* *Developer Impact:* Better structured telemetry/logs (types fixed) and new visibility into how `@` mentions are resolved.
* **`statusline.md` (+2/-2):**
* *Change:* Clarified Windows shell execution. Uses Git Bash if installed, otherwise PowerShell. Explicit instructions on invoking PowerShell scripts.
* *Developer Impact:* Fixes ambiguity for Windows users configuring the statusline, especially those without Git Bash.
* **`CHANGELOG.md.md` (+2/-0):**
* *Change:* Version 2.1.123. Fixed OAuth authentication 401 retry loop when `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1` is set.
* *Developer Impact:* Bug fix for specific environment variable usage.
3. **Synthesize and Structure the Output:**
* **Overall Summary:** Need to capture the essence. It's a mix of feature additions (Bedrock tiers, mention telemetry), usability improvements (PR resumption, Windows statusline), and bug fixes/clarifications (MCP precedence, OAuth). It's a "quality of life" and "observability" update.
* **Key Themes:**
* *Observability & Telemetry:* New `at_mention` event, fixed `status_code` type.
* *Cloud Integration:* AWS Bedrock service tiers for cost/latency control.
* *Workflow Efficiency:* Better PR/MR linking in session picker.
* *Platform Compatibility:* Clarified Windows shell behavior.
* *Configuration clarity:* MCP server precedence rules.
* **Impact Level:**
* *High?* No.
* *Medium?* Maybe, for AWS Bedrock users or heavy telemetry users.
* *Low?* Mostly clarifications and small features.
* *Decision:* **Low to Medium**. It's not breaking, but Bedrock users will care, and telemetry users need to update their parsers (type change).
* **Action Items:**
* *For Bedrock Users:* Check the new `ANTHROPIC_BEDROCK_SERVICE_TIER` variable.
* *For Windows Users:* Review statusline config if it was acting up.
* *For Telemetry Users:* Update log parsers for `status_code` (string -> number) and handle the new `at_mention` event.
* *For General Users:* Try pasting PR URLs in the `/resume` picker.
4. **Drafting the Content (in Chinese):**
* *Summary:* 本次更新主要集中在提升**云服务集成能力**(AWS Bedrock 服务分级)、增强**可观测性**(新增 Mention 事件及日志类型修正)、并优化了**开发者工作流**(PR 会话恢复、Windows 兼容性)。
* *Themes:*
* **AWS Bedrock 增强**: 引入服务分层配置,平衡成本与延迟。
* **可观测性细化**: `status_code` 类型修正,新增 `at_mention` 事件追踪。
* **工作流优化**: 支持通过 PR URL 直接恢复会话,优化 MCP 服务器优先级说明。
* **平台兼容性**: 明确 Windows 状态行执行的 Shell 行为。
* *Impact:* **Medium**. 主要是增强性更新,但日志结构变更可能需要监控系统适配。
* *Action Items:*
* (Bedrock) 配置服务层级。
* (Monitoring) 更新日志解析器适配 `status_code`。
* (Workflow) 尝试新的 PR 恢复功能。
* (Windows) 检查状态行配置。
* (MCP) 注意本地服务器优先级规则。
5. **Refining the Output:** Ensure the tone is professional and "world-class programmer". Use concise bullet points. (Self-correction: The `status_code` change is string to number, that's a breaking change for log parsers, so impact is definitely Medium for ops/devs relying on logs).
6. **Final Polish (Markdown):** Proceed to generate response based on the drafted points.