Claude Code v2.1.284:默认模型换为 Sonnet 5.5
v2.1.284
推荐理由
Sonnet 5.5 成为默认模型且引入全新计费参数,直接影响所有 Claude Code 用户的推理成本与上下文策略;同时修复了 Agent SDK 会话崩溃等严重稳定性问题,建议立即升级以适配新模型并规避潜在错误。
What's changed
变更内容
- Added Claude Sonnet 5.5 (claude-sonnet-5-5), now the default Sonnet model on the Anthropic API — 1M context, $2/$10 per Mtok with $0.20/Mtok cache reads
- Added a "Yes, but ask again next time" answer to auto mode's prompt before a read outside the working directories, so you can allow that one read and still be asked about later ones
- Added dollar amounts to the Claude apps gateway spend limit in /usage and the status line (for example "$271.40 / $500.00 spent this month") when the gateway runs this version or later; the status line's rate_limits.spend_limit also gains used_usd, limit_usd and period
- Added effortSlider:decreaseEffort, increaseEffort and toggleUltracode keybinding actions, so the /effort slider's arrow and Tab keys can be rebound in keybindings.json
- Added /rate-limit-options to /help and the command menu for claude.ai subscribers, so the usage-limit notices that mention it point to a command you can find
- Added /mcp reconnect all in the interactive terminal to retry every MCP server that failed to connect or needs authentication at once
- Added Claude apps gateway startup warnings when a managed policy's availableModels is empty, or leaves out the model Claude Code starts on without setting model or enforceAvailableModels
- Added auth: { google: {} } for Claude apps gateway telemetry.forward_to destinations, so telemetry can be exported straight to Google Cloud's OTLP endpoint using the gateway's Google Cloud credentials
- Added certificate client authentication (private_key_jwt) between the Claude apps gateway and its identity provider, for identity providers that issue certificate credentials instead of client secrets
- Fixed a damaged response stream showing raw errors such as "JSON Parse error" or "undefined is not an object", or writing the word "undefined" into an answer, instead of being retried or reported as an interrupted response
- Fixed an overloaded or server error arriving right after a thinking block ending the turn with an error instead of being retried
- Fixed "Prompt is too long" errors that persisted after compacting: when the compacted request is still too long, Claude Code now compacts once more, keeping less of the recent conversation
- Fixed a session whose model is unavailable, with no fallback model left, showing a bare "is currently unavailable" message (or "Something went wrong" in cloud sessions) instead of the model-unavailable notice and its Learn more link
- Fixed Agent SDK sessions crashing when a user message contains an image with a malformed source, and failing on every later turn after a malformed document block; a malformed image is now replaced with an explanatory note
- Fixed MCP tool calls in a resumed session failing with "No such tool available" while their server was still connecting; the call now waits up to 10 seconds for the server
- Fixed repeated calls to the plan-usage endpoint after it rate-limits or rejects your login: /usage, /extra-usage and IDE usage views now back off instead of re-asking
- Fixed claude mcp add reporting success when managed settings restrict MCP servers to plugins; it now refuses and says what to do, instead of saving a server that never loads
- Fixed the /plugin configure screen: boolean options are now a true/false choice instead of free text, number options refuse invalid input, and ←/→ change an options field instead of switching tabs
- Fixed ANTHROPIC_FOUNDRY_RESOURCE being interpolated into the Foundry endpoint host unvalidated; a value that is not a plain resource name is now refused
- Fixed Claude Desktop behind a Claude apps gateway offering no 1M context option: the gateway now marks each 1M-capable model for Desktop automatically
- Fixed ↓ in shell mode selecting a hidden background-tasks pill, which stopped Backspace and Ctrl+U from editing the prompt
- Fixed Bash tool failing on Windows with many plugins enabled: plugin bin/ directories that don't exist are no longer added to PATH, and inherited entries aren't added twice
- Fixed sparsePaths plugin marketplaces cloning empty and replacing a working local copy on older git (before 2.39), which failed every refresh with "marketplace.json file is no longer present"
- Fixed fullscreen rendering erasing the terminal output above the session when [ in transcript mode writes the conversation to scrollback (macOS and Linux)
- Fixed fullscreen scroll position jumping to the previous message or to the bottom when a reply finished streaming while scrolled up
- Fixed tab bars in dialogs such as /config and /plugin breaking the title and tab labels mid-word in a narrow terminal; a tab that doesn't fit now moves to the next line whole
- Fixed the /model picker showing "+1 model" below the list after scrolling to the last model; the count now covers only the models below the visible rows
- Fixed /keybindings writing Backspace and Delete bindings for a footer action that does nothing into the generated keybindings.json
- Fixed a rebound agent panel close key (footer:close) typing "x" instead of itself on the row of the agent you're viewing
- Fixed vim mode . not repeating text typed very fast (for example over ssh or in tmux) or pasted without bracketed paste, and leaving the prompt in INSERT mode after repeating a change with nothing typed (such as cw then Esc)
- Fixed vim mode leaving the cursor on an image placeholder's opening bracket after dd on the last line or yy at the end of the prompt, where r or x would break or delete the image
- Fixed a key pressed the instant the terminal regained focus answering the Remote Control enable prompt before its short safety delay restarted
- Fixed the workspace trust dialog appearing a second time after switching renderers or updating when Claude Code was started in the home directory
- Fixed rules symlinked into .claude/rules from outside the project being skipped without ever showing the external-imports approval prompt; a .claude directory symlinked from outside the project now asks for the same approval
- Fixed plugins from marketplaces, claude.ai and npm pre-approving their own tools via allowed-tools under managed allowManagedPermissionRulesOnly; only plugins from an official Anthropic source or a source that managed settings vouch for keep that pre-approval
- Fixed a failed first claude plugin install leaving the plugin enabled and recorded when a dependency's version range could not be met
- Fixed the debug log dropping a failed hook's stderr when the hook also wrote to stdout, and logging nothing for a failed hook with no output; failed hooks now also log their status code
- Fixed {"decision":"block"} returned by Elicitation and ElicitationResult hooks being ignored; it now declines the MCP elicitation, as exit code 2 does
- Fixed sessions launched without the SendMessage tool (such as by Claude Desktop) still being told to message other sessions with it
- Fixed a photo sent from the Claude app over Remote Control being lost when its queued message was pulled back into the terminal prompt to edit, and the cursor moving one character for a photo with no caption
- Fixed typing a message during an automatic usage-limit wait taking the wait out of the "Continue automatically at usage limit" setting's control when that turn hit the limit again
- Fixed usage-limit warnings suggesting /upgrade to users already on the highest Max plan; the warnings and /upgrade itself now point at /usage-credits when it is available
- Fixed the Explore subagent switching to Opus on the Claude API when the session runs a model ID Claude Code doesn't recognize, such as a custom model behind a proxy; Explore now inherits that model
- Fixed /loop status updates in self-paced mode often not being shown because Claude wrote them only in its reasoning; Claude now writes each update, and the outcome when the loop stops, as visible text
- 新增 Claude Sonnet 5.5(claude-sonnet-5-5),现已成为 Anthropic API 上的默认 Sonnet 模型——支持 1M 上下文,每百万 token 价格为 $2/$10,缓存读取为 $0.20/Mtok
- 在自动模式的提示词中,针对工作目录外的读取操作新增了“是的,但下次再问”的选项,这样你可以允许本次读取,同时仍会在后续读取时被询问
- 当网关运行此版本或更高版本时,在 /usage 和状态行中为 Claude 应用网关支出限额添加了金额显示(例如 "$271.40 / $500.00 spent this month");状态行的 rate_limits.spend_limit 也新增了 used_usd、limit_usd 和 period 字段
- 新增 effortSlider:decreaseEffort、increaseEffort 和 toggleUltracode 键绑定动作,以便在 keybindings.json 中重新绑定 /effort 滑块的箭头键和 Tab 键
- 为 claude.ai 订阅用户将 /rate-limit-options 添加到 /help 和命令菜单中,这样提及它的用量限制通知就能指向一个可查找的命令
- 在交互式终端中新增 /mcp reconnect all,用于一次性重试所有连接失败或需要身份验证的 MCP 服务器
- 当托管策略的 availableModels 为空,或未设置 model 或 enforceAvailableModels 却遗漏了 Claude Code 启动所需的模型时,Claude 应用网关会新增启动警告
- 为 Claude 应用网关 telemetry.forward_to 目的地新增 auth: { google: {} },以便使用网关的 Google Cloud 凭据直接将遥测数据导出到 Google Cloud 的 OTLP 端点
- 在 Claude 应用网关与其身份提供商之间新增证书客户端身份验证(private_key_jwt),适用于颁发证书凭据而非客户端密钥的身份提供商
- 修复了损坏的响应流问题:此前可能直接显示如 "JSON Parse error" 或 "undefined is not an object" 等原始错误,或将单词 "undefined" 写入回答中,而不是进行重试或报告为中断的响应
- 修复了在思考块结束回合并报错后,立即到达的过载或服务器错误未被重试的问题
- 修复了压缩后仍然存在的 "Prompt is too long" 错误:当压缩后的请求仍然过长时,Claude Code 现在会再次执行压缩,保留更少的近期对话内容
- 修复了模型不可用且无备用模型时的会话显示问题:此前仅显示裸文本 "is currently unavailable"(云会话中为 "Something went wrong"),现在改为显示模型不可用通知及其“了解更多”链接
- 修复了当用户消息包含源格式错误的图片时 Agent SDK 会话崩溃,以及在格式错误的文档块之后每次交互都失败的问题;现在格式错误的图片会被替换为解释性说明
- 修复了在恢复的会话中 MCP 工具调用因服务器仍在连接而失败并报错“No such tool available”的问题;现在调用会等待服务器最多 10 秒
- 修复了在 plan-usage 端点限速或拒绝登录之后重复调用该端点的问题:/usage、/extra-usage 和 IDE 使用量视图现在会退避而不是重新请求
- 修复了 claude mcp add 在托管设置将 MCP 服务器限制为插件时仍报告成功的问题;现在它会拒绝并告知操作方法,而不是保存一个永远无法加载的服务器
- 修复了 /plugin configure 界面:布尔选项现在是真/假选择而非自由文本,数字选项拒绝无效输入,且 ←/→ 键用于更改选项字段而非切换标签页
- 修复了 ANTHROPIC_FOUNDRY_RESOURCE 未经验证就被插值到 Foundry 端点主机中的问题;非纯资源名称的值现在会被拒绝
- 修复了位于 Claude apps 网关后的 Claude Desktop 不提供 1M 上下文选项的问题:现在网关会自动为 Desktop 标记每个支持 1M 的模型
- 修复了 shell 模式下 ↓ 键选中隐藏的后台任务药丸,导致 Backspace 和 Ctrl+U 无法编辑提示符的问题
- 修复了在 Windows 上启用大量插件时 Bash 工具失败的问题:不存在的 plugin bin/ 目录不再添加到 PATH,且继承的条目不会重复添加
- 修复了 sparsePaths 插件市场在较旧 git(2.39 之前)克隆空仓库并替换有效本地副本的问题,这会导致每次刷新都失败并报错“marketplace.json file is no longer present”
- 修复了全屏渲染在 transcript 模式下将对话写入滚动缓冲区时擦除会话上方终端输出的问题(macOS 和 Linux)
- 修复了当回复完成流式传输且页面已向上滚动时,全屏滚动位置跳至上一条消息或底部的问题
- 修复了 /config 和 /plugin 等对话框中的标签栏在窄终端中将标题和标签文字截断的问题;现在无法容纳的标签会整体移至下一行
- 修复了 /model 选择器在滚动到最后一个模型后在列表下方显示“+1 model”的问题;现在的计数仅涵盖可见行下方的模型
- 修复了 /keybindings 将无操作的页脚操作的 Backspace 和 Delete 绑定写入生成的 keybindings.json 的问题
- 修复了反弹代理面板关闭键(footer:close)在查看的代理行中,输入 "x" 而非自身的问题
- 修复了 vim 模式下 . 命令无法重复快速输入的文本(例如通过 ssh 或在 tmux 中),或无括号粘贴模式粘贴的文本,以及在重复更改后未输入任何内容时(如 cw 然后 Esc)使提示符停留在 INSERT 模式的问题
- 修复了 vim 模式下在最后一行执行 dd 或在提示符末尾执行 yy 后,光标停留在图像占位符的开括号上的问题,此时 r 或 x 会破坏或删除该图像
- 修复了在终端重新获得焦点的瞬间按下按键,会在其短暂的安全延迟重启前回答远程启用提示的问题
- 修复了在 Claude Code 于主目录启动后,切换渲染器或更新时工作区信任对话框再次出现两次的问题
- 修复了从项目外部符号链接到 .claude/rules 的规则被跳过且从未显示 external-imports 批准提示的问题;现在,从项目外部符号链接的 .claude 目录也会请求相同的批准
- 修复了来自市场、claude.ai 和 npm 的插件在 managed allowManagedPermissionRulesOnly 下通过 allowed-tools 预先批准其自身工具的问题;只有来自官方 Anthropic 来源或由托管设置担保的来源的插件才能保留该预先批准
- 修复了首次 claude 插件安装失败时,当依赖项的版本范围无法满足时,插件仍被启用并记录的问题
- 修复了调试日志在钩子同时写入 stdout 时丢弃失败钩子的 stderr,以及对于没有输出的失败钩子不记录任何内容的问题;失败的钩子现在还会记录其状态码
- 修复了 Elicitation 和 ElicitationResult 钩子返回的 {"decision":"block"} 被忽略的问题;它现在会拒绝 MCP elicitation,就像退出代码 2 所做的那样
- 修复了未使用 SendMessage 工具启动的会话(例如由 Claude Desktop 启动)仍被指示使用该工具向其他会话发送消息的问题
- 修复了通过远程控制从 Claude 应用发送的照片在其排队消息被拉回终端提示以进行编辑时丢失的问题,以及对于没有标题的照片光标移动一个字符的问题
- 修复了在自动等待使用限制期间输入消息,导致在该轮再次达到限制时,将等待排除在“使用限制时自动继续”设置的控件之外的问题
- 修复了使用限制警告向已处于最高 Max 计划的用户建议 /upgrade 的问题;当 /usage-credits 可用时,警告和 /upgrade 本身现在都指向 /usage-credits
- 修复了当会话运行 Claude Code 无法识别的模型 ID(例如代理后面的自定义模型)时,Explore 子智能体在 Claude API 上切换至 Opus 的问题;现在 Explore 会继承该模型
- 修复了自助模式下 /loop 状态更新通常不显示的问题,因为 Claude 仅在其推理过程中写入这些更新;现在 Claude 会将每次更新以及循环停止时的结果以可见文本形式写出
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力