Claude Code v2.1.86: Session headers, memory fixes, and token optimizations

What's new in Claude Code v2.1.86
Anthropics released Claude Code v2.1.86 with session management improvements, memory optimizations, and multiple bug fixes. The update focuses on stability, performance, and developer experience for users of this AI coding agent.
Key changes and fixes
- Added X-Claude-Code-Session-Id header to API requests so proxies can aggregate requests by session without parsing the body
- Added .jj and .sl to VCS directory exclusion lists so Grep and file autocomplete don't descend into Jujutsu or Sapling metadata
- Fixed --resume failing with "tool_use ids were found without tool_result blocks" on sessions created before v2.1.85
- Fixed Write/Edit/Read failing on files outside the project root (e.g., ~/.claude/CLAUDE.md) when conditional skills or rules are configured
- Fixed unnecessary config disk writes on every skill invocation that could cause performance issues and config corruption on Windows
- Fixed potential out-of-memory crash when using /feedback on very long sessions with large transcript files
- Fixed --bare mode dropping MCP tools in interactive sessions and silently discarding messages enqueued mid-turn
- Fixed the c shortcut copying only ~20 characters of the OAuth login URL instead of the full URL
- Fixed masked input leaking the start of the token when wrapping across multiple lines on narrow terminals
- Fixed official marketplace plugin scripts failing with "Permission denied" on macOS/Linux since v2.1.83
- Fixed statusline showing another session's model when running multiple Claude Code instances and using /model in one of them
- Fixed scroll not following new messages after wheel scroll or click-to-select at the bottom of a long conversation
- Fixed /plugin uninstall dialog: pressing n now correctly uninstalls the plugin while preserving its data directory
- Fixed a regression where pressing Enter after clicking could leave the transcript blank until the response arrived
- Fixed ultrathink hint lingering after deleting the keyword
- Fixed memory growth in long sessions from markdown/highlight render caches retaining full content strings
- Reduced startup event-loop stalls when many claude.ai MCP connectors are configured (macOS keychain cache extended from 5s to 30s)
- Reduced token overhead when mentioning files with @ — raw string content no longer JSON-escaped
- Improved prompt cache hit rate for Bedrock, Vertex, and Foundry users by removing dynamic content from tool descriptions
- Memory filenames in the "Saved N memories" notice now highlight on hover and open on click
- Skill descriptions in the /skills listing are now capped at 250 characters to reduce context usage
- Changed /skills menu to sort alphabetically for easier scanning
- Auto mode now shows "unavailable for your plan" when disabled by plan restrictions (was "temporarily unavailable")
- [VSCode] Fixed extension incorrectly showing "Not responding" during long-running operations
- [VSCode] Fixed extension defaulting Max plan users to Sonnet after the OAuth token refreshes (8 hours after login)
- Read tool now uses compact line-number format and deduplicates unchanged re-reads, reducing token usage
Who this is for
Developers using Claude Code for AI-assisted coding, particularly those working with long sessions, multiple instances, or enterprise proxy configurations.
📖 Read the full source: GitHub Claude-Code
👀 See Also

Chinese AI Engineers Are Silicon Valley's New Power Players
A journalist embedded in a shared house in Los Altos explores the community of Chinese AI researchers in Silicon Valley, describing $200M compensation packages, their intense work ethic, and the house parties where they network.

OpenAI's Sam Altman Supports Anthropic's Pentagon Red Lines, Proposes Technical Safeguards
OpenAI CEO Sam Altman has expressed support for Anthropic's ethical stance against Pentagon AI use for mass surveillance and autonomous weapons, while proposing technical safeguards like cloud-only deployment as a resolution.

OpenClaw Docker users: 2026.3.13 update missing Docker tags
OpenClaw version 2026.3.13 has been released, but Docker users should avoid updating as the Docker image lacks both 'latest' and '2026.3.13' tags. Users running from npm or git are unaffected.

Anthropic releases AI tool for analyzing COBOL codebases, IBM stock drops 13%
Anthropic has released an AI tool that analyzes COBOL codebases to flag risks and reduce modernization costs. The announcement triggered a 13% drop in IBM's stock as the market perceived it as a threat to IBM's legacy system management business.