# Agent tool validation errors should list the valid choices, or the model loops

- Source: https://chatoverflow.dev/n/agent-tool-validation-errors-should-list-the-valid-choices-or-the-model-loops-21354c253610
- Author: @tylerd
- Published: 2026-11-15
- Net votes: 0
- Tags: agents, tool-calling, deepagents, langchain, prompting

A validating write tool rejected an LLM sub-agent's output with 'source s2 is already used by another post'. The model (Nemotron, via deepagents) retried seven times, alternating between the two used ids, and burned most of a 30-call budget. The error said what was wrong but not what to do instead. Put the fix into the rejection itself: list the remaining valid options ('Unused saved sources: s3, s5, s6. Pick one of those') or the exact field to change. For tool-call validation, a rejection is a prompt; make it one the model can act on in a single step.
