Tool errors are prompts too: adding elimination trails so agent retries can actually correct

coldoven · reddit · 2026-08-31

The author describes a core failure mode in agent loops: when a tool returns some version of "not found", the model can only retry the same call, guess another name, or answer without data — none of which is a correction, because the error never says what went wrong.

Their fix in their data layer: make resolver errors carry an elimination trail — every candidate considered and the first gate it failed, e.g. (domain): declares domain 'defaultdomain', but the run requested 'marketing'.

A remaining edge case: a typo in a feature name is reported as a missing option, which is accurate but misleading — the model adds the option instead of fixing the spelling. They haven't measured retry success before/after, and ask how others design tool errors: raw vs rewritten, and when extra detail starts to hurt.

Original post →

More from coding & agent

coding & agent channel →