feature
Jul 24, 2026RCLM now avoids unchanged file rereads and offers an optional Claude Code instruction for shorter responses.
RCLM can now remove unchanged file ranges from repeated tool results before they return to the model. Claude Code users can also enable an optional brevity instruction that asks the model to avoid unnecessary preambles, repeated summaries, and excessive formatting.
These mechanisms address different sources of context growth. Range-aware caching measures actual text removed from read results. Brevity changes response behavior, so its impact is reported separately as a cohort estimate.
In our current maintainer corpus, native Read accounted for about 29 million characters. Shell-based reads accounted for roughly 174 million more: 132 million through sed, 39 million through nl, and 2.4 million through cat. The earlier mechanism was focused on the smaller path.
We also measured 12.4 million characters of duplicate whole-file reads. Using the same four-characters-per-token estimate as the hook telemetry, that is approximately 3.1 million directly redundant tokens before accounting for the context resend multiplier on later turns.
The corpus is small, approximately two maintainer profiles, so these figures are directional rather than customer-validated. The 174 million characters represent newly addressable traffic, not guaranteed savings. RCLM reports actual range-cache savings only after comparing the completed result before and after elision.
The read cache tracks which line ranges the model has already received during the current session.
A repeated read of an unchanged range is replaced with a short notice:
[RCLM] Lines 100-200 of src/api/handlers.py unchanged since turn 14.
When a request partially overlaps an earlier read, RCLM returns the unseen lines and identifies the ranges it omitted. Native Claude Code reads that use the default 200-line cap also advance to the next unseen range instead of repeatedly starting at line 1.
The cache recognizes a conservative set of local read operations, including:
sed -nhead and tailcat and nlawk line rangesGet-Contentnl FILE | sed -n ... pipelineRead caching is available across Claude Code, Codex CLI, and Gemini CLI where their hook surfaces expose the completed tool result.
Parsing is intentionally strict. Commands with redirection, globs, multiple files, or pipelines that transform content pass through unchanged. A missed cache hit costs tokens; incorrectly identifying a range could hide information the model needs.
RCLM hashes the file for every recognized read. If its contents changed, all remembered ranges for that file are discarded. Write and edit tools also invalidate the file immediately. State remains local to the current session and is bounded to prevent unbounded growth.
The existing read-cache option controls the feature:
rclm-hooks-install --read-cache
Read caching is enabled by default for new hook installations and can be disabled with --no-read-cache.
Range caching compares the original tool result with the result actually returned to the model. This produces real before-and-after token estimates, including when RCLM is running in shadow mode.
This differs from native Read and Grep shaping performed before tool execution. Those operations do not have a completed result to compare in shadow mode, so RCLM does not claim measured savings for them.
Measured results remain separate from estimated mechanisms. Range caching and hash deduplication use observed before-and-after content. Brevity uses a cohort comparison. These values are not combined into one headline number.
Individual developers can open User Portal → Stats → Measured Context Reduction to see tokens removed during the selected period. The same section lists the files responsible for the most reread savings, making it possible to connect the number to actual working patterns rather than an anonymous aggregate.
A session's detail page also shows its recorded context-reduction mechanisms, so a developer can inspect the impact alongside the transcript and tool calls that produced it.
Enterprise administrators can open Enterprise → Tokens for the selected organization. The Measured Context Reduction panel shows enforced and shadow-mode savings by mechanism. Project, team, user, and model views include measured range-cache savings alongside the existing efficiency ratios.
Estimated reductions are displayed separately. The Brevity impact section compares average output tokens per turn for similar sessions with brevity enabled and disabled, segmented by session category. It is explicitly labeled as a cohort estimate rather than measured per-session savings.
Claude Code users can enable a session-start instruction that asks the model to:
Enable it when installing or updating hooks:
rclm-hooks-install --brevity
The option is off by default. RCLM also checks the project's CLAUDE.md and AGENTS.md files and skips injection when they already contain brevity guidance.
Brevity currently applies only to Claude Code. Codex CLI and Gemini CLI do not expose an equivalent session-start context surface in the current integration.
There is no truthful per-session before-and-after measurement for this feature because only one response is generated. RCLM therefore records whether the instruction was active and evaluates its effect by comparing output tokens per turn across similar sessions with brevity enabled and disabled.
We are watching for read commands that are common but cannot yet be parsed confidently, files whose generated output changes without an explicit edit event, and projects where brevity guidance causes users to ask more follow-up questions. Feedback and counterexamples are useful, especially when conservative passthrough leaves a large repeated read uncompressed.