### 整体摘要
本次文档更新主要反映了 **Claude Code v2.1.203** 版本的发布。关键变更包括 CLI 新增 `--effort ultracode` 支持、MCP 服务器协议与超时逻辑的改进、Microsoft Foundry 认证方式的扩展(Bearer Token),以及对插件卸载、嵌套技能调用和子代理隔离逻辑的优化。
### 关键主题
* **v2.1.203 核心特性**: 绝大多数新功能(如 Ultracode CLI 支持、登录预警、MCP idle timeout 扩展)均依赖此版本。
* **Ultracode 集成增强**: `ultracode` 模式现在可以通过 `--effort` 标志和 Agent SDK 正式启用,不再局限于 UI 菜单。
* **MCP 协议与行为改进**: `roots/list` 现在包含所有工作目录并支持变更通知;stdio 服务器现在也受空闲超时限制(默认 30 分钟),且受 per-server timeout 的下限保护。
* **认证与会话管理**: 新增 Microsoft Foundry 的 Bearer Token 认证选项(`ANTHROPIC_FOUNDRY_AUTH_TOKEN`);CLI 在登录即将过期时发出警告,这对无看管会话至关重要。
* **项目配置与安全**: 插件卸载时区分个人与项目范围;嵌套技能调用逻辑更智能(自动匹配目录);子代理在 `isolation: worktree` 模式下的隔离更严格,防止意外回退到主仓库。
### 影响等级:中等
**理由**: 此次更新主要是功能增强和逻辑完善,而非破坏性变更。影响主要集中在利用新特性的开发者(如 MCP 服务器作者、Agent SDK 用户)以及需要维护长期运行后台任务的管理员。子代理隔离逻辑的收紧虽然更安全,但可能会暴露之前被忽略的路径依赖问题。
### 开发者行动项
* **更新 CLI 脚本**: 如果使用 `--effort` 参数,可尝试新增的 `ultracode` 选项以获得更智能的动态工作流。
* **适配 MCP 服务器**: 检查并更新 MCP 服务器代码以处理 `roots/list` 的完整返回值(包括额外的工作目录)及 `notifications/roots/list_changed` 通知。
* **维护无看管会话**: 对于使用 Agent View 或 Remote Control 的长时间运行任务,需监控 `/login` 过期警告并实现自动续期逻辑。
* **检查子代理配置**: 如果使用 `isolation: worktree`,确保相关命令不会在工作目录移除时意外回退到主仓库,这在新版中会报错。
* **利用新认证方式**: 在使用 Microsoft Foundry 时,可考虑改用 `ANTHROPIC_FOUNDRY_AUTH_TOKEN` 以便更好地集成现有的 token 管理流程。
💭 Model Reasoning
1. **Analyze the Request:**
* **Role:** World-class programmer/developer tool expert.
* **Task:** Analyze a batch of documentation changes (12 pages).
* **Output Format:** Markdown, concise, insightful.
* **Language:** Chinese.
* **Structure:**
1. Overall Summary.
2. Key Themes.
3. Impact Level (with reasoning).
4. Action Items (max 5).
2. **Analyze the Input Data (Page by Page):**
* **`cli-reference.md`**: `--effort` flag now accepts `ultracode` (v2.1.203). It starts at `xhigh` effort with workflows on.
* **`discover-plugins.md`**: Improvements to plugin uninstallation logic (local vs. shared). Refinement on "Not used recently" logic (LSP plugins now count as used if active, previously exempt).
* **`iam.md`**: New "Renew an expiring login" warning (5 days before expiry) for `/login` (v2.1.203). Emphasizes unattended sessions (Agent view/Remote Control).
* **`mcp.md`**:
* `CLAUDE_PROJECT_DIR` vs `roots/list` clarification. `roots/list` now includes added working directories and sends notifications on change (v2.1.203).
* MCP tool idle timeout refinements. Per-server `timeout` acts as a floor for idle timeout (v2.1.203). Idle timeout now applies to stdio servers (default 30 mins) but respects the per-server timeout floor.
* **`microsoft-foundry.md`**: Adds Option C: Bearer token authentication (`ANTHROPIC_FOUNDRY_AUTH_TOKEN`) for v2.1.203+. Precedence over API key/Default credential chain.
* **`model-config.md`**: Clarifies `ultracode` usage. It can be set via `/effort`, `--effort ultracode` (v2.1.203), or `--settings`/Agent SDK. Note: `effortLevel` setting and Env var do *not* accept `ultracode`. Fallback to `xhigh` if workflows are off.
* **`plugins-reference.md`**: Cross-reference update to `mcp.md` regarding `roots/list`.
* **`settings.md`**: Large diff, but looking closely, it seems mostly formatting changes or reordering of the table content, though the prompt says "Total changed pages: 12", the diff provided for `settings.md` looks like it's mostly just wrapping long lines or reordering the table rows visually in the diff context. *Correction*: Looking closer at `settings.md` diff, it actually looks like a table re-sort or formatting change. Wait, the diff is truncated in the preview provided in the prompt `... | "https://hooks.example.com/*" ...`. It cuts off. I should focus on the *content* changes. The diff shows `+131 / -131`. This implies a reformatting or reordering of the settings table, but no semantic content changes are visible in the snippet provided (just the start of the table). I will assume this is structural rather than functional based on the snippet, or perhaps just a very large table rewrite that isn't fully visible. *Decision*: Treat as minor formatting/structural update unless I see specific key changes.
* **`skills.md`**: Nested skill behavior change. When unqualified name is invoked, Claude loads project-root skill *and* lists qualified variants to invoke if files match (v2.1.203).
* **`slash-commands.md`**: Same as `skills.md` (likely same content block).
* **`sub-agents.md`**: `isolation: worktree` safety improvement. Commands failing if the worktree is deleted (v2.1.203). Previously could run in main checkout.
* **`vs-code.md`**: New setting "Enable Remote Control for all sessions" in VS Code settings (v2.1.203).
3. **Synthesize Findings:**
* **Common Version:** Almost every functional change points to version **v2.1.203**. This is a major release update documentation.
* **Themes:**
* **Ultracode:** Integration into CLI flags and SDK.
* **MCP/Server improvements:** `roots/list` enhancements, idle timeout logic, Foundry auth.
* **UX/Project Management:** Plugin management (uninstall logic), Skills (nested invocation logic), Login expiration warnings.
* **Safety/Isolation:** Subagent `worktree` isolation fix.
4. **Drafting the Analysis (in Chinese):**
* *Summary*: This update batch primarily documents the release of Claude Code v2.1.203, introducing new features like `ultracode` CLI support, refined MCP server behavior, improved authentication flows (Microsoft Foundry, login renewal), and enhanced project-level logic for skills and plugins.
* *Key Themes*:
* **v2.1.203 Release Features**: Most changes are gated behind this version.
* **Ultracode Expansion**: Now available via `--effort ultracode` and Agent SDK.
* **MCP & Integration Enhancements**: Better `roots/list` handling, specific idle timeouts for stdio servers, and Bearer token auth for Foundry.
* **Project Configuration & Automation**: Better handling of nested skills, plugin uninstallation scopes, and unattended session warnings.
* **Safety**: Stricter isolation for subagents with worktrees.
* *Impact Level*: **Medium**. These are additive features and behavioral improvements. The most "breaking" feel is the `ultracode` flag availability, but it's additive. The subagent isolation change is a safety improvement that might break workflows that relied on the old buggy behavior (running in main checkout when worktree failed).
* *Action Items*:
* Update CLI scripts to use `--effort ultracode` (if desired).
* Review MCP server implementations to handle the new `roots/list` behavior and notifications.
* Configure Remote Control settings in VS Code if auto-connection is needed.
* Check unattended scripts (Agents) for login expiration warnings.
* Be aware of stricter subagent isolation in worktree mode.
5. **Refining the Output (Translating to professional Chinese):**
* *Summary*: 本次文档更新主要集中在 **Claude Code v2.1.203** 版本的发布。关键更新包括:CLI 新增 `ultracode` 支持、MCP 服务器行为改进、Microsoft Foundry 认证方式扩展,以及登录过期提醒、插件卸载逻辑优化和子代理安全隔离增强。
* *Themes*:
* **新版本特性 (v2.1.203)**: 几乎所有新功能都与此版本挂钩。
* **Ultracode 深度集成**: 支持通过 `--effort` 参数和 Agent SDK 启用。
* **MCP 与集成增强**: `roots/list` 协议改进、stdio 服务器空闲超时逻辑优化、Foundry 支持 Bearer Token。
* **自动化与配置管理**: 嵌套技能调用逻辑优化、插件卸载范围区分、后台会话登录预警。
* **安全性**: 子代理 `worktree` 模式下的隔离逻辑更严格。
* *Impact*: **Medium** (中等)。主要是新增功能和逻辑修正。对开发者影响最大的是 MCP 服务器协议的变更以及 Ultracode 的可编程性提升。
* *Action Items*:
* 更新 CLI 脚本以利用 `--effort ultracode`。
* 检查 MCP 服务器代码,适配新的 `roots/list` 返回值及变更通知。
* 为长期运行的无看管会话配置登录续期逻辑。
* 审查子代理配置,确保 `isolation: worktree` 下的命令路径健壮性。
* 利用 VS Code 新增的 "Enable Remote Control for all sessions" 设置优化体验。
6. **Final Polish**: Ensure markdown formatting and tone are correct. (Self-Correction: Make sure to mention the specific version clearly as it's the through-line).
7. **Construct Final Response.**