精选78Claude Code(GitHub Releases)AI 编程与模型
Claude Code v2.1.236:新增默认模型变量与跨会话通知
v2.1.236
推荐理由
Claude Code 重度用户注意:v2.1.236 新增 ANTHROPIC_DEFAULT_MODEL 环境变量可统一新会话默认模型,跨会话 SendMessage 通知适合多会话工作流;macOS 沙箱读保护规则收紧,涉及 .env 等敏感文件需留意。建议升级并核对相关配置。
What's changed
变更内容
- Added ANTHROPIC_DEFAULT_MODEL environment variable: sets the model new sessions start on, while a /model pick still overrides it and persists across restarts (unlike ANTHROPIC_MODEL)
- Added notify_when_idle to cross-session SendMessage: ask another Claude Code session on this machine to send one notice when it next goes idle — opt-in, one-shot, no polling (macOS and Linux)
- Sandbox: on macOS, wildcard read-deny rules (e.g. **/.env) now take precedence inside allowed read regions, cover matched directories' contents, and can't be bypassed by renaming the denied file
- Fixed clipboard copy, background housekeeping, background sessions, and local MCP logs breaking after the directory a session had switched into was removed (since 2.1.229)
- Fixed the fullscreen renderer failing permanently after a single failed start: it now falls back to the classic renderer instead of exiting on every subsequent launch
- Fixed the /model picker rendering taller than the terminal: it now shows only as many models as fit the window, with the rest reachable by scrolling
- Fixed SendMessage calls being rejected when a malformed closing tag left the message text inside the summary field
- Fixed unhandled promise rejections when a subprocess fails to start, for example powershell.exe on WSL with Windows interop disabled (regression in 2.1.234)
- Fixed fullscreen mode sometimes not showing a newly sent message until the next update after the terminal was resized
- Fixed a blank band that could remain above the prompt after clearing a multi-line prompt, and panes not repainting after resizing the terminal away and back, in fullscreen mode
- Fixed the managed-settings approval prompt sometimes not appearing at startup while still capturing the first keypress as approval
- Fixed terminal tab titles jumping in tmux (iTerm tmux integration): the title is now written only when its text changes instead of animating every 960ms
- Fixed an unclear error when the cloud environments list came back empty or malformed
- Fixed the Fable 5 first-time usage-credits prompt auto-selecting the fallback model after 60 seconds with no answer when using Remote Control
- Fixed spinner tips never appearing, with a repeated background error, when the cached guest-pass reward in ~/.claude.json was malformed
- Fixed skills hot-reload in SDK/VS Code sessions raising an error on every skills change after the session's working directory was deleted (2.1.229+)
- Fixed self-hosted runner sessions released on idle, retire, or startup timeout occasionally resuming on another runner before the post-session hook had finished
- Fixed the Clawd mascot's eyes and feet rendering unevenly in iTerm2 at some font sizes
- Fixed occasional runaway session recaps: recap text (automatic and /recap) is now capped at 400 characters, cut at a word boundary
- Improved startup performance: the session counter is now written in the background
- Improved auto mode: Monitor allow rules are now set aside while auto mode is active, so Monitor commands are reviewed the same way Bash commands are
- Improved auto mode on Bedrock, Vertex AI, and Foundry, and when telemetry is disabled: the classifier now uses the same defaults as on the Claude API, including severity-scored classification
- Improved auto mode: the git status check can no longer be fooled by a repo's status.showUntrackedFiles=no setting into reporting a clean tree
- Changed the /model picker to highlight only the newest model's name, so the highlight marks the new release rather than an arbitrary subset of the list
- /goal: an idle session whose goal is parked behind long-running background work now checks in automatically after 30 minutes (then 1h, 2h) instead of waiting for you to return
- /usage now shows the usage-credits spend row for Team and Enterprise members, and shows a capped row at 0% before anything is spent
- SIGTERM in print/SDK mode no longer records an interrupted turn or synthetic tool denials before exiting; running commands are still terminated and the process still exits with code 143
- Pressing Enter on a slash-command typo or a command unavailable in this session now reports it instead of running the closest fuzzy match; prefixes and aliases still run
- Remote Control now marks a session offline within seconds when the CLI exits or its terminal closes
- SendMessage now refuses further messages to a session up front once a rapid burst would exceed what that session's inbox accepts, instead of reporting them sent while they were dropped
- Aligned the session title chip on the prompt border with the footer's right edge
- Right-aligned footer items (goal indicator, session state, background agent status) and truncated notices now share a consistent right margin with the rest of the prompt area
- [VSCode] Added screen reader support for the transcript: live announcements for replies, permission requests, errors, and status changes, plus per-turn heading navigation
- 新增 ANTHROPIC_DEFAULT_MODEL 环境变量:设置新会话启动时使用的模型,而 /model 选择仍可覆盖它,并在重启后保持(不同于 ANTHROPIC_MODEL)
- 在跨会话 SendMessage 中新增 notify_when_idle:请求本机另一个 Claude Code 会话在其下次空闲时发送一条通知——可选、一次性、无需轮询(macOS 和 Linux)
- 沙箱:在 macOS 上,通配符读取拒绝规则(例如 **/.env)现在在允许的读取区域内优先,覆盖匹配目录的内容,且无法通过重命名被拒绝的文件来绕过
- 修复了会话切换到的目录被删除后,剪贴板复制、后台维护、后台会话和本地 MCP 日志中断的问题(自 2.1.229 起)
- 修复了全屏渲染器在单次启动失败后永久失效的问题:现在它回退到经典渲染器,而不是在每次后续启动时退出
- 修复了 /model 选择器渲染高于终端的问题:现在只显示适合窗口的模型数量,其余可通过滚动访问
- 修复了当格式错误的结束标签将消息文本留在摘要字段中时,SendMessage 调用被拒绝的问题
- 修复了子进程启动失败时未处理的 promise 拒绝,例如在禁用 Windows 互操作的 WSL 上的 powershell.exe(2.1.234 中的回归)
- 修复了全屏模式下,终端调整大小后,新发送的消息有时直到下次更新才显示的问题
- 修复了全屏模式下,清除多行提示后提示上方可能留下的空白带,以及终端调整大小离开再返回后窗格不重绘的问题
- 修复了托管设置批准提示有时在启动时不出现,同时仍将第一次按键捕获为批准的问题
- 修复了 tmux(iTerm tmux 集成)中终端标签页标题跳动的问题:现在仅在文本更改时写入标题,而不是每 960ms 动画一次
- 修复了云环境列表返回为空或格式错误时的不明确错误
- 修复了使用远程控制时,Fable 5 首次使用信用提示在 60 秒无响应后自动选择回退模型的问题
- 修复了当 ~/.claude.json 中缓存的访客通行证奖励格式错误时,旋转指示器提示从不显示并伴随重复后台错误的问题
- 修复了 SDK/VS Code 会话中技能热重载在会话工作目录被删除后,每次技能更改都引发错误的问题(2.1.229+)
- 修复了自托管运行器会话在空闲、退役或启动超时时释放后,偶尔会在后会话钩子完成前在另一运行器上恢复的问题
- 修复了 Clawd 吉祥物的眼睛和脚在 iTerm2 中某些字体大小下渲染不均匀的问题
- 修复了偶尔失控的会话摘要:摘要文本(自动和 /recap)现在限制为 400 个字符,并在单词边界处截断
- 改进了启动性能:会话计数器现在在后台写入
- 改进了自动模式:自动模式激活时,Monitor 允许规则被搁置,因此 Monitor 命令以与 Bash 命令相同的方式被审查
- 改进了 Bedrock、Vertex AI 和 Foundry 上的自动模式,以及禁用遥测时:分类器现在使用与 Claude API 相同的默认值,包括严重性评分的分类
- 改进了自动模式:git 状态检查不再被仓库的 status.showUntrackedFiles=no 设置欺骗而报告干净的工作树
- 更改了 /model 选择器,仅高亮最新模型的名称,因此高亮标记新版本而不是列表中的任意子集
- /goal:目标被搁置在长时间运行的后台工作之后的空闲会话现在在 30 分钟后(然后 1 小时、2 小时)自动检查,而不是等待您返回
- /usage 现在为团队和企业成员显示使用额度消费行,并在任何消费前显示上限为 0% 的行
- 在 print/SDK 模式下,SIGTERM 不再在退出前记录中断的回合或合成的工具拒绝;正在运行的命令仍被终止,进程仍以代码 143 退出
- 在斜杠命令拼写错误或此会话中不可用的命令上按 Enter 现在会报告错误,而不是运行最接近的模糊匹配;前缀和别名仍然运行
- 远程控制现在在 CLI 退出或其终端关闭时在几秒内将会话标记为离线
- SendMessage 现在在快速突发消息超过该会话收件箱接受量时,提前拒绝进一步的消息,而不是报告已发送而实际被丢弃
- 将提示边框上的会话标题标签与页脚的右边缘对齐
- 右对齐的页脚项目(目标指示器、会话状态、后台代理状态)和截断的通知现在与提示区域的其余部分共享一致的右边距
- [VSCode] 为转录添加了屏幕阅读器支持:对回复、权限请求、错误和状态更改的实时公告,以及每轮标题导航
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力