---
title: "Claude Code v2.1.236 发布：新增默认模型变量并修复多项稳定性问题"
source: "Claude Code：GitHub Releases（RSS）"
source_tier: "t1_5"
url: "https://github.com/anthropics/claude-code/releases/tag/v2.1.236"
permalink: "https://feed.astralor.com/items/itm_2f87387c7d5ec25020a4aa83"
published: "2026-08-19T20:02:05.000Z"
score: 75
channel: "ai"
tags: ["Claude Code","沙箱","环境变量","自动模式"]
---

# Claude Code v2.1.236 发布：新增默认模型变量并修复多项稳定性问题

## AI 点评

> 这次更新虽然以修复为主，但 ANTHROPIC_DEFAULT_MODEL 和 notify_when_idle 是真正值得上手的新能力，尤其是对用 Claude Code 跑自动化任务的人。沙箱规则的收紧也提醒我们，保护 .env 这类敏感文件正变得越来越重要。建议升级后先验证自己的自动化脚本是否受到影响。

## 速览

Claude Code 发布 v2.1.236。新增 ANTHROPIC_DEFAULT_MODEL 环境变量，可设置新会话默认模型，且 /model 选择会覆盖并在重启后保留。SendMessage 增加 notify_when_idle 选项，实现跨会话的一次性闲置通知，无需轮询。macOS 沙箱中通配符只读拒绝规则优先级提升，覆盖目录内容且不可通过改名绕过。同时修复剪贴板、全屏渲染、tmux 标签等问题，改进自动模式分类与启动性能。

## 关键点

- 新增 ANTHROPIC_DEFAULT_MODEL 环境变量，支持新会话默认模型配置，/model 选择可跨重启持久化。
- SendMessage 加入 notify_when_idle 一次性通知，跨会话闲置提醒无需轮询。
- macOS 沙箱通配符只读拒绝规则优先级提升，覆盖目录内容且无法通过重命名绕过。
- 修复大量稳定性问题，包括剪贴板、全屏渲染、SendMessage、tmux 标签等，并优化自动模式与启动性能。

## 全文

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

---

引用前请核对原文;本文由星际流动整理:https://feed.astralor.com/items/itm_2f87387c7d5ec25020a4aa83
