Claude Code on GitHub Image: Anthropic / github.com/anthropics/claude-code
by Michael Joiner

Claude Code 2.1.238 Fixes a Memory Leak in Long Sessions and Adds Runner Controls

Today's release patches unbounded memory growth that hit users with long interactive sessions, adds graceful shutdown and proxy auth options for self-hosted runners, and brings keybinding customization.

Share

Claude Code 2.1.238 shipped today with a fix for a memory growth bug that affected long interactive sessions, plus new options for teams running self-hosted runners behind egress proxies.

Memory fix for long sessions

Subagent tool results were previously held in memory indefinitely. In long sessions with many tool calls, this caused unbounded memory growth. The fix releases those results once they scroll out of the display window.

If you have noticed Claude Code getting sluggish or consuming increasing memory over a multi-hour session, this is the patch.

Keybinding customization

A new keybindingFlavor setting lets you choose between readline-style and classic terminal keybindings. With readline-style selected, Ctrl+W deletes back to the previous whitespace rather than the default behavior. Configure it in /config.

Self-hosted runner controls

Two new flags give teams more control over runner lifecycle and proxy authentication.

--defer-shutdown-max-min <minutes> keeps a runner serving attached sessions on SIGTERM instead of immediately shutting down. The runner parks and exits after the specified number of minutes, or once all sessions detach. This matters for graceful deploys where you want active sessions to finish before the process stops.

--proxy-authorization-command and --proxy-authorization-file let runners authenticate with egress proxies that require freshly issued Proxy-Authorization headers. Previously, proxy refusals surfaced as generic errors, making them hard to diagnose. A separate fix now surfaces them with the correct error message.

Plugin marketplace security

The headersHelper feature allows plugin marketplace commands to mint HTTP headers, such as short-lived tokens, for catalog and archive fetches during install and update. Users see a [y/N] prompt before the command runs. MCP inline servers and the new headersHelper both now require trust dialog acceptance and run without inheriting credential environment variables.

Other fixes

A full list of what else changed in this release:

  • Custom, project, and plugin output styles no longer drift to default mid-session
  • Prompt suggestions re-enable after usage limits reset
  • MCP permission prompts now include the “don’t ask again” option correctly
  • Leftover /tmp/claude-*-cwd files are cleaned up on exit
  • Backspace now works on slow SSH links
  • Suspended sessions no longer leave the terminal in bracketed-paste mode
  • claude mcp list/get shows disabled servers as ⊘ Disabled without triggering health checks
  • The bundled claude-api skill is updated for the August 19 Managed Agents release, covering web search/fetch domain settings and memory store support

Release notes at github.com/anthropics/claude-code/releases/tag/v2.1.238.

Share