Claude Code v2.1.86: Token Efficiency Improvements for Read Tool and @ File Mentions
Claude Code v2.1.86 delivers targeted token efficiency improvements addressing two of the most common sources of context overhead. The Read tool now uses a compact line-number format and deduplicates unchanged re-reads, reducing the tokens consumed each time a file is inspected. Separately, raw file content referenced with the @ shorthand is no longer JSON-escaped before being sent to the model, further trimming unnecessary token overhead.
Sources & Mentions
5 external resources covering this update
[Bug] File loading adds 70% token overhead due to line number formatting Β· Issue #20223
GitHub
Update: my Claude Code token optimizer now blocks redundant reads. Here's the data from 107 sessions.
Dev.to
Claude Code v2.1.86 β token savings and bug fixes
X (Twitter)
Claude Code in March 2026: The Economics of the Quota
Medium
vexorkai/claude-trace: CLI to analyze Claude Code token usage by session, tool, project, and timeline
GitHub
Token Efficiency Improvements
Read Tool: Compact Format and Deduplication
Claude Code's Read tool β used in virtually every coding session β has historically added significant token overhead through its verbose line-number format. Version 2.1.86 addresses this directly: the Read tool now outputs a compact line-number representation, and identical re-reads of unchanged files are automatically deduplicated. If a file has not changed since it was last loaded in a session, Claude Code skips the redundant re-read entirely rather than sending the same content to the model again.
This change directly responds to a widely discussed community pain point. A GitHub issue tracking the overhead of file loading (issue #20223) documented that the previous line-number format added approximately 70% token overhead β a 31,000-token documentation set would consume over 52,000 tokens in context, with more than 21,000 tokens consumed by formatting alone. While the v2.1.86 change focuses on compacting the format and deduplicating re-reads rather than eliminating line numbers altogether, it represents a meaningful step toward bringing Read tool overhead down.
@ File Mentions: Removing JSON Escaping
When developers reference files using the @filename shorthand, Claude Code previously JSON-escaped the raw string content before injecting it into the model's context. In v2.1.86, this escaping step has been removed. The result is that file content referenced with @ now uses fewer tokens β characters such as backslashes, quotes, and newlines that were previously double-encoded are now passed through as-is.
For users working on codebases with configuration files, JSON schemas, or files containing many special characters, this change can meaningfully reduce token consumption per mention.
Improved Prompt Cache Hit Rate for Third-Party Providers
Users running Claude Code against Bedrock, Vertex, or Foundry deployments benefit from an improved prompt cache hit rate in this release. Previously, dynamic content in tool descriptions could cause cache misses on every turn. That dynamic content has been removed, allowing the tool description portion of the context to remain stable across turns and benefit from caching.
Bug Fixes and Polish
v2.1.86 ships a substantial set of bug fixes and quality-of-life improvements:
- Fixed
--resumefailing 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, which could cause performance issues and config corruption on Windows
- Fixed a potential out-of-memory crash when using
/feedbackon very long sessions - Fixed
--baremode dropping MCP tools in interactive sessions and silently discarding messages enqueued mid-turn - Fixed OAuth login URL copying only ~20 characters instead of the full URL
- Fixed masked input leaking the start of an OAuth token 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 simultaneously
- Fixed scroll not following new messages after wheel scroll or click-to-select at the bottom of a long conversation
- Fixed
ultrathinkhint lingering after the keyword is deleted - Fixed memory growth in long sessions from markdown and 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 5 to 30 seconds)
- Skill descriptions in the
/skillslisting are now capped at 250 characters to reduce context usage /skillsmenu now sorts alphabetically for easier scanning- Auto mode now shows "unavailable for your plan" when disabled by plan restrictions
- [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