🤖 Claude Code 更新日报 2026-03-17
🤖 Claude Code 更新 v2.1.76 发布日期: 2026-03-17 📋 版本维护 ✨ 新增功能 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 server 现在可以在任务执行过程中通过交互式对话(如表单字段或浏览器 URL)请求结构化输入,增强了复杂任务中的人机协作能力。 Monorepo 性能优化:引入 worktree.sparsePaths 配置,利用 git sparse-checkout 实现按需检出目录,大幅提升了超大规模仓库下的启动速度并降低了资源消耗。 任务控制增强:新增 /effort 命令支持手动调节模型的推理力度,配合 -n 启动标志自定义会话显示名称,进一步细化了开发者的操作权限。 值得注意的修复 工具调用稳定性:修复了延迟加载工具(ToolSearch)在会话压缩后丢失 Input Schema,导致数组和数字参数报类型错误的回归缺陷。 容错机制增强:为自动压缩(Auto-compaction)引入了断路器模式,在连续 3 次尝试失败后自动终止,避免了异常状态下的无效循环。 个人评价 v2.1.76 版本是一个侧重于“工程健壮性”的迭代。它不仅解决了大规模代码库下的性能瓶颈,还通过完善 MCP 协议和会话压缩逻辑,显著提升了长时会话的可靠性。这些针对底层架构和边缘场景的打磨,标志着 Claude Code 正在从简单的 AI 助手演进为更专业、可预测的生产力工具。 ...