31% cheaper per session.
Same model, same work, less context.

ToolRecall's context tracker tells your agent which files to drop after every turn.
Your agent sends 46% fewer prompt tokens — and survives workloads
naive sessions can't finish.

v0.8.15 · stdlib only · 132 KB
$7.87 ToolRecall total spend
3/3 workloads completed
$11.36 Naive total spend
1/3 workloads completed
−31% Cheaper on matched
workload (bugfix)

N=1 seed per workload. These are not multi-seed averages. Custom scripted workloads on ToolRecall's own codebase — not SWE-bench. Full methodology →

$ pipx install toolrecall Zero deps, pure stdlib
$ toolrecall setup && toolrecall status Daemon starts, caches begin immediately
The Problem

Context Snowball

Every LLM agent session accumulates context turn by turn — every file read, every command output stays forever. Eventually you hit the context limit and the session dies. All progress lost.

unbounded growth

Without ToolRecall

Full conversation history re-sent every turn. Hits the model's context cap and dies — typically within a few hundred turns on DeepSeek V4 Flash.

stays under cap

With ToolRecall

Clean file content is dropped each turn. Only instructions and responses accumulate. Survives workloads naive sessions can't finish — benchmarked at 450+ turns with 35% headroom.

Full benchmark results →

How It Works

One daemon. Three mechanisms.

ToolRecall intercepts file reads via a shared daemon. Every read is cached. Every write is tracked. Your agent can drop clean files from context.

1. File Cache

Read once from disk → served from memory forever.
~0.6ms vs ~1.5s subprocess fork.
99.3% hit rate in benchmark.

2. Context Tracker

Tracks which files are clean (read) vs dirty (written).
Agent drops clean content from context each turn.
86–92% less payload at matched turn count.

3. Deterministic Prefix

Byte-identical outputs across every call.
Provider prefix caching discounts apply.
Works fully offline — no API needed.
Evidence

Sessions: outlasts naive

Measured on DeepSeek V4 Flash at the model's true 1,048,576 context limit. On read-heavy workloads, naive sessions hit the cap at ~112 turns while ToolRecall completes all 200 turns at 142K context. On analysis workloads, TR completes 400 turns vs naive's 145. The same pattern across all workloads: ToolRecall keeps sessions alive longer. Full benchmark →

Install

Get started in 30 seconds

No dependencies. Just Python 3.11+.

$ pipx install toolrecall
Zero dependencies, pure stdlib
$ toolrecall setup
Creates config, starts daemon, caches begin immediately
$ toolrecall status
Check cache hit rate, active sessions, file stats

Works with Hermes Agent, Claude Code, Cursor, Cline, opencode — any MCP-capable agent. Adapter docs →

Run it yourself

Clone the repo and reproduce the benchmark in one command.

GitHub →

git clone https://github.com/whiskybeer/toolrecall && cd toolrecall