跳到主内容
@wquguru
精选75Claude Code(GitHub Releases)AI 编程与模型

Claude Code v2.1.243:新增 /usage 循环分解、模型选择器自定义

v2.1.243

原文
发到 X

What's changed

变更内容

  • Added a Loops breakdown to /usage: per-loop run count, total tokens, tokens per run, and last run, so runaway or chatty /loop tasks are easy to spot
  • Added modelPicker setting: curate the /model picker with an ordered, labeled list of models (any id spelling, including Vertex/Bedrock ids), appended to or replacing the built-in lineup
  • Added promptCacheTtl and subagentPromptCacheTtl settings so API-key and cloud-provider users can keep a 1-hour prompt cache on the main conversation while subagents stay at 5 minutes
  • Added modelPricing managed setting so an organization's contracted per-model rates and discount multiplier are used for /cost, the status line, and telemetry cost figures instead of list price
  • Added a keyless sign-in under /login → Anthropic Console: "Sign in with your Console account" (recommended) alongside creating an API key, so organizations that don't allow API keys can sign in
  • Added a Skipped sources line to /status that lists managed settings sources (for example managed-settings.json) present but not applied because a higher-precedence managed source is active
  • Added a managed marker in /mcp and /plugins on claude.ai connectors whose authentication is managed by your organization
  • Added a tip pointing claude.ai users who haven't connected GitHub for Claude Code on the web to /web-setup
  • Added a /status line showing whether GitHub is connected for Claude Code on the web (Pro/Max), pointing to /web-setup when it isn't
  • Added the model (and effort level) each subagent ran on to /tasks and the agent detail dialogs
  • Fixed remote MCP servers in non-interactive (-p) and SDK sessions never recovering after a dropped connection; they now reconnect automatically or report as failed
  • Fixed MCP server sign-in started from the desktop app failing with "Invalid redirect URI" on servers that support client ID metadata documents (for example Linear)
  • Fixed auto mode staying unavailable at startup when a temporary server-side disable was cached and later flag fetches failed
  • Fixed auto mode tool calls being denied as "temporarily unavailable" after about a minute of waiting when the API was briefly overloaded and asked the client to retry
  • Fixed the /model picker silently ignoring an Ultracode selection; picking Ultracode now applies it to the current session
  • Fixed /resume only listing the 50 most recent sessions; the picker now loads more as you scroll
  • Fixed cloud sessions resuming after a mid-turn restart with a pending hook or background-task notification re-sent as the prompt instead of the normal continuation message
  • Fixed cross-session messaging silently turning off inside user namespaces and rootless containers after the 2.1.232 socket-directory hardening
  • Fixed text that hangs outside its container (for example the sign-in URL in /login) losing its leading columns when another part of the screen repaints
  • Fixed spellcheck not underlining a misspelled word typed directly after an emoji
  • Fixed background subagents not waking when their last background Bash task completes
  • Fixed sessions going silent for 10+ minutes when the Anthropic API never starts a response: the request now times out after ~3 minutes, retries once, then shows API Error: No response from API
  • Fixed auth, model-availability, and other client-generated error messages rendering like model output instead of as error lines
  • Fixed workload identity federation in CI: processes in one job share the exchanged token instead of re-exchanging the single-use token; a rejected exchange fails fast with the server's message
  • Fixed server-managed companyAnnouncements not showing at startup in a session that began with signing in (for example the first launch after /logout)
  • Fixed hook if conditions like Bash(cat *) firing on unrelated Bash commands when the command contained $() or backtick command substitution followed by more arguments
  • Fixed plugin dependencies declared with a marketplace field never resolving when both plugins are loaded together via --plugin-dir
  • Fixed /reload-plugins keeping the LSP tool after the last LSP plugin is disabled; it now also warns before an LSP plugin change that would re-read the conversation
  • Fixed --agents silently ignoring invalid JSON or invalid agent definitions; it now exits with a clear error, like --mcp-config
  • Fixed /status showing "Found invalid entries in: ." with no filename when ~/.claude.json has an invalid MCP server entry
  • Fixed /clear removing the /rename session name from the prompt bar even though the name was kept for the new session
  • Fixed Ctrl+R history search and up-arrow history breaking when ~/.claude/history.jsonl contains a malformed entry
  • Fixed Ctrl+[ not leaving vim INSERT mode in terminals that encode modified keys (modifyOtherKeys / kitty protocol)
  • Fixed the local IDE connection being routed through HTTPS_PROXY (and sometimes failing) when localhost was listed in NO_PROXY but not lowercase no_proxy; both casings are now honored
  • Fixed sandbox network-violation details being dropped from the Bash tool result when the blocked command still exited 0 (for example curl printing the proxy's 403 page)
  • Fixed the status line rate_limits fields and /usage still showing a rate-limit window's pre-reset usage percentage after the window reset while the session was idle
  • Fixed claude --teleport <session> exiting on uncommitted changes instead of offering to stash them and continue, as the session picker already does
  • Fixed /web-setup repeatedly asking you to log in when an older GitHub CLI (without gh auth token) was already authenticated
  • Fixed Claude in Chrome losing its connection to Claude Code after an auto-update cleaned up the version it was set up with; the native host now launches via the stable claude launcher
  • [VSCode] Fixed sessions started before feature flags were first fetched (for example right after install) opening in the default permission mode instead of auto mode or your configured default mode
  • [VSCode] Fixed Focus view sections you expanded collapsing on their own during subagent tool activity
  • Improved startup time: sandbox and MCP bring-up no longer block the first frame, bare launches skip subcommand registration, and workflow discovery, settings, and trust-store work is cheaper
  • Improved native install and auto-update download size: the binary is now zstd-compressed (about 75 MB instead of 340 MB on Linux x64)
  • Improved attribution of usage telemetry to your organization for sessions that authenticate with ANTHROPIC_AUTH_TOKEN directly against the Anthropic API, so its data-handling settings apply
  • Improved native binary size: about 2 MB smaller by storing the bundled skill and prompt text more compactly
  • Improved memory usage of native builds: code is now loaded on demand instead of keeping the whole bundle resident (roughly 40–70 MB less memory per session)
  • Improved peak memory usage in long-running sessions (the runtime now garbage-collects sooner as the heap grows)
  • Improved /login over SSH: the sign-in URL appears immediately, pressing c reports how the URL was copied instead of always claiming success, and a hint explains how to select text in fullscreen
  • Improved the error when effort xhigh/max is used with thinking turned off: it now names the level, the setting that disabled thinking, and /effort high as the fix
  • Improved /loop: consecutive wake-ups where Claude has nothing to do now fold into a single line in the terminal instead of printing each one
  • Changed the sandboxed Bash tool prompt to no longer list allowed network hosts, so Claude attempts requests (and you can approve new hosts) instead of assuming unlisted hosts are blocked
  • Updated the /model picker and the bundled claude-api skill to show Sonnet 5's $2/$10 per Mtok pricing as its standard list price rather than a limited-time promo
  • 在 /usage 中新增了循环(Loops)细分:每个循环的运行次数、总令牌数、每次运行的令牌数以及上次运行时间,便于发现失控或过于频繁的 /loop 任务。
  • 新增 modelPicker 设置:通过有序、带标签的模型列表来管理 /model 选择器(支持任意 ID 拼写,包括 Vertex/Bedrock ID),可附加到内置列表或替换内置列表。
  • 新增 promptCacheTtl 和 subagentPromptCacheTtl 设置,使 API 密钥和云服务提供商用户可以在主对话中保留 1 小时的提示缓存,而子代理保持 5 分钟。
  • 新增 modelPricing 托管设置,使组织的合同模型费率和折扣倍数用于 /cost、状态行和遥测成本数据,而非列表价格。
  • 在 /login → Anthropic Console 下新增无密钥登录:“使用您的 Console 账户登录”(推荐),与创建 API 密钥并列,使不允许 API 密钥的组织可以登录。
  • 在 /status 中新增“跳过的来源”行,列出存在但未应用的托管设置来源(例如 managed-settings.json),因为更高优先级的托管来源处于活动状态。
  • 在 /mcp 和 /plugins 中为 claude.ai 连接器新增托管标记,这些连接器的身份验证由您的组织管理。
  • 新增提示,引导尚未为 Claude Code 网页版连接 GitHub 的 claude.ai 用户访问 /web-setup。
  • 在 /status 中新增一行,显示 Claude Code 网页版(Pro/Max)是否已连接 GitHub,未连接时指向 /web-setup。
  • 在 /tasks 和代理详情对话框中新增每个子代理运行的模型(及努力级别)信息。
  • 修复了非交互式(-p)和 SDK 会话中远程 MCP 服务器在连接断开后无法恢复的问题;现在它们会自动重新连接或报告失败。
  • 修复了从桌面应用启动 MCP 服务器登录时,在支持客户端 ID 元数据文档(例如 Linear)的服务器上出现“无效的重定向 URI”错误的问题。
  • 修复了启动时自动模式不可用的问题,当临时服务器端禁用被缓存且后续标志获取失败时,自动模式现在可以正常使用。
  • 修复了自动模式工具调用在 API 短暂过载并要求客户端重试后,等待约一分钟后被拒绝为“暂时不可用”的问题。
  • 修复了 /model 选择器静默忽略 Ultracode 选择的问题;现在选择 Ultracode 会将其应用于当前会话。
  • 修复了 /resume 仅列出最近 50 个会话的问题;现在选择器在滚动时会加载更多会话。
  • 修复了在回合中途重启后,带有待处理钩子或后台任务通知的固定云会话恢复时,将通知重新作为提示而非正常继续消息发送的问题。
  • 修复了在2.1.232套接字目录加固后,用户命名空间和根less容器内跨会话消息传递被静默关闭的问题。
  • 修复了当屏幕其他部分重绘时,容器外溢出的文本(例如/login中的登录URL)丢失其前导列的问题。
  • 修复了在表情符号后直接输入拼写错误的单词时,拼写检查不显示下划线的问题。
  • 修复了后台子代理在其最后一个后台Bash任务完成后不唤醒的问题。
  • 修复了当Anthropic API从未开始响应时,会话静默超过10分钟的问题:现在请求约3分钟后超时,重试一次,然后显示“API错误:API无响应”。
  • 修复了认证、模型可用性及其他客户端生成的错误消息以模型输出而非错误行的形式渲染的问题。
  • 修复了CI中的工作负载身份联合:一个作业中的进程共享交换的令牌,而不是重新交换单次使用令牌;拒绝的交换会快速失败并显示服务器消息。
  • 修复了以登录开始的会话(例如/logout后的首次启动)中,服务器管理的companyAnnouncements在启动时不显示的问题。
  • 修复了当命令包含$()或反引号命令替换后跟更多参数时,钩子条件如Bash(cat *)在无关的Bash命令上触发的问题。
  • 修复了通过--plugin-dir同时加载两个插件时,声明了marketplace字段的插件依赖从未解析的问题。
  • 修复了/reload-plugins在最后一个LSP插件被禁用后仍保留LSP工具的问题;现在在LSP插件更改会重新读取对话之前也会发出警告。
  • 修复了--agents静默忽略无效JSON或无效代理定义的问题;现在会像--mcp-config一样以清晰的错误退出。
  • 修复了当~/.claude.json包含无效的MCP服务器条目时,/status显示“找到无效条目:.”但没有文件名的问题。
  • 修复了/clear从提示栏移除/rename会话名称,即使该名称被保留用于新会话的问题。
  • 修复了当~/.claude/history.jsonl包含格式错误的条目时,Ctrl+R历史搜索和上箭头历史记录中断的问题。
  • 修复了在编码修改键(modifyOtherKeys / kitty协议)的终端中,Ctrl+[无法退出vim插入模式的问题。
  • 修复了当localhost在NO_PROXY中但不在小写的no_proxy中时,本地IDE连接被路由通过HTTPS_PROXY(有时失败)的问题;现在两种大小写都会被识别。
  • 修复了当被阻止的命令仍然以退出码0结束时(例如curl打印代理的403页面),沙箱网络违规详情从Bash工具结果中丢失的问题。
  • 修复了状态行中的rate_limits字段和/usage在窗口重置后、会话空闲时仍显示重置前使用率百分比的问题。
  • 修复了claude --teleport <session>在存在未提交更改时退出,而不是像会话选择器那样提供暂存并继续的选项。
  • 修复了当旧版GitHub CLI(没有gh auth token)已认证时,/web-setup反复要求登录的问题。
  • 修复了Chrome中的Claude在自动更新清理其设置版本后失去与Claude Code连接的问题;现在原生主机通过稳定的claude启动器启动。
  • [VSCode] 修复了在首次获取功能标志之前启动的会话(例如安装后立即启动)以默认权限模式打开,而不是自动模式或配置的默认模式的问题。
  • [VSCode] 修复了在子代理工具活动期间,您展开的Focus视图部分自行折叠的问题。
  • 改进了启动时间:沙箱和MCP启动不再阻塞首帧,裸启动跳过子命令注册,工作流发现、设置和信任存储的工作更轻量。
  • 改进了原生安装和自动更新的下载大小:二进制文件现在使用zstd压缩(在Linux x64上约75 MB,而不是340 MB)。
  • 改进了直接使用ANTHROPIC_AUTH_TOKEN对Anthropic API进行认证的会话的使用遥测归属到您的组织,以便其数据处理设置生效。
  • 改进了原生二进制文件大小:通过更紧凑地存储捆绑的技能和提示文本,减小了约2 MB。
  • 改进了原生构建的内存使用:现在按需加载代码,而不是保持整个捆绑包驻留(每个会话大约减少40-70 MB内存)。
  • 改进了长时间运行会话的峰值内存使用(运行时现在随着堆增长更早进行垃圾回收)。
  • 改进了通过SSH的/login:登录URL立即出现,按c报告URL如何复制而不是总是声称成功,并添加提示解释如何在全屏中选择文本。
  • 改进了在关闭思考功能时使用 effort xhigh/max 的错误提示:现在会明确指出级别、禁用思考的设置,以及 /effort high 作为修复方法
  • 改进了 /loop:当 Claude 连续唤醒但无事可做时,现在会在终端中合并为一行显示,而不是逐行打印
  • 更改了沙盒 Bash 工具提示,不再列出允许的网络主机,因此 Claude 会尝试请求(您可以批准新主机),而不是假设未列出的主机被阻止
  • 更新了 /model 选择器和捆绑的 claude-api 技能,以显示 Sonnet 5 的 $2/$10 每百万 token 定价作为其标准标价,而非限时促销

更进一步:量化金融体系

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

进入量化体系 →

相似阅读

另一事件,读法相近