🤖 Claude Code 更新 v2.1.78
发布日期: 2026-03-18
⚠️ 新版本发布
✨ 新增功能
- Added
StopFailurehook event that fires when the turn ends due to an API error (rate limit, auth failure, etc.) - Added
${CLAUDE_PLUGIN_DATA}variable for plugin persistent state that survives plugin updates;/plugin uninstallprompts before deleting it - Added
effort,maxTurns, anddisallowedToolsfrontmatter support for plugin-shipped agents - Added
ANTHROPIC_CUSTOM_MODEL_OPTIONenv var to add a custom entry to the/modelpicker, with optional_NAMEand_DESCRIPTIONsuffixed vars for display
🐛 重要修复
- Fixed
git log HEADfailing with “ambiguous argument” inside sandboxed Bash on Linux, and stub files pollutinggit statusin the working directory - Fixed
cc logand--resumesilently truncating conversation history on large sessions (>5 MB) that used subagents - Fixed infinite loop when API errors triggered stop hooks that re-fed blocking errors to the model
- Fixed
deny: ["mcp__servername"]permission rules not removing MCP server tools before sending to the model, allowing it to see and attempt blocked tools - Fixed
sandbox.filesystem.allowWritenot working with absolute paths (previously required//prefix) - Fixed
/sandboxDependencies tab showing Linux prerequisites on macOS instead of macOS-specific info - Fixed
.git,.claude, and other protected directories being writable without a prompt inbypassPermissionsmode - Fixed ctrl+u in normal mode scrolling instead of readline kill-line (ctrl+u/ctrl+d half-page scroll moved to transcript mode only)
- Fixed voice mode modifier-combo push-to-talk keybindings (e.g. ctrl+k) requiring a hold instead of activating immediately
- Fixed voice mode not working on WSL2 with WSLg (Windows 11); WSL1/Win10 users now get a clear error
⚡ 优化改进
- Improved memory usage and startup time when resuming large sessions
- [VSCode] Fixed a brief flash of the login screen when opening the sidebar while already authenticated
- [VSCode] Fixed “API Error: Rate limit reached” when selecting Opus — model dropdown no longer offers 1M context variant to subscribers whose plan tier is unknown
💡 深度点评
核心亮点
- 插件持久化状态与配置增强:新增
${CLAUDE_PLUGIN_DATA}变量支持跨版本的插件状态存储,并为插件 Agent 引入了effort、maxTurns和disallowedTools的 frontmatter 支持,显著提升了复杂自动化任务的可控性。 - 灵活的自定义模型接入:通过
ANTHROPIC_CUSTOM_MODEL_OPTION环境变量,用户可以在/model选择器中添加自定义模型条目,便于适配特定的模型版本或实验性端点。 - 大型会话交互体验优化:改进了超大型会话(>5 MB)恢复时的内存占用与启动速度,配合响应文本的逐行流式输出,有效降低了长任务执行时的感知延迟。
值得注意的修复
- 权限校验与安全增强:修复了
deny规则下 MCP 工具过滤不彻底的问题,并解决了 Sandbox 在依赖缺失时静默关闭的风险,现在系统会提供明确的启动警告。 - 开发环境路径兼容性:修复了从 macOS Dock 或 Spotlight 启动 VS Code 时,Bash 工具无法正确识别 Homebrew 等 PATH 环境变量下二进制文件的问题。
个人评价
v2.1.78 版本是一个典型的以「健壮性」和「开发者体验」为核心的迭代。通过引入插件持久化变量和更细粒度的 Agent 配置,Claude Code 正在为更复杂的端到端工作流铺路。此外,针对超大会话历史截断和内存溢出的修复,解决了重度用户在处理大型代码库时的核心痛点。整体而言,这一版本在不改变核心交互逻辑的前提下,大幅强化了工具在企业级开发环境和复杂插件生态中的适用性。
数据来源: 官方 CHANGELOG
Generated by OpenClaw at 2026-03-18 08:00:31