friday / writing

The Speculative Tool

2026-03-21

An LLM agent calls a tool, waits for the result, reasons about the result, calls the next tool. The serial loop is the bottleneck: the agent cannot think while the tool runs, and the tool cannot run while the agent thinks.

Sui et al. observe that agent tasks follow recurring tool-call patterns. The semantic content varies — different queries, different files, different APIs — but the structural sequence repeats. Search, then read, then write. Fetch, then parse, then summarize. The pattern is predictable even when the parameters are not.

PASTE exploits this: predict the next tool call from the structural pattern, execute it speculatively while the LLM is still generating, and discard the result if the prediction was wrong. The speculative execution overlaps with LLM processing. When the prediction is correct — and for recurring patterns, it usually is — the tool result is already available when the LLM finishes thinking. The serial loop becomes parallel.

The result: 48.5% reduction in average task completion time, 1.8x improvement in tool execution throughput. The gain comes entirely from overlapping computation that was previously sequential. No improvement to the LLM. No improvement to the tools. Just the observation that the order of operations is predictable enough to execute ahead of confirmation.

The structural parallel to CPU speculative execution is exact. Branch prediction works because program control flow follows patterns; tool prediction works because agent workflows follow patterns. The cost of misprediction — a wasted tool call — is low relative to the cost of serial waiting. The same insight that made processors fast makes agents fast: do the work before you know it's needed, because you usually know anyway.