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

Claude Code v2.1.268:修复第三方兼容端点HTTP

v2.1.268

原文
发到 X
推荐理由

使用第三方 Anthropic 兼容端点的开发者必须升级以解决 HTTP 400 报错;同时修复了可能导致安全规则被绕过的严重漏洞,建议尽快迁移至 v2.1.268。

What's changed

变更内容

  • Added to the Claude apps gateway: with pricing: set in gateway.yaml, signed-in Claude Code clients receive the same rates through managed settings, so /cost and telemetry match the spend meter
  • Added a startup warning for gateways when access_control.allow_cidrs is empty, and a one-time warning the first time a request arrives from a public address
  • Added the gatewayInternalNetworks managed setting, letting administrators allow /login to a Claude apps gateway on their organization's own public IPv4 block
  • Added claude self-hosted-runner --remove-session-state (default off): delete each session's per-session directories under <base-dir>/_sessions/ when the session ends
  • Added configDirectory to the output of claude auth status --json
  • Added --json to claude plugin install, uninstall, update, enable and disable, and errorDetails/noteDetails to each row of claude plugin list --json
  • Added browser-tab icons for published artifacts, chosen by Claude to match each page
  • Fixed every turn failing with HTTP 400 on third-party Anthropic-compatible endpoints (ANTHROPIC_BASE_URL) since 2.1.265: a regex in the Artifact tool's input schema that those endpoints reject
  • Fixed WebFetch hanging indefinitely on a server that keeps the response open without finishing; a fetch now fails after 300 seconds. Set CLAUDE_CODE_WEBFETCH_DEADLINE_MS to override the deadline (0 turns it off)
  • Fixed a respawned in-process teammate picking up tools or a system prompt from a same-named agent file in a folder you have not trusted
  • Fixed sustained high CPU usage: a busy loop in long-running idle sessions no longer pins a CPU core, and rapid terminal focus reports during a session recap no longer keep the CPU high
  • Fixed Claude sometimes replying "your message came through empty" after an MCP tool call
  • Fixed deny and ask permission rules on symlinked directories (/etc, /tmp, /var on macOS; /bin on Linux) not applying when a path was given by its real location, and Bash commands ignoring deny rules written on a symlinked path spelling
  • Fixed a case where a Read or Edit deny rule did not apply when an env -C, eval or similar command the permission checker cannot analyze was on the same line
  • Fixed plugin and marketplace errors showing a token or password from a git source URL
  • Fixed /mcp and /plugin server details, claude mcp list/get, and MCP login errors showing secrets resolved from ${VAR} placeholders in MCP configs
  • Fixed prompt caching and extended thinking breaking mid-session for SDK sessions using excludeDynamicSections: the first message is no longer re-rendered each request
  • Fixed entitled users being told a model is restricted after restart or in the Desktop Code tab when a cached model-access denial was stale
  • Fixed a running session silently switching to the organization's default model when another Claude Code process refreshed a stale model-access entry
  • Fixed long-context 429s on Fable models showing the usage-credits consent prompt instead of the 1M-context message on Pro and Team plans
  • Fixed workload identity federation via a profile (as claude-code-action configures it): processes sharing the profile could fail mid-run with 401 … jti reused
  • Fixed MCP server OAuth sign-in failing with "No available ports for OAuth redirect" when the local callback port range can't be bound
  • Fixed the conversation summary produced by /compact and auto-compact mangling text that contained $ sequences
  • Fixed resuming a conversation that ended with /compact: its restored-file notes now load in the same order on every resume
  • Fixed SDK prompt suggestions, side questions and /rename sending the conversation from before a compaction
  • Fixed @ file and / command suggestions not appearing after recalling a previous prompt with the up arrow and editing it
  • Fixed claude agents: pressing ← again at a natural pace to go back to the agent list no longer gets ignored until you pause for over a second
  • Fixed claude agents session delete getting stuck when a worktree can't be removed: the message names the cause and next step, and for a git worktree ctrl+x again deletes the directory anyway
  • Fixed background agent and workflow rows in the agents panel expanding to many lines when their text contained line breaks
  • Fixed Claude in Slack sessions losing their Slack tools when org managed settings set an MCP allowlist
  • Fixed Claude in Chrome asking to allow the host "https" when a navigation URL had a scheme but a host that could not be parsed
  • Fixed the spinner wrapping onto several lines when the current task's label is long; the label and the "Next:" task line now stay within one terminal row
  • Fixed the /bug and /feedback description field showing no cursor when the terminal's native cursor is enabled
  • Fixed Remote Control sessions served by claude remote-control showing a generated name instead of their session title in ListAgents
  • Fixed claude plugin validate rejecting plugin paths whose directory name begins with two dots, which the plugin loader accepts
  • Fixed plugins silently skipping a default monitors file or root SKILL.md that could not be checked
  • Fixed WebFetch's error for localhost and other dotless hostnames to explain why the URL is refused and suggest curl
  • Fixed PermissionRequest hooks not firing in --print mode
  • Fixed policy-helper warnings not printing on headless (-p) runs
  • Fixed /resume listing a /fork background session under its parent's name instead of its own ⑂ fork name
  • Fixed /remote-control and other claude.ai-gated commands to suggest /login when signed out instead of showing a Claude for Enterprise migration message
  • Fixed CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS not extending SessionEnd hooks that have no per-hook timeout (they were still cancelled after 1.5 seconds)
  • Fixed /autofix-pr and other cloud-session commands saying to retry or install the Claude GitHub App when no GitHub account is connected; they now point to /web-setup or the web connect page
  • Fixed cloud-session commands such as /teleport and /remote-env to explain when an organization policy turns them off, instead of answering "Unknown command"
  • Fixed Bash sandbox instructions over-stating confinement: no unenforced path lists when filesystem isolation is off, and strict mode no longer claims commands can never run unsandboxed
  • Improved fullscreen mode: adding or removing a prompt line (Shift+Enter) now repaints as fast as typing a character instead of re-rendering the visible transcript
  • Improved --continue / --resume: the conversation appears immediately instead of waiting for SessionStart hooks, and the first message no longer re-reads the whole transcript
  • Improved responsiveness during tool-heavy turns by no longer redrawing the transcript for a hidden per-tool-batch reminder
  • Improved startup time in projects with .claude/workflows/ scripts: listing them no longer parses each script
  • Improved auto mode denials: the message Claude receives now names the rule that blocked the action and asks Claude to try a safer method and finish unrelated work before stopping to ask you
  • Improved Claude in Chrome: long page reads now stay inline instead of being saved to a file and read back
  • Improved the MEMORY.md truncation warning to say how many lines were cut and where the cut starts
  • Improved the terminal permission prompt for artifacts: it now leads with the ask's question
  • Improved the prompt footer: an editor or /diff selection now shows inside the prompt input, and fullscreen mode shows Remote Control status in the header instead of the footer
  • Improved the "Usage credits required for 1M context" message to say that usage credits turned on mid-session take effect after restarting Claude Code
  • Improved /plugin: installing, enabling or disabling a plugin now takes effect when you close the menu; /reload-plugins is no longer needed afterwards
  • Claude 应用网关新增定价功能:在 gateway.yaml 中设置价格,已登录的 Claude Code 客户端通过托管设置获得相同费率,因此 /cost 和遥测数据与消耗计量器保持一致
  • 当 access_control.allow_cidrs 为空时,为网关添加启动警告;当首次收到来自公共地址的请求时,显示一次性警告
  • 新增 gatewayInternalNetworks 托管设置,允许管理员在其组织的自有公共 IPv4 网段上对 Claude 应用网关启用 /login
  • 新增 claude self-hosted-runner --remove-session-state(默认关闭):会话结束时删除 <base-dir>/_sessions/ 下每个会话的会话专属目录
  • 在 claude auth status --json 的输出中新增 configDirectory
  • 为 claude plugin install、uninstall、update、enable 和 disable 命令新增 --json 参数,并为 claude plugin list --json 输出的每行新增 errorDetails/noteDetails
  • 为已发布的工件添加浏览器标签页图标,由 Claude 选择以匹配每个页面
  • 修复自 2.1.265 版本以来第三方 Anthropic 兼容端点(ANTHROPIC_BASE_URL)每次交互均因 HTTP 400 失败的问题:Artifact 工具输入模式中的正则表达式被这些端点拒绝
  • 修复 WebFetch 在服务器保持响应打开但未完成时无限挂起的问题;现在 fetch 将在 300 秒后失败。可通过设置 CLAUDE_CODE_WEBFETCH_DEADLINE_MS 覆盖截止时间(设为 0 则禁用)
  • 修复重新生成的进程内队友从你未信任的文件夹中的同名代理文件中获取工具或系统提示词的问题
  • 修复持续高 CPU 占用问题:长时间运行的空闲会话中的忙循环不再占用 CPU 核心,且会话回顾期间的快速终端焦点报告不再导致 CPU 占用居高不下
  • 修复 Claude 在 MCP 工具调用后有时回复“你的消息为空”的问题
  • 修复符号链接目录(macOS 上的 /etc、/tmp、/var;Linux 上的 /bin)上的 deny 和 ask permission 规则在路径以其真实位置给出时未生效,以及 Bash 命令忽略基于符号链接路径拼写编写的 deny 规则的问题
  • 修复当权限检查器无法分析的 env -C、eval 或类似命令位于同一行时,Read 或 Edit 的 deny 规则未生效的情况
  • 修复插件和市场错误显示来自 git 源 URL 的令牌或密码的问题
  • 修复 /mcp 和 /plugin 服务器详情、claude mcp list/get 以及 MCP 登录错误显示从 MCP 配置中 ${VAR} 占位符解析出的密钥的问题
  • 修复了在使用 excludeDynamicSections 的 SDK 会话中,提示词缓存和扩展思考功能在会话中途中断的问题:首个消息不再每次请求时重新渲染
  • 修复了在重启后或在桌面端代码标签页中,当缓存的模型访问拒绝状态已过时时,有权限的用户被告知模型受限的问题
  • 修复了当另一个 Claude Code 进程刷新过期的模型访问条目时,运行中的会话静默切换至组织默认模型的问题
  • 修复了 Fable 模型的长上下文 429 错误在 Pro 和 Team 套餐中显示使用额度同意提示,而非 1M 上下文消息的问题
  • 修复了通过配置文件(如 claude-code-action 配置的那样)进行的工作负载身份联合认证:共享该配置文件的进程可能在运行中途因 jti 重用而失败并返回 401 错误
  • 修复了当本地回调端口范围无法绑定时,MCP 服务器 OAuth 登录因“无可用端口用于 OAuth 重定向”而失败的问题
  • 修复了由 /compact 和自动压缩生成的对话摘要中,包含 $ 序列的文本被错误处理的问题
  • 修复了恢复以 /compact 结束的对话时,其恢复文件注释现在在每次恢复时按相同顺序加载的问题
  • 修复了 SDK 提示建议、侧边问题和 /rename 发送压缩前对话内容的问题
  • 修复了使用上箭头键回忆先前提示词并进行编辑后,@ 文件和 / 命令建议不出现的问题
  • 修复了 claude agents 中,以自然节奏再次按下左箭头键返回代理列表时被忽略,直到暂停超过一秒才响应的问题
  • 修复了当工作树无法删除时,claude agents 会话删除操作卡住的问题:提示信息会指出原因和下一步操作;对于 git 工作树,再次按 ctrl+x 仍会删除目录
  • 修复了代理面板中后台代理和工作流行在其文本包含换行符时展开为多行的问题
  • 修复了 Slack 会话中的 Claude 在组织管理设置设置了 MCP 允许列表时丢失 Slack 工具的问题
  • 修复了 Chrome 中的 Claude 在导航 URL 具有协议方案但主机无法解析时,要求允许主机“https”的问题
  • 修复了当当前任务标签过长时,旋转加载图标换行到多行的问题;现在标签和“Next:”任务行均保持在单终端行内
  • 修复了当终端原生光标启用时,/bug 和 /feedback 描述字段不显示光标的问题
  • 修复了由 claude remote-control 提供的远程控制会话在 ListAgents 中显示生成名称而非其会话标题的问题
  • 修复了 claude 插件验证中拒绝目录名以两个点开头的插件路径的问题,而插件加载器是接受这些路径的
  • 修复了插件在无法检查默认 monitors 文件或根目录下的 SKILL.md 时静默跳过的问题
  • 修复了 WebFetch 对 localhost 和其他无点主机名的错误提示,使其解释 URL 被拒绝的原因并建议尝试 curl
  • 修复了 --print 模式下 PermissionRequest 钩子未触发的问题
  • 修复了 headless (-p) 运行时 policy-helper 警告未打印的问题
  • 修复了 /resume 命令将 /fork 后台会话以其父会话名称而非其自身的 ⑂ fork 名称列出的问题
  • 修复了 /remote-control 及其他受 claude.ai 限制的命令在用户已登出时显示企业迁移消息而非建议执行 /login 的问题
  • 修复了 CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS 未延长那些没有单独超时设置的 SessionEnd 钩子超时时间的问题(它们仍会在 1.5 秒后被取消)
  • 修复了 /autofix-pr 及其他云会话命令在未连接 GitHub 账户时提示重试或安装 Claude GitHub App 的问题;现在它们会指向 /web-setup 或网页连接页面
  • 修复了 /teleport 和 /remote-env 等云会话命令在组织策略将其关闭时回答“未知命令”而非解释原因的问题
  • 修复了 Bash 沙箱说明中过度强调隔离限制的问题:当文件系统隔离关闭时不再列出未强制执行的路径列表,且严格模式不再声称命令永远不会在非沙箱环境中运行
  • 改进了全屏模式:添加或删除提示行(Shift+Enter)现在像输入字符一样快速重绘,而不是重新渲染可见的对话记录
  • 改进了 --continue / --resume 功能:对话立即显示,无需等待 SessionStart 钩子,且第一条消息不再重新读取整个对话记录
  • 通过不再为重绘隐藏的单工具批次提醒来重绘对话记录,提高了处理大量工具调用时的响应速度
  • 改进了包含 .claude/workflows/ 脚本的项目的启动时间:列出这些脚本时不再解析每个脚本
  • 改进了自动模式的拒绝提示:Claude 收到的消息现在会指明阻止该操作的具体规则,并要求 Claude 尝试更安全的方法,并在停止询问你之前完成无关的工作
  • 改进了 Chrome 中的 Claude 体验:长页面阅读现在保持内联显示,而不是保存为文件再读回
  • 改进了 MEMORY.md 截断警告,使其说明截断了多少行以及截断开始的位置
  • 改进了针对工件(artifacts)的终端权限提示:现在以提问的方式引导请求
  • 改进了提示词页脚:编辑器或 /diff 选择现在会显示在提示词输入框内,全屏模式下会在标题栏而非页脚显示远程控制状态
  • 优化了“需要 1M 上下文使用额度”的提示信息,说明中途开启的使用额度将在重启 Claude Code 后生效
  • 改进了 /plugin 命令:安装、启用或禁用插件现在在关闭菜单时生效;此后不再需要执行 /reload-plugins

更进一步:量化金融体系

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

进入量化体系 →

相似阅读

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