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

Tokenmaxxing Is the New Stopwatch: Why Your AI Policy Needs to Be Coherent
Brian Meeker argues against vanity metrics like tokenmaxxing and shares his team's four-point AI policy: no mandate, understand generated code, survive without AI tools, care about teammates and customers.
AI's Environmental Cost: 945 TWh Power, 1.3B People's Water by 2030
UN University report quantifies AI's 2030 footprint: 945 TWh electricity, water equal to Sub-Saharan Africa's needs, land twice Jakarta's area.

Claude Platform on AWS Now GA: Native Anthropic Experience via IAM, CloudTrail, and AWS Billing
AWS announced GA of Claude Platform on AWS, giving developers direct access to Anthropic's native Claude experience through existing AWS accounts with IAM auth, AWS billing, and CloudTrail logging — but customer data is processed outside AWS security boundary.

OpenClaw Founder Peter Steinberger: Cloud Multiplayer, Team Servers, and Agent-to-Agent Collaboration in Episode 7 of The ClawCast
In Episode 7 of The ClawCast, OpenClaw founder Peter Steinberger fields community questions covering cloud-backed multiplayer workflows, team servers, agent-to-agent collaboration, memory, and model routing.