2.1.86 untested · changelog-derived

Claude Code 2.1.86

**`X-Claude-Code-Session-Id` header + VCS exclusion list expansions** — Enables proxy-layer session aggregation and improves tooling compatibility (Jujutsu, Sapling) without user configuration, reducing friction for multi-VCS monorepos and enterprise deployments.

2 new primitives 2 workflow recipes 24 fixes

New primitives

X-Claude-Code-Session-Id headercapability

Adds session-aware header to all API requests for proxy aggregation without body parsing

Added `X-Claude-Code-Session-Id` header to API requests so proxies can aggregate requests by session without parsing the body
.jj and .sl VCS exclusionssetting

Extends VCS directory blacklist to skip Jujutsu and Sapling metadata during file operations

Added `.jj` and `.sl` to VCS directory exclusion lists so Grep and file autocomplete don't descend into Jujutsu or Sapling metadata

Workflow recipes

Multi-Instance Session Aggregation + Proxy Intelligence
X-Claude-Code-Session-Id header + Read tool token optimization

The session-ID header + reduced token overhead on file mentions enable smarter proxy-layer session tracking without body parsing, allowing orchestration systems to correlate work across multiple Claude Code instances while staying within token budgets.

A proxy layer (e.g., Envoy, HAProxy, or custom middleware) ingests the X-Claude-Code-Session-Id header to aggregate and correlate requests from multiple concurrent Claude Code instances working on the same codebase or task. Combined with the Read tool's compact format and deduplication, agents can now be deployed as a fleet where each instance handles a subtask (e.g., parallel code review, multi-branch testing) and the proxy reconstructs the unified transaction log without parsing API bodies. This is especially valuable for monorepo CI/CD pipelines where session-aware request batching or rate-limiting per-task is needed.

Robust Long-Session Agent Feedback Loop
Fixed --resume + out-of-memory crash fix + /feedback reliability

2.1.86 hardens the session resume and feedback mechanisms, allowing agents to safely capture, persist, and replay multi-hour runs with /feedback without crashing or losing state on recovery.

An agent running a long-lived task (e.g., iterative code refactoring, multi-day test harness) can now safely checkpoint progress mid-session, pause, and resume with --resume without triggering the "tool_use ids" validation error. The out-of-memory crash fix means /feedback can be invoked on verbose 8+ hour sessions without process death. This unlocks human-in-the-loop workflows where an agent runs autonomously, the human periodically reviews via /feedback, and the agent resumes knowing the full context is available. Critical for systems like automated dispute resolution, long-running audits, or multi-stage synthesis tasks.

Agentic relevance

2.1.86 is primarily a stability and UX polish release with two small capability additions (session header + VCS exclusions). The session header is highly relevant for proxy-layer orchestration and multi-instance session tracking; the VCS exclusions reduce noise in monorepo tooling. Agents benefiting from multi-version monorepo work or proxy aggregation should expect improved file operation reliability and cleaner Grep results. The hardening work (config corruption fix, token leaks, long-session crashes) improves robustness for extended agent runs, especially those using `/feedback` or operating across project boundaries.

Hardening & fixes (24)

  • Fixed `--resume` flag failure on pre-v2.1.85 sessions ("tool_use ids" validation regression)
  • Fixed Write/Edit/Read operations on out-of-project files (e.g., `~/.claude/CLAUDE.md`) when conditional skills/rules are active
  • Fixed config corruption risk: eliminated unnecessary disk writes on every skill invocation (Windows stability + performance)
  • Fixed out-of-memory crash when using `/feedback` on very long sessions
  • Fixed `--bare` mode dropping MCP tools and silently losing enqueued messages in interactive sessions
  • Fixed OAuth shortcut `c` copying truncated URL (~20 chars vs. full URL)
  • Fixed masked input leaking token prefix on narrow-terminal line wraps
  • Fixed marketplace plugin scripts failing with "Permission denied" on macOS/Linux (since v2.1.83)
  • Fixed statusline model indicator showing stale state when multiple Claude Code instances run concurrently
  • Fixed scroll behavior not tracking new messages after wheel/click-to-select at transcript bottom
  • Fixed `/plugin` uninstall dialog: `n` key now correctly uninstalls while preserving data directory
  • Fixed regression: Enter-after-click left transcript blank until response arrival
  • Fixed `ultrathink` hint persisting after keyword deletion
  • Fixed memory leak in long sessions: markdown/highlight render caches no longer retain full content strings
  • Reduced startup event-loop stalls for claude.ai MCP connector-heavy configs (keychain cache: 5s → 30s)
  • Reduced token overhead: `@` file mentions no longer JSON-escape raw content
  • Improved prompt cache hit rate (Bedrock/Vertex/Foundry): removed dynamic content from tool descriptions
  • Enhanced UX: memory filenames now highlight on hover and open on click in "Saved N memories" notice
  • Capped skill descriptions at 250 characters in `/skills` listing to reduce context usage
  • Alphabetized `/skills` menu for better scannability
  • Improved auto-mode messaging: "unavailable for your plan" vs. generic "temporarily unavailable"
  • [VSCode] Fixed extension false "Not responding" during long operations
  • [VSCode] Fixed Max plan OAuth token refresh defaulting to Sonnet (8-hour token cycle bug)
  • Optimized Read tool: compact line-number format + deduplication of unchanged re-reads

Raw changelog

## 2.1.86

- 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 (e.g., OAuth code paste) 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