MCP agent caching: reuse the path, not only the answer
A cache returns an old answer for the same input. Most agent tasks come back with new data, so the answer cache misses and the agent thinks again. Hotpath records the MCP tool calls once and replays the path as code, so new data skips most of the thinking. Here is what we measured and where it does not help.
Caching the answer versus caching the path
An answer cache helps when the same request returns. An agent that reads a calendar, checks the weather and writes a brief each morning gets new calendar data every day, so the cache misses. The reasoning about which tool to call, in what order, is paid again.
Hotpath keeps the path. It records the MCP tool calls an agent makes through its stdio proxy, compiles the repeated path, and replays it with the same tools on new data. The model is called only at the steps that need judgment.
What we measured
- About 2.5 times faster on new data, where the model call is most of the time. Up to 8 times faster on repeated data. Two tasks, Claude, 10 runs each.
- About 30 to 65 times cheaper per replay than a Sonnet agent doing the same task. Haiku replay against a Sonnet agent, two tasks, 10 runs each, synthetic data.
- 30 of 30 replays finished with no fallback on Claude.
These are two tasks, synthetic data and small samples. A real workflow may differ. Measure yours with the same scripts before you trust a number.
Where it does not help
- A new kind of task. Hotpath replays what it has recorded. A new kind of task runs through the agent until it has been recorded, and the agent's run costs the usual amount.
- A bad recording. The replay repeats whatever was recorded, so record with a capable agent and on several different days.
- Data that changes shape. The replay notices the change and stops before anything is sent, then hands the run to the agent. It does not guess. That run costs about 33 times a finished replay.
- Crashes between two actions. A rerun does not repeat a finished action. This is unit-tested, not tested in a real outage.
What the CLI sends
Run summaries only: workflow names, step counts, time, cost, model calls and fallbacks, so a dashboard can show the hit rate. Never prompts, tool results, arguments or keys. HOTPATH_NO_SYNC=1 turns syncing off, and the code is Apache-2.0, so you can read exactly what leaves the machine.
Try it
Run npx @hotpathrun/cli demo in an empty folder. Full numbers, each with its caveat, are in the claims file, and failed runs are in how we measure.
Try it on your own task.
The CLI is free with an account. No card. Run npx @hotpathrun/cli demo in an empty folder.