返回全部动态

Claude Code 2.1.251 发布:新增模型切换钩子与安全修复

原标题:2.1.251

Claude Code Changelog一手来源产品发布质量 83

AI 摘要

Claude Code 2.1.251 版本发布,新增 PreModelSwitch 和 PostModelSwitch 钩子事件,支持对模型切换进行阻止、确认或注释;SessionStart 恢复钩子现在可获取会话陈旧度和重新缓存成本估算。同时为 Remote Control 客户端添加了前台子代理工具调用的实时流式传输,并在 /usage 中新增支出限制条。修复了多个安全漏洞,包括文件工具在符号链接交换后可能越权读写、插件命令路径遍历、项目设置绕过 OTLP 收集器限制等问题,并优化了 TUI 性能、代理团队通信和多种边缘情况。

以上摘要由 AI 生成,可能存在误差。事实请以原文为准。

正文节选

- Added `PreModelSwitch` and `PostModelSwitch` hook events (block, confirm, or annotate a model switch); `SessionStart` resume hooks now receive session staleness and the estimated re-cache cost - Added live streaming of a foreground subagent's tool calls and results to Remote Control clients (background subagents, the default, still show status only) - Added a Spend limit bar to `/usage` and a `rate_limits.spend_limit` status line field for developers behind a Claude apps gateway with spend lim


发布时间:—
抓取时间:2026-09-07 03:46
来源机构:Anthropic
阅读原文raw.githubusercontent.com