跳到主内容
精选88Claude Code(GitHub Releases)AI 编程与模型多源精选 ×2

Claude Code v2.1.257:默认模型升级、安全加固与多项修复

v2.1.257

原文
推荐理由

本次更新涉及核心安全策略收紧(自动模式下的云元数据访问限制)及关键权限绕过漏洞修复,直接影响自动化脚本的安全性。建议开发者检查并适配新的 Containment Escape 规则,确保 CI/CD 或自动化流程不受阻断。

What's changed

变更内容

  • Added Claude Fable 5.1 (claude-fable-5-1), now the default Fable model — 1M context, $10/$50 per Mtok with $0.25/Mtok cache reads
  • Added "Time format" (timeFormat) and timeZone settings: 12-hour, 24-hour, 24-hour UTC, or a strftime pattern for the turn-end clock and transcript-view timestamps
  • Added a Containment Escape rule to auto mode so cloud metadata-credential fetches, egress evasion, and cross-tenant reach are no longer auto-approved unless your environment marks them expected
  • Added CLAUDE_CODE_SUBAGENT_MODEL_FORCE to apply CLAUDE_CODE_SUBAGENT_MODEL (or the main model) to every subagent, ignoring per-spawn and agent-definition model overrides
  • Added s in /effort to change effort for the current session only, matching /model
  • Added a /doctor warning for stale sandbox mask files left by a killed session
  • Added a one-time prompt in auto mode before the first file read outside the working directories, with the option to block such reads (permissions.blockReadsOutsideWorkingDirectories)
  • Added support for a gateway-supplied description on discovered /model picker entries (CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY); entries without one still read "From gateway"
  • Fixed settings in a .claude/ folder created after startup not being picked up until restart
  • Fixed sessions dispatched from an agent view opened with ← always starting in the original session's permission mode, overriding the target directory's defaultMode and the agent's permissionMode
  • Fixed keybindings.json rebinds of Ctrl+G being ignored in claude agents; its Ctrl+S / Ctrl+T are now rebindable via the new Agents context
  • Fixed background sessions failing to start on macOS npm installs during a self-update, and on Windows when a stale daemon lock file pointed at a reused process id
  • Fixed the working spinner stopping while a response streams behind a slash-command panel
  • Fixed a background session's state.json detail repeating its own dispatch prompt after a scheduled wake-up
  • Fixed claude agents keeping a background session you re-prompted buried in Completed after it finished again; Completed now orders by the latest finish
  • Fixed claude --bg from a directory that was just deleted reporting "backgrounded" and leaving a crashed session row; it now prints the reason and exits 1
  • Fixed Remote Control connecting mid-session re-sending the Bash tool definition, causing a prompt-cache miss
  • Fixed a doubly-listed custom Authorization header overriding the configured credential on Bedrock, Mantle, Vertex, and WIF, and the Vertex setup wizard picking up a leftover Anthropic profile from ~/.config/anthropic
  • Fixed Claude apps gateway sending stray host Authorization or profile headers to Foundry, Vertex, and Bedrock, and Foundry Entra ID upstreams not starting when ANTHROPIC_FOUNDRY_API_KEY is set
  • Fixed a leftover Anthropic API key or auth token being sent alongside your Foundry subscription key in API-key mode
  • Fixed /schedule routines whose prompt was saved without a message role and then ran with nothing to do
  • Fixed claude agents not saying that a background session is waiting for you to approve a message from another session, or who sent it
  • Fixed a prompt stashed with Ctrl+S inside an opened background session being lost when the session went idle or was stopped and then reopened
  • Fixed telemetry (OTEL) settings pushed through server-managed settings being ignored on warm starts, including desktop-app Code sessions
  • Fixed a teammate permission request being answered twice when the leader's mailbox write was briefly locked
  • Fixed a phantom duplicate slash-command row rendering below the in-flight turn while a command's auto-continued response streamed
  • Fixed policyHelper timeoutMs and refreshIntervalMs values above the timer maximum (2147483647) causing failures or re-runs every millisecond; they are now clamped
  • Fixed the token counter freezing or crawling after switching to another subagent's transcript, and made background subagents' and teammates' counters update live while a response streams
  • Fixed sandbox network hosts written with a trailing dot (example.com.): a deniedDomains entry didn't block the host inside the sandbox, and "don't ask again" for such a host kept prompting
  • Fixed dismissing the Remote Control consent prompt (Esc, or n at claude remote-control) counting as consent, so the next request connected without asking
  • Fixed /mcp reconnect and enable still connecting a settings-file MCP server that a managed MCP allow/deny list or strictPluginOnlyCustomization loaded after startup should block
  • Fixed claude mcp remove leaving a remote server's stored OAuth credentials behind when strictPluginOnlyCustomization locks MCP to plugin-only servers
  • Fixed Remote Control (claude remote-control) sessions started from the Claude app ignoring the selected model and running on the machine's default instead
  • Fixed --disallowedTools and session deny rules being dropped after the first settings reload when allowManagedPermissionRulesOnly is enabled
  • Fixed --resume listing a backgrounded conversation twice and --continue reopening its stalled pre-background copy; --continue now also opens finished background sessions
  • Fixed fullscreen mode not letting you click ! shell command output to expand it
  • Fixed background sessions left running an older Claude Code binary piling up across auto-updates instead of being retired
  • Fixed claude agents --json briefly switching the terminal to raw mode and undoing another program's terminal settings on exit
  • Fixed Proactive output style sessions busy-looping with filler messages and repeated log reads instead of idling while a background command or Monitor they started is still running
  • Fixed subagents stopping when a response was cut off mid-stream by a computer sleep, dropped connection, or server error; they now automatically continue instead of ending with an incomplete response
  • Fixed ← doing nothing in the /btw panel inside a claude agents session: it now returns to the agents list (even mid-answer), and the panel comes back when you reopen the session
  • Fixed sessions with an advisor model set missing the prompt cache on background requests (compaction, /recap, prompt suggestions) and re-sending the full conversation uncached each time
  • Fixed claude -p exiting about 5 seconds after its final result while a Monitor the model armed was still running; it now waits for the watch to fire or time out
  • Fixed a permissions.ask rule being skipped in auto mode when the matching command ran inside a compound command or subshell, letting it run without the confirmation prompt
  • Fixed plugins being able to read files outside their own directory through a declared command, agent, skill, hooks or other component path that is a symlink; such paths are now refused with an error
  • Fixed /add-dir rejecting a directory inside the current working directory; it now loads that directory's skills, commands, and agents like --add-dir does at startup
  • Fixed the main agent not being told when you resume a subagent you had stopped from its transcript view
  • Fixed a crash when pasting ANSI-colored text (e.g. a CI log) into dialogs like /feedback
  • Fixed claude mcp add/remove hanging or exhausting memory when the project's .mcp.json is a FIFO or a device-file symlink; it now fails fast with an actionable message
  • Fixed unbounded memory growth when non-JSONL data is piped into claude -p --input-format stream-json; it now fails fast with a clear error
  • Fixed backgrounding a turn (← or Ctrl+B) while a subagent or other tool was running occasionally making the background session treat that tool as rejected instead of re-running it
  • Fixed Bash Read()/Edit() deny rules not applying to < file redirects and reader commands like tac and egrep; a deny rule on any argument or redirect target now refuses the command
  • 新增 Claude Fable 5.1 (claude-fable-5-1),现已成为默认的 Fable 模型——支持 1M 上下文,每百万 token 价格分别为 $10/$50,缓存读取为 $0.25/百万 token
  • 新增“时间格式”(timeFormat)和时区设置:支持 12 小时制、24 小时制、24 小时 UTC 或 strftime 模式,用于会话结束时钟和转录视图的时间戳
  • 在自动模式中新增“越界逃逸”规则,除非你的环境将其标记为预期行为,否则不再自动批准云元数据凭证获取、出口规避和多租户访问操作
  • 新增 CLAUDE_CODE_SUBAGENT_MODEL_FORCE,将 CLAUDE_CODE_SUBAGENT_MODEL(或主模型)应用于所有子代理,忽略按生成和代理定义设置的模型覆盖
  • 在 /effort 后添加 s 以仅更改当前会话的算力消耗,与 /model 命令保持一致
  • 新增 /doctor 警告,用于检测被终止会话遗留的陈旧沙箱掩码文件
  • 在自动模式下,首次在工作目录之外读取文件前新增一次性提示,并提供阻止此类读取的选项(permissions.blockReadsOutsideWorkingDirectories)
  • 新增对网关提供的发现模型选择器条目描述的支持(CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY);没有描述的条目仍显示“来自网关”
  • 修复了启动后创建的 .claude/ 文件夹中的设置直到重启才会生效的问题
  • 修复了通过 ← 打开的代理视图分发的会话始终从原始会话的权限模式开始的问题,这会覆盖目标目录的 defaultMode 和代理的 permissionMode
  • 修复了 claude 代理中 keybindings.json 对 Ctrl+G 的重绑定被忽略的问题;其 Ctrl+S / Ctrl+T 现在可通过新的 Agents 上下文进行重绑定
  • 修复了 macOS npm 安装在自更新期间后台会话无法启动的问题,以及 Windows 上因陈旧守护进程锁文件指向重用进程 ID 导致的问题
  • 修复了响应在斜杠命令面板后方流式传输时工作旋转指示器停止转动的问题
  • 修复了后台会话的 state.json 详情在计划唤醒后重复显示其自身分发提示的问题
  • 修复了 claude 代理在你重新提示已完成再次完成的后台会话后,仍将其保留在“已完成”列表底部的问题;现在“已完成”列表按最新完成时间排序
  • 修复了从刚删除的目录运行 claude --bg 时报告“已后台化”并留下崩溃会话行的问题;现在它会打印原因并以退出码 1 退出
  • 修复了远程控制在中途连接时重新发送 Bash 工具定义,导致提示缓存未命中的问题
  • 修复了在 Bedrock、Mantle、Vertex 和 WIF 上,重复列出的自定义 Authorization 标头覆盖已配置的凭据的问题,以及 Vertex 设置向导拾取了 ~/.config/anthropic 中残留的 Anthropic 配置文件的问题。
  • 修复了 Claude 应用网关向 Foundry、Vertex 和 Bedrock 发送杂散的 host Authorization 或 profile 标头的问题,以及当设置 ANTHROPIC_FOUNDRY_API_KEY 时 Foundry Entra ID 上游未启动的问题。
  • 修复了在 API 密钥模式下,残留的 Anthropic API 密钥或身份验证令牌与您的 Foundry 订阅密钥一起发送的问题。
  • 修复了 /schedule 例程的问题:其提示词保存时未包含消息角色,随后运行时无事可做。
  • 修复了 claude 代理未说明后台会话正在等待您批准来自另一个会话的消息,或未说明该消息由谁发送的问题。
  • 修复了在打开的后台会话中使用 Ctrl+S 暂存的提示词,在会话空闲或被停止后重新打开时丢失的问题。
  • 修复了通过服务器管理设置推送的遥测(OTEL)设置在冷启动时被忽略的问题,包括桌面版 Code 会话。
  • 修复了当领导者的邮箱写入被短暂锁定时的队友权限请求被回答两次的问题。
  • 修复了在命令的自动续传响应流式传输期间,当前轮次下方渲染出幻影重复斜杠命令行的问题。
  • 修复了 policyHelper 的 timeoutMs 和 refreshIntervalMs 值超过定时器最大值(2147483647)导致失败或每毫秒重新运行的问题;现在这些值已被限制。
  • 修复了切换到另一个子代理的转录本后令牌计数器冻结或停滞的问题,并使后台子代理和队友的计数器在响应流式传输时实时更新。
  • 修复了使用尾随点(example.com.)写入的沙盒网络主机的问题:deniedDomains 条目未阻止沙盒内的主机,且对该主机的“不再询问”操作仍会持续提示。
  • 修复了关闭远程访问同意提示(按 Esc,或在 claude remote-control 时按 n)被计为同意的问題,导致下一个请求无需询问即可连接。
  • 修复了 /mcp reconnect 和 enable 仍连接到设置文件中的 MCP 服务器的问题,而该服务器应在启动后加载受管理的 MCP 允许/拒绝列表或 strictPluginOnlyCustomization 所阻止。
  • 修复了当 strictPluginOnlyCustomization 将 MCP 锁定为仅插件服务器时,claude mcp remove 留下远程服务器存储的 OAuth 凭据的问题。
  • 修复了从 Claude 应用启动的远程访问(claude remote-control)会话忽略所选模型并在机器默认模型上运行的问题。
  • 修复了当 enableManagedPermissionRulesOnly 启用时,--disallowedTools 和会话拒绝规则在首次设置重载后被丢弃的问题
  • 修复了 --resume 列出后台对话两次以及 --continue 重新打开其停滞的预后台副本的问题;--continue 现在也会打开已完成的后台会话
  • 修复了全屏模式下无法点击 ! shell 命令输出以展开它的问题
  • 修复了后台会话中遗留的运行着旧版 Claude Code 二进制文件的情况,这些会话在自动更新过程中不断堆积而非被清理
  • 修复了 claude agents --json 短暂地将终端切换到原始模式并在退出时撤销其他程序终端设置的问题
  • 修复了 Proactive 输出风格会话因填充消息和重复日志读取而忙循环,而不是在它们启动的后台命令或 Monitor 仍在运行时处于空闲状态的问题
  • 修复了子代理在响应因计算机睡眠、连接中断或服务器错误而在流中间被截断时停止运行的问题;现在它们会自动继续运行,而不是以不完整的响应结束
  • 修复了 claude agents 会话内的 /btw 面板中 ← 键无效的问题:现在它会返回到代理列表(即使在回答中途),并且当你重新打开会话时该面板会再次出现
  • 修复了设置了顾问模型的会话在后台请求(压缩、/recap、提示建议)中缺少提示缓存,并每次未缓存地重新发送完整对话的问题
  • 修复了 claude -p 在其最终结果输出后约 5 秒退出的问题,尽管模型武装的 Monitor 仍在运行;现在它会等待监视器触发或超时
  • 修复了在自动模式下,当匹配的命令在复合命令或子shell中运行时 permissions.ask 规则被跳过,使其无需确认提示即可运行的问题
  • 修复了插件能够通过声明的命令、代理、技能、hooks 或其他组件路径(如果是符号链接)读取其自身目录之外的文件的问题;现在此类路径会被拒绝并报错
  • 修复了 /add-dir 拒绝当前工作目录内目录的问题;现在它会加载该目录的技能、命令和代理,就像启动时的 --add-dir 一样
  • 修复了主代理在你从其转录视图恢复已停止的子代理时未被通知的问题
  • 修复了将 ANSI 彩色文本(例如 CI 日志)粘贴到 /feedback 等对话框中时崩溃的问题
  • 修复了当项目的 .mcp.json 是 FIFO 或设备文件符号链接时,claude mcp add/remove 挂起或耗尽内存的问题;现在它会快速失败并显示可操作的消息
  • 修复了当非 JSONL 数据通过管道输入到 claude -p --input-format stream-json 时出现的无界内存增长问题;现在会快速失败并显示清晰的错误信息
  • 修复了在子代理或其他工具运行时后台化一个回合(← 或 Ctrl+B)的问题,该问题偶尔会导致后台会话将该工具视为被拒绝而非重新运行
  • 修复了 Bash Read()/Edit() 的拒绝规则未应用于 < 文件重定向以及 tac 和 egrep 等读取命令的问题;现在对任何参数或重定向目标设置的拒绝规则都会拒绝该命令

更进一步:量化金融体系

看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力

进入量化体系 →

关联讨论

同一事件的更多信源

相似阅读

另一事件,读法相近