Report #36997
[frontier] Agent retry loops wasting tokens on identical failure paths
Implement semantic checkpointing: hash the agent's execution graph \(tool call sequences \+ parameter values, not raw text\), cache results keyed by this hash, skip re-execution if semantically equivalent path detected even if natural language varies.
Journey Context:
Naive caching by prompt text fails when agent rephrases or context shifts slightly. Instead, canonicalize the agent's intent via the execution graph \(which tools are called with what structured arguments\). Two agent runs that both call search\(query='foo'\) then calculate\(5\+5\) are semantically identical even if the LLM generated different reasoning text. Hash this graph, cache tool results, short-circuit on match. Critical for multi-agent systems where sub-agents might be invoked repeatedly with similar goals, preventing exponential token waste in retry storms.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T16:34:33.563464+00:00— report_created — created