跳到正文
北京时间
原文
Claude Code:GitHub Releases(RSS)· ashwin-ant·· 2026-06-06精选AI 评分64

Claude Code v2.1.166 发布

v2.1.166

AI 导读

Claude Code v2.1.166 新增 fallbackModel 设置,最多配置三个后备模型在主模型过载或不可用时按序尝试;--fallback-model 现也适用于交互会话。deny rule 中工具名位置支持 glob 模式("*"拒绝所有工具),未知工具名启动时警告。跨会话消息中继不再携带用户权限,接收方拒绝被中继的权限请求。MAX_THINKING_TOKENS=0、--thinking disabled 及逐模型 thinking 开关可禁用默认开启思考的模型(仅 Claude API,第三方不变)。API 返回非预期不可重试错误时,在后备模型上重试一次。修复了图像处理失败、远程会话卡死、JetBrains IDE 终端闪烁、Kitty 键盘协议下 Shift+非 ASCII 字符丢失、PowerShell 命令验证挂起、macOS 后台进程孤儿化等问题。

推荐理由

Claude Code 重度用户该升级了,fallbackModel 让你设三个备用模型防止高峰期罢工,跨会话安全加固也让自动模式更敢放任跑了。

正文 · 原文

What's changed

  • Added fallbackModel setting to configure up to three fallback models tried in order when the primary model is overloaded or unavailable; --fallback-model now also applies to interactive sessions
  • Added glob pattern support in deny rule tool-name position ("*" denies all tools); allow rules reject non-MCP globs, and unknown tool names in deny rules warn at startup
  • Hardened cross-session messaging: messages relayed via SendMessage from other Claude sessions no longer carry user authority — receivers refuse relayed permission requests, and auto mode blocks them
  • MAX_THINKING_TOKENS=0, --thinking disabled, and the per-model thinking toggle now disable thinking on models that think by default via the Claude API (3P providers unchanged)
  • Claude Code now retries a turn once on the fallback model when the API rejects an unexpected non-retryable error; auth, rate-limit, request-size, and transport errors still surface immediately
  • claude update now announces the target version before downloading instead of going silent
  • claude agents: typing a URL into the list now filters to the session whose first prompt contained it
  • Fixed a recurring "image could not be processed" error and extra token usage when an unprocessable image was sent in a session
  • Fixed remote sessions becoming permanently stuck when a brief backend disruption occurred during worker registration at startup
  • Fixed flickering in JetBrains IDE terminals (IntelliJ, PyCharm, WebStorm, etc.) on 2026.1+ by enabling synchronized output
  • Fixed Shift+non-ASCII characters (e.g. Shift+ä → Ä) being dropped in terminals using the Kitty keyboard protocol (WezTerm, Ghostty, kitty)
  • Fixed PowerShell command validation occasionally hanging far past its time budget on Windows when a killed process's children held its output pipes
  • Fixed orphaned claude --bg-pty-host processes spinning at 100% CPU after the daemon dies while connected on macOS
  • Fixed voice mode requiring /login to clear a stale auth check after toggling /voice
  • Fixed managed settings with an invalid entry silently disabling enforcement of their remaining valid policies
  • Fixed managed-settings allowedMcpServers/deniedMcpServers predicates not matching when they use ${VAR} references
  • Fixed background agent sessions that entered a git worktree crash-looping with "No conversation found" when reopened from claude agents
  • Fixed duplicated thinking text in the Ctrl+O transcript view while streaming
  • Fixed /doctor showing a contradictory failed "Not inside a remote session" check when run inside a remote session
  • Fixed the cursor sticking at the end of the first line when typing a multiline prompt in the claude agents dispatch and reply inputs
  • Fixed blank lines appearing between background agent rows in the task list on terminals without Unicode support

来源:Claude Code:GitHub Releases(RSS) · github.com