Claude Code 2.1.85: MCP Improvements, Hook Filtering

MCP multi-server helpers, conditional hook filtering, and major fixes for OAuth, remote sessions, and terminal keyboard handling. Performance gains for large transcripts.

Claude Code 2.1.85: MCP Improvements, Hook Filtering

TL;DR

  • MCP servers can now share a single helper script via new environment variables
  • Hooks support conditional filtering to reduce overhead
  • Major fixes for OAuth, remote sessions, and terminal keyboard handling
  • Performance improvements for large transcripts and file autocomplete

New

  • MCP environment variables for multi-server helpersCLAUDE_CODE_MCP_SERVER_NAME and CLAUDE_CODE_MCP_SERVER_URL let one helper script serve multiple servers.
  • Conditional hook filtering — Hooks now support an if field using permission rule syntax (e.g., Bash(git *)) to run only when conditions match, cutting unnecessary process spawning.
  • Timestamp markers for scheduled tasks — Transcripts now show when /loop and CronCreate tasks fire.
  • Deep link query expansionclaude-cli://open?q=… now supports up to 5,000 characters with a scroll warning for long pre-filled prompts.
  • MCP OAuth RFC 9728 compliance — OAuth discovery now follows the Protected Resource Metadata spec to locate authorization servers.
  • Organization policy enforcement for plugins — Plugins blocked by managed-settings.json can no longer be installed, enabled, or viewed in the marketplace.
  • PreToolUse headless integrations — Hooks can now return updatedInput alongside permissionDecision: "allow" to satisfy AskUserQuestion without user interaction.
  • OpenTelemetry tool details gatingtool_parameters in tool_result events now require OTEL_LOG_TOOL_DETAILS=1 to be logged.
  • Image placeholder spacing — Trailing space added after [Image #N] when pasting images.

Fixed

  • /compact failing with "context exceeded" on large conversations — the compact request itself now fits within limits.
  • /plugin enable and /plugin disable failing when install location differs from settings declaration.
  • --worktree exiting with error in non-git repos before the WorktreeCreate hook could run.
  • deniedMcpServers setting not blocking claude.ai MCP servers.
  • switch_display in computer-use tool returning "not available" on multi-monitor setups.
  • Crash when OTEL_LOGS_EXPORTER, OTEL_METRICS_EXPORTER, or OTEL_TRACES_EXPORTER set to none.
  • Diff syntax highlighting broken in non-native builds.
  • MCP step-up authorization failing when refresh token exists — 403 insufficient_scope now correctly triggers re-authorization.
  • Memory leak in remote sessions when streaming response interrupted.
  • Persistent ECONNRESET errors during edge connection churn — now uses fresh TCP connection on retry.
  • Prompts stuck in queue after certain slash commands, up-arrow unable to retrieve them.
  • Python Agent SDK: type:'sdk' MCP servers via --mcp-config no longer dropped at startup.
  • Raw key sequences appearing in prompt over SSH or VS Code integrated terminal.
  • Remote Control session status stuck on "Requires Action" after permission resolved.
  • Shift+enter and meta+enter intercepted by typeahead instead of inserting newlines.
  • Stale content bleeding through when scrolling during streaming.
  • Terminal left in enhanced keyboard mode after exit in Ghostty, Kitty, WezTerm — Ctrl+C and Ctrl+D now work correctly.
  • @-mention file autocomplete performance on large repositories.
  • Scroll performance with large transcripts — replaced WASM yoga-layout with pure TypeScript implementation.
  • UI stutter when compaction triggers on large sessions.

Update: brew upgrade claude-code or download the latest version from code.claude.com.

Source: Claude Code