Failure warnings and known fixes for agents
Stop AI agents repeating the same mistakes: Retrack remembers each failure and the fix that worked, warns in advance and breaks retry loops.
Updated
Most agent failures are not new. The same tool rejects the same lowercase reason code, the same refund needs an approval, the same deploy command fails the same way, and the agent retries blindly until it gives up or burns its budget. Retrack remembers each kind of failure and the fix that worked, and warns your agent before it repeats the mistake.
Warnings with the fix, not just the error
When a tool call fails and a later retry in the same run succeeds, Retrack records what changed: the inputs that were added or corrected. The next time your agent is about to do that kind of task, its prompt includes a warning like this:
issue_refund failed 3 times with WrongRefundMethod: "orders paid with a gift card are
refunded as store_credit". Fix that worked: retry issue_refund with a different method
(method='store_credit' worked).The tool's own explanation is included, made independent of the task and checked by the memory firewall first, because tool output can carry injected text.
A circuit breaker for loops
Agents stuck retrying the same failing call waste tokens and time. Wrap your tools with memory.protect(tools) and:
- a known failure returns the fix that worked,
- a failure Retrack knows cannot be fixed by retrying stops at once,
- the very same failure three times in one run stops instead of looping.
Works for general-purpose tools
Agents built around a shell, SQL or HTTP tool get warnings per command, such as kubectl rollout undo or POST /v1/orders/{}/refund, so a failing migration command is never confused with a working status check.
Failures become tests
A failure that happens twice becomes a critical regression case. If a prompt change or a new model brings it back, retrack test fails the build.
Results
On a support agent with hidden store rules, avoidable mistakes fell from 15 to 3 across 16 paired requests; invalid-reason errors from 12 to 3 and wrong refund methods from 3 to 0. On a second agent, tool errors fell 67%. See the benchmarks.
Read the details in Failure signatures and warnings and Known fixes and the circuit breaker, or the wider method in how to improve AI agents in production.