官方更新 Claude Code Releases 2026-08-20T20:33 正文 ok 864 words

Claude Code v2.1.238 发布:新增 readline 快捷键模式与自托管运行器代理支持

英文标题:Claude Code v2.1.238

Claude Code v2.1.238 新增 `keybindingFlavor` 配置,可启用与 Bash 一致的 readline 风格 Ctrl+W 删除行为,并扩展了插件市场与 MCP 的 `headersHelper` 能力。自托管运行器新增延迟关闭及动态 `Proxy-Authorization` 请求头支持,面向长连接、出口代理和会话迁移等部署场景提供更强控制能力。此次更新还修复了长时间交互会话的内存增长、Remote Control 连接与消息同步、MCP 初始化顺序、终端渲染及权限提示等大量问题,提升了 CLI、远程控制和多 Agent 工作流的稳定性。
打开原文相关 7.2 · 机会 1
media1.3 KB media54.5 KB

中文

更新内容

  • 新增 keybindingFlavor 设置:将其设为 "readline" 后,提示符中的 Ctrl+W 会像 Bash 一样删除至前一个空白字符;默认值 "classic" 保持不变。
  • 插件市场:URL 市场或目录条目上的 headersHelper 可运行命令,为目录请求和同源归档下载请求生成 HTTP 请求头(例如短期有效的令牌)。
  • 目录条目的 headersHelper 仅会在安装或更新该插件时运行,并会先展示其命令;claude plugin install/update 将询问 [y/N],也可传入 -y。
  • 新增 claude self-hosted-runner --defer-shutdown-max-min <minutes>:收到 SIGTERM 后,继续服务已附着的会话;在指定分钟数后暂停剩余工作,然后退出。
  • 新增 claude self-hosted-runner --proxy-authorization-command / --proxy-authorization-file,用于支持每次连接均要求新签发 Proxy-Authorization 请求头的出口代理。
  • 修复长时间交互会话中内存无上限增长的问题:子 Agent 工具结果现在会在离开最近显示窗口后被释放。
  • 修复自定义、项目和插件输出风格在会话中途漂移回默认语气的问题。
  • 修复当账户接近但尚未超过使用限额时,CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=true 未能持续启用提示建议的问题。
  • 修复 worktree 隔离中的 Bash 拒绝提示:命令不含重定向时,错误提示仍要求移除重定向的问题。
  • 修复自托管运行器偶尔因单次轮询请求缓慢或丢失而被服务器移除,并将健康会话交给另一运行器的问题。
  • 修复 MCP 征询对话框在 URL 长于 4,096 个字符时不显示内容的问题,以及当项目路径无法适配终端宽度时权限提示丢失“不再询问”选项的问题。
  • 修复 Bash 命令被终止、超时或中断后残留 /tmp/claude-*-cwd 文件的问题。
  • 修复在按键以大批量到达时(如缓慢的 SSH/mosh 连接),将 Backspace 发送为 Ctrl+H 的终端会忽略持续按住 Backspace 的问题。
  • 修复权限提示差异内容的文本换行:包含宽多码点字符(如 emoji)或制表符的行不再被截断。
  • 修复终止处于挂起状态(Ctrl+Z)的会话时,终端有时仍处于 bracketed-paste 模式且光标隐藏的问题。
  • 修复 stdio MCP 服务器在 initialize 之前收到 server/discover 请求的问题;此前这会迫使延迟启动的服务器在每次打开会话时启动其后端。
  • 修复代理拒绝连接时被报告为通用网络错误、而未明确指出代理的问题。
  • 修复提示缓存已过期时仍显示 /model 和 /effort 缓存未命中警告的问题。
  • 修复 Remote Control 任务面板中按任务执行“停止”操作对由 CLI 托管的会话无效的问题。
  • 修复客户端发送角色无效的用户消息时远程会话退出的问题。
  • 修复由 claude remote-control 启动的 Remote Control 会话继承启动 shell 的会话级环境变量的问题。
  • 修复 Remote Control 会话进程崩溃后,必须重启 claude remote-control 才能恢复可用的问题;现在下次向该会话发送消息时即可复用。
  • 修复 Claude 正在处理中时,从 Web 或 Desktop 发送的 Remote Control 消息会在该轮处理结束后从记录中消失的问题。
  • 修复在手机或 Web 端选择 Remote Control 模型后,终端中显示的模型未更新的问题。
  • 修复短暂网络波动延迟登录续期时,Remote Control 因“登录已过期”而断开的问题;现在会重试并保持连接。
  • 修复 Remote Control 在退出登录时报告重连失败的问题;现在退出登录会以明确消息结束会话。
  • 修复在由 claude remote-control(服务器模式)或 Desktop/IDE 宿主运行的会话中,ListAgents/SendMessage 报告“Remote Control 未连接”的问题;现在它们可以列出并联系 Remote Control 对端。
  • 修复 ListAgents 和 SendMessage 暴露 Agent 视图为下一个后台会话预热的空闲工作器的问题;现在只有任务认领该工作器后才会显示。
  • 跨会话消息:向本机上拒绝接收消息的会话发送信息时(例如 crossSessionInbound: "refuse"),现在会向发送方报告“已拒绝”,而不是静默显示成功。
  • 跨会话消息:如果某个会话的收件箱因速率限制或队列已满而丢弃消息,现在会通知你的会话,而非让消息静默消失。
  • 改进启动速度:在 macOS 上直接运行 claude 启动更快。
  • 改进 Bash 工具对 shell 条件语句中 zsh 特有语法的权限检查。
  • 改进 Remote Control 连接韧性:对于网络边缘、VPN 或代理造成的短暂 HTTP 403 拒绝,现在最多可容忍 3 分钟;若阻断持续存在,将指出拒绝方。
  • 改进启动响应速度:自动更新检查现在会在启动约 10 秒后运行,不再与启动过程争抢 CPU。
  • 更新随附的 claude-api skill,以支持 Managed Agents 8 月 19 日发布版本中的功能:自托管沙箱内的 Web 搜索/抓取域名设置和记忆存储。
  • 调整全屏模式下的 Ctrl+L 和 Cmd+K:现在始终仅重绘界面;移除了双击触发 /clear 的快捷方式,单行 nvim 终端也不再触发自动 /clear 循环。
  • 调整 claude mcp list 和 claude mcp get:禁用的服务器现在显示为 ⊘ Disabled,而不是连接它们进行健康检查。
  • 项目 .mcp.json 中的 MCP headersHelper,以及项目或 --add-dir Agent 文件中的内联 MCP 服务器,现在要求已接受对应文件夹的信任对话框;在 claude -p 下同样适用。
  • 来自项目 .mcp.json、插件或 Agent 文件的 MCP headersHelper 不再继承凭据环境变量;用户、托管及 claude.ai 范围的 helper 现在均从 Claude 配置目录运行。

English / 原文

  1. Releases
  2. v2.1.238

Compare

Sorry, something went wrong.

No results found

What's changed

  • Added a keybindingFlavor setting: set it to "readline" to make Ctrl+W in the prompt delete back to the previous whitespace, as in Bash; the default ("classic") is unchanged
  • Plugin marketplaces: headersHelper on a url marketplace or a catalog entry runs a command that mints HTTP headers (e.g. a short-lived token) for catalog and same-origin archive fetches
  • A catalog entry's headersHelper runs only when you install or update that plugin, after its command is shown; claude plugin install/update ask [y/N] (or pass -y)
  • Added claude self-hosted-runner --defer-shutdown-max-min <minutes>: on SIGTERM, keep serving attached sessions, park what is left after that many minutes, then exit
  • Added claude self-hosted-runner --proxy-authorization-command / --proxy-authorization-file for egress proxies that require a freshly issued Proxy-Authorization header on every connection
  • Fixed unbounded memory growth in long interactive sessions: subagent tool results are now released once they leave the recent display window
  • Fixed custom, project, and plugin output styles drifting back to the default voice mid-session
  • Fixed CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=true not keeping prompt suggestions on when your account is near, but not over, its usage limit
  • Fixed worktree-isolation Bash refusals telling you to remove a redirect when the command had none
  • Fixed self-hosted runners occasionally being removed by the server after a single slow or lost poll request, handing their healthy session to another runner
  • Fixed MCP elicitation dialogs showing nothing for URLs longer than 4,096 characters, and permission prompts dropping the "don't ask again" option when the project path didn't fit the terminal width
  • Fixed leftover /tmp/claude-*-cwd files when a Bash command is killed, times out, or is interrupted
  • Fixed held Backspace being ignored on terminals that send Ctrl+H for Backspace when keystrokes arrive in large bursts (slow SSH/mosh links)
  • Fixed text-wrapping in permission prompt diffs: lines containing wide multi-code-point characters (such as emoji) or tabs are no longer clipped
  • Fixed killing a suspended (Ctrl+Z) session sometimes leaving the terminal in bracketed-paste mode with the cursor hidden
  • Fixed stdio MCP servers receiving a server/discover request before initialize, forcing lazy servers to start their backend on every session open
  • Fixed a proxy's refusal of a connection being reported as a generic network error instead of naming the proxy
  • Fixed the /model and /effort cache-miss warning appearing when the prompt cache had already expired
  • Fixed per-task Stop from the Remote Control tasks panel doing nothing on CLI-hosted sessions
  • Fixed remote sessions exiting when a client delivered a user message without a valid role
  • Fixed Remote Control sessions started by claude remote-control inheriting session-scoped environment variables from the launching shell
  • Fixed a Remote Control session whose process crashed staying unavailable until claude remote-control was restarted; it can now be reused when you next message it
  • Fixed Remote Control messages sent from the web or Desktop while Claude is mid-turn disappearing from the transcript after the turn finishes
  • Fixed Remote Control model picks made on a phone or web not updating the model shown in the terminal
  • Fixed Remote Control disconnecting with "login expired" when a brief network hiccup delays renewing your sign-in; it now retries and stays connected
  • Fixed Remote Control reporting a failed reconnect on sign-out; signing out now ends the session with a clear message
  • Fixed ListAgents/SendMessage reporting "Remote Control is not connected" in sessions run by claude remote-control (server mode) or Desktop/IDE hosts; they now list and reach Remote Control peers
  • Fixed ListAgents and SendMessage exposing the idle worker that the agent view pre-warms for your next background session; it now appears only once a task claims it
  • Cross-session messaging: sending to a session on this machine that refuses inbound messages (e.g. crossSessionInbound: "refuse") now reports "refused" to the sender instead of a silent success
  • Cross-session messaging: a session whose inbox drops your messages (rate limit or full queue) now tells your session, instead of the messages vanishing silently
  • Improved startup: bare claude starts sooner on macOS
  • Improved Bash tool permission checking for zsh-specific syntax in shell conditionals
  • Improved Remote Control connection resilience: brief HTTP 403 refusals from a network edge, VPN, or proxy are now tolerated for up to 3 minutes, with the refusing party named when a block persists
  • Improved startup responsiveness: the automatic update check now runs about 10 seconds after launch instead of competing with startup for CPU
  • Updated the bundled claude-api skill for the Managed Agents Aug 19 release: web search/fetch domain settings and memory stores on self-hosted sandboxes
  • Changed Ctrl+L and Cmd+K in fullscreen to always just repaint — the double-press /clear shortcut was removed, and 1-row nvim terminals no longer trigger automatic /clear loops
  • Changed claude mcp list and claude mcp get to show disabled servers as ⊘ Disabled instead of connecting to them for a health check
  • MCP headersHelper in a project .mcp.json, and inline MCP servers in project or --add-dir agent files, now require that folder's trust dialog to have been accepted (also under claude -p)
  • MCP headersHelper from a project .mcp.json, plugin, or agent file runs without inherited credential env vars; user, managed and claude.ai-scope helpers now run from the Claude config dir

You can’t perform that action at this time.