🤖 AI Batch Analysis
## 文档变更分析
### 1. 总体概要
本次变更以 **Claude Code v2.6.0 发布**及**全语言 SDK 小版本升级**为主线,同时对 Bedrock 服务层级、bare 模式 hooks、Desktop 登录生命周期、配置错误处理等多个行为细节做了重要澄清与修正。
### 2. 关键主题
- **SDK 全线升级**:Python 2.4→2.5、TypeScript 1.4→1.5、C# 13.4→13.5、Go 2.5→2.6、Java 3.4→3.5、PHP 1.4→1.5、Ruby 2.4→2.5、ant CLI 2.5→2.6
- **Bedrock Service Tier 行为边界明确化**:`ANTHROPIC_BEDROCK_SERVICE_TIER` 仅作用于 Invoke API 请求,不影响 model access check、Mantle 端点及 Claude apps gateway;后台会话需在 `env` 块中设置
- **Bare 模式 hooks 限制**:明确声明 hooks 在 bare 模式下不运行(包括 `--settings` 传入和插件 manifest 中的 hooks)
- **配置错误处理变更**:`claude -p` 遇到 `~/.claude.json` 解析失败时现在**直接退出且不修改文件**,而非静默跳过继续执行;空文件启动时使用默认设置
- **Desktop 登录生命周期**:任务续签现在要求 Desktop 处于"已登录"状态;新增登录页面检测和 Enterprise 计划强制登出场景说明
- **权限模式优先级澄清**:按文件夹记住的模式仅覆盖项目级 `.claude/` 中的 `defaultMode`,用户全局和托管设置仍可能生效
- **Java 示例代码简化**:流式响应遍历从 iterator 模式改为增强 for-each 循环
### 3. 影响级别:**Medium**
- SDK 升级为小版本,通常向后兼容,但开发者应验证
- `claude -p` 配置错误行为从"跳过继续"变为"退出",**可能影响 CI/CD 流水线**——此前被静默忽略的错误现在会导致非零退出码
- Bare 模式 hooks 不运行的明确声明,可能影响依赖 hooks 的自动化场景
### 4. 开发者行动项
- **升级 SDK**:将项目中的 Anthropic SDK 更新至最新小版本,关注 changelog 中的 breaking changes
- **检查 CI 流水线**:`claude -p` 现在在配置解析失败时退出而非跳过——确认流水线对非零退出码的处理是否符合预期
- **审查 bare 模式使用**:若在 bare 模式下依赖 hooks(`--settings` 或插件),需改用非 bare 模式或寻找替代方案
- **Bedrock 用户更新环境变量配置**:若使用 `ANTHROPIC_BEDROCK_SERVICE_TIER`,确保在 `env` 块而非仅 shell export 中设置以覆盖后台会话;Mantle 启用需同时设置 AWS region
- **Desktop 长时任务用户**:确保 Desktop 保持登录状态,注意 Enterprise 计划可能强制登出导致任务中断
💭 Model Reasoning
Let me analyze all the documentation changes across these 12 pages.
1. **amazon-bedrock.md**: Clarification on `ANTHROPIC_BEDROCK_SERVICE_TIER` - it only applies to Invoke API requests, not model access checks, Mantle endpoint, or Claude apps gateway. Added info about background sessions needing `env` block settings. Mantle endpoint now requires AWS region. Removed statement about not supporting Converse API. Clarified Mantle model lineup behavior.
2. **desktop.md**: Permission mode default behavior clarified - per-folder mode outranks `defaultMode` in project's `.claude/` settings, but `defaultMode` from `~/.claude/settings.json` or managed settings can still apply. Desktop sign-in renewal now requires "signed in" state. Added sign-in page as a recovery check item, with Enterprise plan sign-out behavior explanation.
3. **headless.md**: Added note that hooks don't run in bare mode even when passed via `--settings` or plugin hooks. This is a behavioral clarification/limitation.
4. **settings.md**: Configuration error handling changed - `claude -p` run now exits and leaves file unchanged (instead of silently continuing). Added link to restore earlier copy. Blank file now starts with default settings. Clarified `-p` run behavior for broken settings.
5. **skills.md** and **slash-commands.md**: Added link to "Effort level of subagents and teammates" for fork on another model.
6. **get-started.md**: Version bump from 2.5.0 to 2.6.0 for CLI, and Java SDK from 3.4.0 to 3.5.0.
7. **api/client-sdks.md**: All SDK versions bumped (minor version bumps across all languages).
8. **build-with-claude/claude-on-vertex-ai.md**: Java SDK version bump to 3.5.0.
9. **build-with-claude/claude-in-microsoft-foundry.md**: Java SDK version bump to 3.5.0.
10. **agents-and-tools/tool-use/fine-grained-tool-streaming.md**: Java code simplified - replaced iterator-based loop with enhanced for-each loop over `streamResponse`.
11. **agents-and-tools/mcp-connector.md**: Java SDK version bump to 3.5.0.
Key themes:
- SDK version bumps (all languages, minor version)
- Claude Code v2.6.0 release
- Behavioral clarifications for Bedrock service tier, bare mode hooks, permission modes, config error handling
- Desktop sign-in lifecycle improvements
- Java code example simplification