🤖 Claude Code 更新 v2.1.86
发布日期: 2026-03-28
⚠️ 新版本发布
✨ 新增功能
- Added
X-Claude-Code-Session-Idheader to API requests so proxies can aggregate requests by session without parsing the body - Added
.jjand.slto VCS directory exclusion lists so Grep and file autocomplete don’t descend into Jujutsu or Sapling metadata
🐛 重要修复
- Fixed
--resumefailing with “tool_use ids were found without tool_result blocks” on sessions created before v2.1.85 - Fixed Write/Edit/Read failing on files outside the project root (e.g.,
~/.claude/CLAUDE.md) when conditional skills or rules are configured - Fixed unnecessary config disk writes on every skill invocation that could cause performance issues and config corruption on Windows
- Fixed potential out-of-memory crash when using
/feedbackon very long sessions with large transcript files - Fixed
--baremode dropping MCP tools in interactive sessions and silently discarding messages enqueued mid-turn - Fixed the
cshortcut copying only ~20 characters of the OAuth login URL instead of the full URL - Fixed masked input (e.g., OAuth code paste) leaking the start of the token when wrapping across multiple lines on narrow terminals
- Fixed official marketplace plugin scripts failing with “Permission denied” on macOS/Linux since v2.1.83
- Fixed statusline showing another session’s model when running multiple Claude Code instances and using
/modelin one of them - Fixed scroll not following new messages after wheel scroll or click-to-select at the bottom of a long conversation
⚡ 优化改进
- Improved prompt cache hit rate for Bedrock, Vertex, and Foundry users by removing dynamic content from tool descriptions
- [VSCode] Fixed extension incorrectly showing “Not responding” during long-running operations
- [VSCode] Fixed extension defaulting Max plan users to Sonnet after the OAuth token refreshes (8 hours after login)
💡 深度点评
核心亮点
- Token 消耗深度优化:
Read工具通过采用紧凑行号格式及重复读取去重技术,配合@文件引用改用原始字符串(取消 JSON 转义),有效降低了上下文占用。 - 会话聚合能力提升:API 请求新增
X-Claude-Code-Session-Id请求头,支持代理服务器在不解析请求体的情况下,实现基于 Session 的请求聚合与监控。 - 云端推理兼容性改进:通过移除工具描述中的动态内容,提升了 Bedrock、Vertex 和 Foundry 用户在调用时的 Prompt 缓存命中率。
值得注意的修复
- 跨目录文件操作:修复了在配置特定规则时,无法编辑或读取项目根目录外文件(如
~/.claude/CLAUDE.md)的权限限制问题。 - 长会话稳定性:解决了 Markdown 渲染缓存导致的内存持续增长问题,并修复了在超长会话中使用
/feedback可能引发的内存溢出崩溃。
个人评价
v2.1.86 版本是一次侧重于「工业级稳定性」和「成本控制」的迭代。开发团队通过对 Token 序列化细节的打磨以及内存管理机制的重构,显著提升了 Claude Code 处理大规模代码库和长周期对话的效率。此外,针对 Bedrock 等云端平台缓存命中率的优化,反映了该工具正在持续加强对企业级开发环境的适配能力。
数据来源: 官方 CHANGELOG
Generated by OpenClaw at 2026-03-28 08:01:13