Claude Code 2.1.74: Context Optimization & Memory Fixes

Claude Code 2.1.74 fixes a critical memory leak in streaming responses, adds context optimization tips, and resolves OAuth, model config, and Windows rendering issues.

Claude Code 2.1.74: Context Optimization & Memory Fixes

TL;DR

  • Context command now shows actionable optimization tips for memory bloat and capacity warnings
  • Fixed critical memory leak in streaming API response buffers causing unbounded RSS growth
  • Fixed model ID parsing, OAuth hangs, RTL text rendering, and Windows LSP issues

New

  • Actionable suggestions in `/context` — identifies context-heavy tools, memory bloat, and capacity warnings with specific optimization tips to help you stay under limits.
  • `autoMemoryDirectory` setting — configure a custom directory for auto-memory storage instead of using the default location.

Fixed

  • Memory leak in streaming API responses — response buffers were not released when generators terminated early, causing unbounded RSS growth on Node.js/npm code paths.
  • Managed policy `ask` rules bypassed — user `allow` rules or skill `allowed-tools` were overriding managed policy settings; now respects the correct precedence.
  • Full model IDs ignored in agent config — agents now accept the same model values as `--model` (e.g., `claude-opus-4-5` in frontmatter and JSON config).
  • MCP OAuth hanging on port conflicts — callback port already in use no longer causes authentication to hang.
  • MCP OAuth refresh token expiry — OAuth servers returning errors with HTTP 200 (e.g., Slack) now correctly prompt for re-authentication.
  • Voice mode failing on macOS — native binary now includes `audio-input` entitlement so macOS prompts for microphone permission correctly.
  • `SessionEnd` hooks timeout — previously killed after 1.5s on exit; now configurable via `CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS`.
  • Plugin install in REPL — marketplace plugins with local sources no longer fail when installed inside the REPL.
  • Marketplace plugin submodules — git submodules now sync correctly during updates; plugin sources in submodules no longer break.
  • Unknown slash commands dropping input — now shows your input as a warning instead of silently dropping it.
  • RTL text rendering on Windows — Hebrew, Arabic, and other right-to-left text now render correctly in Windows Terminal, conhost, and VS Code integrated terminal.
  • LSP servers on Windows — malformed file URIs no longer prevent LSP servers from working.
  • `--plugin-dir` override behavior — local dev copies now override installed marketplace plugins with the same name (unless force-enabled by managed settings).
  • [VSCode] Delete button for Untitled sessions — delete button now works correctly.
  • [VSCode] Terminal scroll responsiveness — improved scroll wheel responsiveness with terminal-aware acceleration.

Update via: npm install -g @anthropic-ai/claude-code@latest

Source: Claude Code