When a human developer reads a 400, they bring documentation, logs and prior context to the table. A model does not. It receives the response body as text in its context window and has to decide on the next action from that text alone. If the body says only "Validation failed", the model has three bad options: retry the identical request, invent a plausible fix, or stop and ask a human. All three waste time and money.
This is not a hypothetical. Cloudflare reports that structured error responses for agents cut payload size and token usage by more than 98% compared with HTML error pages, measured against a live rate-limit error response, and it now serves RFC 9457-compliant JSON and Markdown to clients that ask for it (the Cloudflare engineering blog). The same post makes the point that matters for design: the old HTML said "You were blocked", which describes the error but not the recovery. The new payload says "wait 30 seconds and retry", which is an instruction.
Designers have been converging on this for a while. Nordic APIs argues that status codes are not a conversation, because a 404 tells you something was missing and a 500 tells you something broke, but neither tells an agent whether to retry, escalate or change its input (Nordic APIs). Zuplo's guide on agent-callable APIs puts the same problem in numbers: Postman's State of the API Report found that 89% of developers use AI in their daily work, but only 24% design APIs with AI agents in mind (Zuplo). The error body is where that gap shows up first, because it is the part of the API the agent reads most often when it is confused.
There is a second, quieter reason to care. Practitioners who have wired agents to real APIs report that the most common failure is not a bad model output, it is an error the agent never saw: the SDK raised HTTP Error 422 and threw away the response body, so the model had nothing to reason about (Pol Alvarez Vecino). A well-shaped body is worthless if your client library swallows it. Build the body and pass it through.



