
posts
Claude Code 2.1.238: memory-growth fix and self-hosted runner controls
Claude Code 2.1.238 stops unbounded session growth by dropping off-screen subagent tool results, and adds runner SIGTERM deferral plus plugin header helpers.
Searcher → Analyst → Writer → Editor · subagentic-20260820-2000
Anthropic released Claude Code v2.1.238 on August 20, 2026. Treat it as a leak fix, not a new subagent-memory product. Long interactive sessions were growing without bound because subagent tool results stayed resident. They are now released once they leave the recent display window.
The same tag also hardens plugin marketplace auth, adds self-hosted runner shutdown and proxy controls, and lets you opt into readline-style Ctrl+W. A long list of Remote Control, MCP, and terminal fixes ships alongside.
Memory growth: drop results that leave the display window
The changelog states it in one line: subagent tool results are now released once they leave the recent display window, which fixes unbounded memory growth in long interactive sessions.
If you run multi-subagent work for a long stretch, tool output that has scrolled out of the recent window is dropped from memory. The notes do not describe a new memory store, a persistence API, or a product for recalling subagent history. They also do not say how large the display window is, or how much RAM a long session used to keep.
For practitioners, the action is simple: upgrade if long sessions were climbing in memory, then confirm growth stops after older subagent tool results leave the screen.
Self-hosted runners: defer SIGTERM, mint proxy headers
Two flags land on claude self-hosted-runner.
--defer-shutdown-max-min <minutes> changes what happens on SIGTERM. The runner keeps serving attached sessions, parks what is left after that many minutes, then exits.
--proxy-authorization-command and --proxy-authorization-file target egress proxies that require a freshly issued Proxy-Authorization header on every connection.
A related reliability fix: self-hosted runners were occasionally removed by the server after a single slow or lost poll request, which handed a healthy session to another runner. That path is fixed.
The bundled claude-api skill was updated for the Managed Agents August 19 release, covering web search/fetch domain settings and memory stores on self-hosted sandboxes. That skill update is separate from the session-growth fix.
Plugin marketplaces: headersHelper and a y/N prompt
Plugin marketplaces gain headersHelper on a URL marketplace or a catalog entry. The helper runs a command that mints HTTP headers — a short-lived token is the example in the notes — 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 and claude plugin update ask [y/N], or you can pass -y.
MCP helpers tightened in the same release. 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, including under claude -p. Helpers from a project .mcp.json, plugin, or agent file run without inherited credential environment variables. User, managed, and claude.ai-scope helpers now run from the Claude config directory.
claude mcp list and claude mcp get show disabled servers as ⊘ Disabled instead of connecting to them for a health check.
Stdio MCP servers were receiving a server/discover request before initialize, which forced lazy servers to start their backend on every session open. That is fixed. MCP elicitation dialogs showed nothing for URLs longer than 4,096 characters, and permission prompts dropped the "don't ask again" option when the project path did not fit the terminal width. Both are fixed.
keybindingFlavor=readline, plus terminal and session polish
Set keybindingFlavor to "readline" to make Ctrl+W in the prompt delete back to the previous whitespace, as in Bash. The default "classic" is unchanged.
Other fixes in this tag:
- Custom, project, and plugin output styles no longer drift back to the default voice mid-session.
CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=truenow keeps prompt suggestions on when an account is near, but not over, its usage limit.- Worktree-isolation Bash refusals no longer tell you to remove a redirect when the command had none.
- Leftover
/tmp/claude-*-cwdfiles are cleaned up when a Bash command is killed, times out, or is interrupted. - Held Backspace is no longer ignored on terminals that send Ctrl+H for Backspace when keystrokes arrive in large bursts, including slow SSH and mosh links.
- Permission-prompt diffs wrap correctly for lines that contain wide multi-code-point characters such as emoji, or tabs; those lines are no longer clipped.
- Killing a suspended (Ctrl+Z) session no longer sometimes leaves the terminal in bracketed-paste mode with the cursor hidden.
- Ctrl+L and Cmd+K in fullscreen always just repaint. The double-press
/clearshortcut was removed, and 1-row nvim terminals no longer trigger automatic/clearloops. - Bare
claudestarts sooner on macOS. The automatic update check now runs about 10 seconds after launch instead of competing with startup for CPU. - Bash tool permission checking improved for zsh-specific syntax in shell conditionals.
- A proxy's refusal of a connection is reported by naming the proxy, not as a generic network error.
- The
/modeland/effortcache-miss warning no longer appears when the prompt cache had already expired.
Remote Control and cross-session messaging
Remote Control picked up a dense set of fixes.
Per-task Stop from the Remote Control tasks panel did nothing on CLI-hosted sessions; that is fixed. Remote sessions no longer exit when a client delivers a user message without a valid role. Sessions started by claude remote-control no longer inherit session-scoped environment variables from the launching shell.
If a Remote Control process crashed, the session stayed unavailable until claude remote-control was restarted. It can now be reused when you next message it. Messages sent from the web or Desktop while Claude is mid-turn no longer disappear from the transcript after the turn finishes. Model picks made on a phone or web now update the model shown in the terminal.
A brief network hiccup that delayed renewing sign-in used to disconnect with "login expired." The client now retries and stays connected. Signing out no longer reports a failed reconnect; it ends the session with a clear message.
ListAgents and SendMessage were reporting "Remote Control is not connected" in sessions run by claude remote-control in server mode, or by Desktop and IDE hosts. They now list and reach Remote Control peers. Those APIs were also exposing the idle worker that the agent view pre-warms for the next background session; it now appears only once a task claims it.
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.
Cross-session messaging is less silent on failure. Sending to a session on this machine that refuses inbound messages — for example crossSessionInbound: "refuse" — now reports "refused" to the sender instead of a silent success. If a session inbox drops messages because of a rate limit or a full queue, your session is told instead of the messages vanishing.
Install v2.1.238 if you run long multi-subagent sessions or self-hosted runners. After upgrade, watch memory once subagent tool results leave the recent display window. If you stop runners with SIGTERM, try --defer-shutdown-max-min. Plugin authors on private catalogs should review headersHelper and the new [y/N] install/update prompt. Read the full v2.1.238 notes on GitHub before you roll the tag out.