---
title: "Claude Code v2.1.238：修复长会话内存泄漏，新增插件 headersHelper 与运行器代理认证"
source: "Claude Code：GitHub Releases（RSS）"
source_tier: "t1_5"
url: "https://github.com/anthropics/claude-code/releases/tag/v2.1.238"
permalink: "https://feed.astralor.com/items/itm_dd949f3e0d3dd50c57d84d02"
published: "2026-08-20T20:33:51.000Z"
score: 80
channel: "ai"
tags: ["Anthropic","Claude Code","MCP","Remote Control","插件市场","自托管运行器"]
---

# Claude Code v2.1.238：修复长会话内存泄漏，新增插件 headersHelper 与运行器代理认证

## AI 点评

> 这次补丁看似琐碎，但「内存无界增长」和「Remote Control 403 容错」直击生产环境痛点，团队运维应优先升级；对个人开发者，新的 keybindingFlavor 和更快的 macOS 启动是体验上的明显加分项。

## 速览

Claude Code v2.1.238 发布，新增 readline 风格按键绑定（Ctrl+W 按空白删除）、插件市场 headersHelper 动态生成短时 HTTP 头、自托管运行器延迟关闭与代理授权命令等能力。修复了长交互会话中无界内存增长、Remote Control 断连与 403 容错、MCP 初始化顺序、权限提示显示裁剪等问题，并强化了 MCP headersHelper 的目录信任安全要求。macOS 启动速度更快。

## 关键点

- 新增 keybindingFlavor 设置，可切换为 Bash 风格 Ctrl+W 按空白删除；全屏 Ctrl+L/Cmd+K 改为纯重绘，移除双击清屏快捷键
- 插件市场支持 headersHelper 动态签发短时 HTTP 头；自托管运行器新增 --defer-shutdown-max-min 与代理授权命令/文件参数
- 修复长交互会话内存无界增长、Remote Control 断连/403 抖动容错、MCP 初始化顺序等多处稳定性问题
- MCP headersHelper 现要求目录信任对话框通过，且不再继承凭据环境变量，安全门槛提升

## 全文

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

---

引用前请核对原文;本文由星际流动整理:https://feed.astralor.com/items/itm_dd949f3e0d3dd50c57d84d02
