Feature
RCLM reduces repeated reads, oversized searches, noisy command output, and duplicate tool results near the source—then measures the effect before calling it savings.
Where it goes
Broad repository searches can return thousands of lines that remain in context while the agent plans, edits, tests, and retries.
The same unchanged file can be read in full multiple times even though a short notice or diff would preserve the useful information.
Test runs, installs, and shell commands can add progress output, repeated lines, and passing-case noise that the model does not need.
Repeated calls and failed edits against the same stale state can spend more turns without moving the task forward.
The earlier unnecessary content enters a long session, the more later turns can carry it forward. Position in the session can matter as much as the original payload size.
Bounded case study
The current case study replayed 61 eligible sessions out of 97 considered from a rolling 15-day workload at an anonymized two-user software organization. It used a real tokenizer and the shipped range-cache, shell-compaction, and hash-deduplication implementation without calling a model or re-running historical commands.
Original stream
4,106,180
text tool-result tokens
Tokens removed
676,061
counterfactual Replay result
Stream reduction
16.46%
of eligible text tool results
Equivalent capacity
19.71%
within that tool-result budget
Validated from the published counts: 676,061 ÷ 4,106,180 = 16.4645%, which rounds to 16.46%. The reduced stream is 3,430,119 tokens; 676,061 ÷ 3,430,119 = 19.7095%, which rounds to 19.71% equivalent capacity.
This is a shadow-mode counterfactual for eligible text tool results—not realized production savings, total model-input reduction, task throughput, or a provider-bill forecast. The case study reports that one user generated 99.99% of the captured workload.
Review the full methodology and limitations →Mechanisms
Replay-evaluated
A re-read of a file already seen this session becomes a short notice or a diff, not the full content again.
Included in the 61-session case study; the published result is combined across mechanisms, not attributed to read caching alone
Read mechanism docs ↗Part of shell replay
Broad searches return file names and match counts first, with full matching content available only when the agent actually needs it.
Search shaping ran through the shipped shell-compaction core used by Replay
Read mechanism docs ↗Measured · lossless
Repeated file and directory prefixes are folded out of search results and path listings without dropping result rows.
The compact result is expanded and checked against the original before a fold is accepted; ambiguous shapes pass through unchanged
Read mechanism docs ↗Replay-evaluated
ANSI is stripped, repeated lines are collapsed, and long shell output is reduced to the useful head and tail.
Shell compaction was one of three mechanism families evaluated in the case study
Read mechanism docs ↗Replay-evaluated
Repeated large tool results are replaced with a reference to the earlier equivalent result instead of being carried forward again.
Hash deduplication was one of three mechanism families evaluated in the case study
Read mechanism docs ↗Command-aware filtering
Recognized test runners keep failures and useful summaries while removing repetitive passing-test output.
Command-specific filters are part of the shipped shell-compaction path; no standalone percentage is claimed
Read mechanism docs ↗Safety control
Repeated identical calls or failures on the same file are flagged before they consume another turn.
Its impact is estimated from an avoided attempt rather than measured from a replacement tool result
Read mechanism docs ↗Measured separately
Oversized images in tool results are reduced before they consume avoidable visual context where the client hook supports it.
Not included in the 61-session Replay result; enforcement and measurement support differ by client
Read mechanism docs ↗Estimated only
When a newer screenshot supersedes an older one for the same page and viewport, RCLM estimates the context that could be released.
Measurement-only today: it models the opportunity and possible cache-write cost but never removes the older image
Read mechanism docs ↗Cohort estimate only
An optional Claude Code session-start instruction asks the model to avoid unnecessary preamble, summaries, and formatting.
There is no per-session counterfactual, so brevity is kept out of measured Replay savings
Read mechanism docs ↗MCP context tool
file_brief distills prior sessions that touched a file, while handoff packages current session state for a clean continuation.
These complement hook-level compression but are not part of the published 16.46% Replay denominator
Read mechanism docs ↗Session-start context
New Claude Code sessions can begin with compact prior decisions, changed files, and outstanding work from the same project.
Reduces cold-start reconstruction but is kept separate from Replay and measured hook-reduction claims
Read mechanism docs ↗Rollout
01
Preserve the usage source and calculation method so provider-reported, estimated, and unavailable cost data stay distinct.
02
Use shadow mode to record what supported mechanisms would remove without changing the agent's visible tool results.
03
Range caching, loop detection, and text compression default on for fresh installs; dedupe, image lifecycle, brevity, and shadow mode remain opt-in.
04
Compare billable token classes, turns, retries, failures, task completion, and output quality—not only the text removed.
A mechanism that removes context can still make the workflow worse if it causes more turns, retries, failures, or missing information. Measure first, enable selectively, and keep actual, estimated, and unavailable cost data distinguishable.
Replay the shipped mechanisms against captured sessions, then verify any enforced rollout against total tokens, retries, task completion, and output quality.