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

Claude Code v2.1.277:新增 AGENTS.md 支持与网关代理配置

v2.1.277

原文
发到 X
推荐理由

AGENTS.md 支持改变了项目指令加载范式,网关代理配置对重度用户网络环境至关重要,建议立即升级以获取新能力并修复大量破坏性 Bug。

What's changed

变更内容

  • Added AGENTS.md support: in a project with no CLAUDE.md, Claude Code reads AGENTS.md instead; change it under "Project instructions" in /config (not yet on Bedrock, Vertex or Foundry)
  • Added CLAUDE_GATEWAY_PROXY_IS_EGRESS_BOUNDARY=1 for Claude apps gateways whose only egress is a forward proxy: every outbound request hands the proxy the hostname instead of resolving it locally
  • Added an optional headers: map on Claude apps gateway upstreams, to send static headers to a proxy you run in front of a provider
  • Added a line saying a background task's update is waiting when it finishes while a panel such as /tasks is open
  • Fixed claude -p and Agent SDK sessions that could hang with no result after an internal error; they now report the error and exit with code 1
  • Fixed conversations failing every request with "text content blocks must be non-empty" when an earlier assistant turn held an empty text block beside other content, including after --resume
  • Fixed being unexpectedly logged out when an older Claude Code build (for example an IDE extension's bundled CLI) runs on the same machine as the current one
  • Fixed interactive start-up hanging or showing an error for ANTHROPIC_API_KEY users when ~/.claude.json holds a malformed customApiKeyResponses value
  • Fixed update checks erroring every 30 minutes, and claude update hanging when a minimum or maximum version is set, if a proxy returns an invalid version; a malformed minimumVersion is now ignored
  • Fixed claude update on winget- or apk-managed installs reporting "up to date" when the version lookup failed
  • Fixed claude plugin install sometimes failing and breaking the installed copy when reinstalling a plugin version that a session or another program was using; an unchanged copy is now left alone
  • Fixed Grep and Glob reporting no matches when the search could not start because the system was out of processes, memory or file handles; they now return an error saying so
  • Fixed the Write tool silently ending the turn as a declined permission when the target path is an existing directory; it now reports a clear error
  • Fixed the Edit tool treating an escaped backslash followed by uXXXX text as a \uXXXX escape, which could make an edit of a non-ASCII character rewrite an escaped backslash sequence instead
  • Fixed the Edit tool reporting "Invalid regular expression: regular expression too large" instead of "String not found in file" when a very large edit containing non-ASCII text did not match the file
  • Fixed a turn ending early with "Path contains null bytes" when a tool call's file path contained \u0000 written as an escape sequence; escaped control characters now stay as literal text
  • Fixed background sessions (claude --bg) exiting when a plugin's LSP server exited or closed its stdin
  • Fixed a crash ("Type error") when opening /mcp or /plugin manage with a malformed claudeAiMcpEverConnected value in ~/.claude.json
  • Fixed a crash at launch when ~/.claude.json holds a malformed theme value
  • Fixed a crash ("unrecoverable interface error") when the prompt held text containing terminal color codes, for example a prompt recalled from history or text loaded from the external editor
  • Fixed a crash when resuming a session whose saved history holds an assistant message stored as a plain string
  • Fixed sessions on slow or heavily loaded machines sometimes exiting with "Claude Code exited after an unrecoverable interface error" when the first spinner appeared
  • Fixed a rare case where the screen could stop updating for the rest of the session after an internal rendering error
  • Fixed a rare case on Windows where a turn could stop with an error such as "Out of memory" right after Claude replied, so that reply's tool calls never ran
  • Fixed sessions continued after /clear (restart, --continue, --resume) missing part of their first message when a SessionStart hook printed output, causing a full prompt-cache miss
  • Fixed messages from other agents (such as a subagent's SendMessage) that arrived mid-turn showing up below the "Ran N shell commands" row instead of where they arrived
  • Fixed the "copied" notice not appearing after drag-selecting text in the fullscreen /resume picker and other panels that cover the prompt area
  • Fixed $TMPDIR expanding empty in Bash commands that run outside the sandbox while sandboxing is enabled
  • Fixed WebFetch and WebSearch in Cowork cloud sessions not telling Claude why a request was refused, such as a used-up fetch budget or an admin policy
  • Fixed the Claude apps gateway's telemetry relay ignoring a collector hostname or domain listed in NO_PROXY when a proxy is set
  • Fixed one malformed strictKnownMarketplaces or blockedMarketplaces entry silently disabling the whole enterprise marketplace policy
  • Fixed failed auto-updates leaving large staged downloads behind in ~/.cache/claude/staging
  • Fixed /plugin not stripping terminal control characters from messages on the Installed tab, such as the error of a failed plugin update
  • Fixed /plugin → Installed and /skills crashing when a skill or legacy command is named like a built-in Object property such as constructor or toString
  • Fixed /plugin closing with no message when every install in a multi-select failed
  • Fixed uninstalled plugins reappearing as "failed to load" rows in /plugin Installed, and Remove not clearing such a row
  • Fixed plugins from the official marketplace being recorded without their commit in installed_plugins.json, and installed_plugins.json keeping the old commit after updating a pinned-commit plugin
  • Fixed plugin reload previews keeping every previewed copy of a plugin archive unpacked until exit, and overwriting the cached --plugin-url archive a reload falls back to when its download fails
  • Fixed Remote Control session bookkeeping failing when ~/.claude.json holds a malformed placeholder record
  • Fixed the error after a revoked claude.ai login blaming an expired Anthropic profile; it now leads with /login
  • Fixed typed or pasted text occasionally coming out scrambled in the claude agents dispatch input during key repeat or very fast input
  • Fixed a crash ("unrecoverable interface error") when resuming a session whose saved transcript contains a stop hook summary without a well-formed hook list
  • Fixed Enter on a selected agent panel row doing nothing when keybindings.json rebinds Enter in the Chat context, for example to chat:queueSubmit
  • Fixed PDF page reads on Windows failing when the working folder's path is long (about 120 characters or more)
  • Fixed a headless resume (claude -p --resume, the SDK, a VS Code extension window reload) starting the session's cost and usage totals at zero; headless sessions now save their totals at exit
  • Fixed project skills from the main repository not loading in --worktree sessions when .claude/skills is untracked
  • Fixed a sandbox.excludedCommands glob exempting an entire compound Bash command from the sandbox when only one part matched; every part must now match
  • Fixed resumed subagents and teammates re-rendering the MCP tool definitions they had loaded, which broke prompt caching for that agent
  • Fixed rate-limited artifact publishes telling Claude to stop retrying; Claude is now told nothing was published and when to send the same publish again
  • Fixed attachments recorded earlier in a conversation being re-rendered after a resume or relaunch, which dropped extended thinking and missed the prompt cache
  • Fixed Console sign-in showing only "Request failed with status code 400" when the server refuses to create an API key; it now shows the server's message
  • Fixed messages typed while Claude is still working sometimes being ignored by the model
  • Improved session start-up for SDK and headless (-p) use: the first turn no longer waits on the per-directory CLAUDE.md lookup
  • Improved the Claude apps gateway's loopback error messages to name CLAUDE_GATEWAY_ALLOW_LOOPBACK
  • 新增 AGENTS.md 支持:在项目中没有 CLAUDE.md 时,Claude Code 会读取 AGENTS.md;可在 /config 的“项目指令”中修改(目前尚未在 Bedrock、Vertex 或 Foundry 上支持)
  • 新增 CLAUDE_GATEWAY_PROXY_IS_EGRESS_BOUNDARY=1,用于仅通过正向代理进行出站流量的 Claude 应用网关:所有出站请求会将主机名交给代理处理,而非本地解析
  • 为 Claude 应用网关上游新增了可选的 headers: map,用于向运行在提供商前面的代理发送静态头信息
  • 当后台任务完成且面板(如 /tasks)处于打开状态时,新增一行提示显示该任务的更新正在等待中
  • 修复了 claude -p 和 Agent SDK 会话在内部错误后可能挂起且无结果的问题;现在它们会报告错误并以退出码 1 退出
  • 修复了在早期助手轮次中存在空文本块与其他内容并存的情况下(包括 --resume 之后),每次请求都因“文本内容块必须非空”而失败的问题
  • 修复了当旧版 Claude Code 构建版本(例如 IDE 扩展捆绑的 CLI)与当前版本在同一台机器上运行时导致意外登出的问题
  • 修复了当 ~/.claude.json 中包含格式错误的 customApiKeyResponses 值时,ANTHROPIC_API_KEY 用户交互式启动时出现挂起或报错的问题
  • 修复了当代理返回无效版本时,每 30 分钟检查更新出错以及设置最小或最大版本时 claude update 挂起的问题;现在忽略格式错误的 minimumVersion
  • 修复了在使用 winget 或 apk 管理的安装中,当版本查询失败时 claude update 仍报告“已是最新版本”的问题
  • 修复了重新安装会话或其他程序正在使用的插件版本时,claude plugin install 有时会失败并破坏已安装副本的问题;现在保持不变的安装副本将不受影响
  • 修复了当系统进程、内存或文件句柄耗尽导致搜索无法开始时,Grep 和 Glob 报告无匹配项的问题;现在它们会返回相应的错误提示
  • 修复了 Write 工具在目标路径为现有目录时静默结束轮次并视为权限被拒绝的问题;现在它会报告清晰的错误信息
  • 修复了 Edit 工具将转义反斜杠后跟 uXXXX 文本误识别为 \uXXXX 转义序列的问题,这可能导致对非 ASCII 字符的编辑错误地重写转义反斜杠序列
  • 修复了当包含非 ASCII 文本的大型编辑未匹配文件时,Edit 工具报告“无效正则表达式:正则表达式过大”而非“文件中未找到字符串”的问题
  • 修复了在工具调用的文件路径中包含以转义序列形式书写的 \u0000(即包含空字节)时,回合过早结束并显示“Path contains null bytes”的问题;现在转义的控制字符将保留为字面文本
  • 修复了当插件的 LSP 服务器退出或关闭其 stdin 时,后台会话(claude --bg)退出的问题
  • 修复了在 ~/.claude.json 中存在格式错误的 claudeAiMcpEverConnected 值时,打开 /mcp 或 /plugin manage 会崩溃(显示“Type error”)的问题
  • 修复了当 ~/.claude.json 中存在格式错误的 theme 值时,启动阶段发生崩溃的问题
  • 修复了当提示词包含终端颜色代码(例如从历史记录中 recalled 的提示词或从外部编辑器加载的文本)时,发生崩溃(显示“unrecoverable interface error”)的问题
  • 修复了恢复会话时的崩溃问题,该会话的保存历史中包含以纯字符串形式存储的助手消息
  • 修复了在缓慢或高负载机器上,当第一个旋转加载图标出现时,会话有时会因“Claude Code exited after an unrecoverable interface error”而退出的问题
  • 修复了一种罕见情况:在内部渲染错误发生后,屏幕可能在剩余会话时间内停止更新
  • 修复了 Windows 上的一种罕见情况:在 Claude 回复后不久,回合可能因“Out of memory”等错误而停止,导致该回复中的工具调用从未执行
  • 修复了在执行 /clear(重启、--continue、--resume)后继续的会话,若 SessionStart 钩子打印了输出,会导致其第一条消息缺失部分内容的問題,从而引发完整的 prompt-cache 未命中
  • 修复了其他代理的消息(例如子代理的 SendMessage)在中途到达时,显示在“Ran N shell commands”行下方而非实际到达位置的问题
  • 修复了在全屏 /resume 选择器及其他覆盖提示区域的面板中拖拽选择文本后,“copied”提示不出现的问题
  • 修复了在启用沙箱的情况下,运行于沙箱外的 Bash 命令中 $TMPDIR 展开为空值的问题
  • 修复了 Cowork 云会话中的 WebFetch 和 WebSearch 未告知 Claude 请求被拒绝的原因(例如抓取预算耗尽或管理员策略限制)的问题
  • 修复了当设置了代理时,Claude 应用网关的遥测中继忽略 NO_PROXY 中列出的收集器主机名或域名的问題
  • 修复了一个格式错误的 strictKnownMarketplaces 或 blockedMarketplaces 条目静默禁用整个企业市场策略的问题
  • 修复了自动更新失败时在 ~/.cache/claude/staging 留下大量暂存下载文件的问题
  • 修复了 /plugin 在 Installed 选项卡中未从消息中剥离终端控制字符的问题,例如未能处理插件更新失败的错误信息
  • 修复了 /plugin → Installed 和 /skills 在技能或旧版命令名称与内置 Object 属性(如 constructor 或 toString)相同时崩溃的问题
  • 修复了当多选中的所有安装均失败时,/plugin 关闭且不显示任何消息的问题
  • 修复了已卸载的插件在 /plugin Installed 中重新显示为“加载失败”行,且 Remove 无法清除此类行的问题
  • 修复了来自官方市场的应用程序在安装到 installed_plugins.json 时未记录其提交信息,以及在更新固定提交版本的应用程序后 installed_plugins.json 仍保留旧提交信息的问题
  • 修复了应用程序重载预览在退出前一直保留每个预览副本的解包状态,以及在下载失败时覆盖缓存的 --plugin-url 归档文件作为重载回退目标的问题
  • 修复了当 ~/.claude.json 包含格式错误的占位符记录时,远程控制会话记账失败的问题
  • 修复了撤销 claude.ai 登录后出现的错误归咎于过期的 Anthropic 配置文件;现在该错误会优先引导至 /login
  • 修复了在按键重复或极快输入期间,键入或粘贴的文本偶尔在 claude agents dispatch 输入中乱序输出的问题
  • 修复了恢复包含无结构良好钩子列表的停止钩子摘要的保存转录的会话时发生的崩溃("不可恢复的界面错误")
  • 修复了当 keybindings.json 在 Chat 上下文中重新绑定 Enter(例如绑定到 chat:queueSubmit)时,在选定的代理面板行上按 Enter 无响应的问题
  • 修复了当工作文件夹路径较长(约 120 个字符或更多)时,Windows 上的 PDF 页面读取失败的问题
  • 修复了无头恢复(claude -p --resume、SDK、VS Code 扩展窗口重载)将会话的成本和使用总量初始化为零的问题;现在无头会话会在退出时保存其总量
  • 修复了当 .claude/skills 未被跟踪时,主仓库中的项目技能未在 --worktree 会话中加载的问题
  • 修复了 sandbox.excludedCommands glob 在仅部分匹配时豁免整个复合 Bash 命令进入沙箱的问题;现在必须所有部分都匹配才能豁免
  • 修复了恢复的子代理和队友重新渲染其已加载的 MCP 工具定义,从而导致该代理的提示缓存失效的问题
  • 修复了速率限制的工件发布告知 Claude 停止重试的问题;现在告知 Claude 未发布任何内容以及何时再次发送相同的发布请求
  • 修复了对话早期记录的附件在恢复或重新启动后重新渲染,导致丢失扩展思维并错过提示缓存的问题
  • 修复了当服务器拒绝创建 API 密钥时,控制台登录仅显示“请求失败,状态码为 400”的问题;现在会显示服务器的消息
  • 修复了在 Claude 仍在处理时输入的消息有时会被模型忽略的问题
  • 改进了 SDK 和无头模式(-p)使用的会话启动:首轮交互不再等待基于目录的 CLAUDE.md 查找
  • 改进了 Claude 应用网关的回环错误消息,以指明 CLAUDE_GATEWAY_ALLOW_LOOPBACK

更进一步:量化金融体系

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

进入量化体系 →

相似阅读

关联信息,但可能不是同一事件