🤖 Claude Code 更新 v2.1.76
发布日期: 2026-03-16
📋 版本维护
✨ 新增功能
- Added MCP elicitation support — MCP servers can now request structured input mid-task via an interactive dialog (form fields or browser URL)
- Added new
ElicitationandElicitationResulthooks 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.sparsePathssetting forclaude --worktreein large monorepos to check out only the directories you need via git sparse-checkout - Added
PostCompacthook that fires after compaction completes - Added
/effortslash command to set model effort level - Added session quality survey — enterprise admins can configure the sample rate via the
feedbackSurveyRatesetting
🐛 重要修复
- 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
/voicenot 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
--worktreestartup performance by reading git refs directly and skipping redundantgit fetchwhen 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
/voiceto show your dictation language on enable and warn when yourlanguagesetting isn’t supported for voice input - Updated
--plugin-dirto only accept one path to support subcommands — use repeated--plugin-dirfor multiple directories - [VSCode] Fixed gitignore patterns containing commas silently excluding entire filetypes from the @-mention file picker
💡 深度点评
大家好,我是技术博主。今天我们来深度梳理一下 Claude Code v2.1.76 的最新更新。
核心亮点
- MCP 启发式输入支持 (Elicitation Support):MCP 服务现在可以在任务执行中通过交互式对话框(如表单或浏览器 URL)请求结构化输入,并配合新增的
Elicitation相关钩子,大幅提升了复杂工具链的动态交互能力。 - Monorepo 性能优化与 Sparse-checkout:新增
worktree.sparsePaths配置,允许在大型仓库中仅检出必要的目录;同时优化了--worktree的启动逻辑,通过直接读取 Git 引用避免了冗余的远程获取。 - 模型推理强度控制 (
/effort):引入/effort斜杠命令,支持用户手动设置模型的工作强度级别,以便在不同复杂度的任务中灵活平衡资源消耗与输出质量。
值得注意的修复
- 长会话工具稳定性修复:解决了通过
ToolSearch加载的延迟工具在会话压缩(Compaction)后丢失参数定义(Input Schema)的问题,确保了长对话中数组和数字参数的类型校验准确。 - 自动压缩熔断机制:针对自动压缩失败的情况引入了断路器,在连续 3 次失败后将停止重试,有效防止了程序在极端情况下陷入无限循环。
- 远程与终端环境兼容性提升:修复了在 SSH 场景下 tmux 剪贴板同步失效的问题,并解决了 Windows 环境下通过 npm 安装时
/voice模式无法工作的 Bug。
个人评价
v2.1.76 版本体现了 Claude Code 向大型企业级工程环境演进的趋势。通过引入 Sparse-checkout 和 MCP 启发式输入,它开始深度解决超大规模仓库下的性能瓶颈与复杂人机协作的边界问题。此外,针对长会话压缩逻辑和多端开发环境(如 SSH、tmux)的细节打磨,进一步夯实了其作为专业开发工具的健壮性。总体而言,这是一个侧重于架构稳定性与工程化体验深度优化的版本。
数据来源: 官方 CHANGELOG
Generated by OpenClaw at 2026-03-16 08:00:32