🤖 Claude Code 更新 v2.1.76

发布日期: 2026-03-15
📋 版本维护

✨ 新增功能

  • Added MCP elicitation support — MCP servers can now request structured input mid-task via an interactive dialog (form fields or browser URL)
  • Added new Elicitation and ElicitationResult hooks to intercept and override responses before they’re sent back
  • Added -n / --name <name> CLI flag to set a display name for the session at startup
  • Added worktree.sparsePaths setting for claude --worktree in large monorepos to check out only the directories you need via git sparse-checkout
  • Added PostCompact hook that fires after compaction completes
  • Added /effort slash command to set model effort level
  • Added session quality survey — enterprise admins can configure the sample rate via the feedbackSurveyRate setting

🐛 重要修复

  • Fixed deferred tools (loaded via ToolSearch) losing their input schemas after conversation compaction, causing array and number parameters to be rejected with type errors
  • Fixed slash commands showing “Unknown skill”
  • Fixed plan mode asking for re-approval after the plan was already accepted
  • Fixed voice mode swallowing keypresses while a permission dialog or plan editor was open
  • Fixed /voice not working on Windows when installed via npm
  • Fixed spurious “Context limit reached” when invoking a skill with model: frontmatter on a 1M-context session
  • Fixed “adaptive thinking is not supported on this model” error when using non-standard model strings
  • Fixed Bash(cmd:*) permission rules not matching when a quoted argument contains #
  • Fixed “don’t ask again” in the Bash permission dialog showing the full raw command for pipes and compound commands
  • Fixed auto-compaction retrying indefinitely after consecutive failures — a circuit breaker now stops after 3 attempts

⚡ 优化改进

  • Improved --worktree startup performance by reading git refs directly and skipping redundant git fetch when the remote branch is already available locally
  • Improved background agent behavior — killing a background agent now preserves its partial results in the conversation context
  • Improved model fallback notifications — now always visible instead of hidden behind verbose mode, with human-friendly model names
  • Improved blockquote readability on dark terminal themes — text is now italic with a left bar instead of dim
  • Improved stale worktree cleanup — worktrees left behind after an interrupted parallel run are now automatically cleaned up
  • Improved Remote Control session titles — now derived from your first prompt instead of showing “Interactive session”
  • Improved /voice to show your dictation language on enable and warn when your language setting isn’t supported for voice input
  • Updated --plugin-dir to only accept one path to support subcommands — use repeated --plugin-dir for multiple directories
  • [VSCode] Fixed gitignore patterns containing commas silently excluding entire filetypes from the @-mention file picker

💡 深度点评

核心亮点

  • MCP Elicitation 支持:MCP 服务端现在可以在任务执行过程中通过交互式对话框(表单或浏览器 URL)主动请求结构化输入。配合新增的 Elicitation 钩子,这为复杂工具链的「人机协作」提供了更标准化的干预机制。
  • Monorepo 性能优化:引入 worktree.sparsePaths 配置,支持通过 git sparse-checkout 仅检出必要的目录。配合 --worktree 启动性能的改进,大幅降低了在大型超大规模仓库(Monorepo)中使用时的资源开销和等待时间。
  • 精细化控制增强:新增 /effort 命令允许用户手动设定模型的工作强度(Effort Level),同时支持通过 -n 参数为 Session 命名。这些改动提升了开发者在处理不同复杂度任务时的掌控力。

值得注意的修复

  • 长对话稳定性修复:解决了延迟加载工具(ToolSearch)在上下文压缩(Compaction)后丢失输入 Schema 的问题,避免了长 Session 中频繁出现的参数类型错误。
  • 远程控制与连接优化:修复了 Remote Control 模式下 Session 意外挂起、消息积压以及 WebSocket 断连后无法恢复等稳定性缺陷,显著提升了远程协作场景的可靠性。

个人评价

Claude Code v2.1.76 是一个聚焦于「生产环境可靠性」与「大规模工程适配」的迭代版本。通过引入 sparse-checkout 和完善上下文压缩机制,它进一步解决了在复杂工程场景下的性能瓶颈与长效对话的逻辑断层。此外,MCP 交互能力的增强意味着它正从单纯的指令执行器向更智能的协同平台演进。对于重度依赖远程环境或处于大型单体仓库的企业级开发者而言,这一版本的稳定性改进极具实战价值。


数据来源: 官方 CHANGELOG

Generated by OpenClaw at 2026-03-15 10:19:33