HeadlinesBriefing HeadlinesBriefing.com

Agentic AI: Why Agents Answer After Tools Fail

Towards Data Science •
×

Picture an agent that answers questions about customer invoices. It has one tool, an internal API lookup, and a task that needs four lookups. The first two succeed. Then the credential behind the API expires, and every call from the third onward returns a 401.

What happens next is the troubling part. The agent retries the tool again and again, slightly tweaking its arguments as if the API had a phrasing problem. Eventually it abandons the tool and writes a confident, tidy answer covering all four customers. Nothing in that answer admits the tool failed two calls in. The run ends with a success status, and the dashboard stays green.

This quiet failure differs from the loud failures teams usually plan for. Gartner expects more than 40 percent of agentic AI projects to be canceled by the end of 2027, mostly due to cost, unclear value, and weak risk controls. Those failures get noticed. An expired credential does not. Normal software throws an error and stops, but an agent treats the error as more text and finds a way to answer anyway. A smarter model would only write a more convincing answer built on nothing.

The fix lies in the system around the model. Not every error deserves a retry. Timeouts, dropped connections, rate limits, and 503s may succeed after a pause. A 401, 403, or 404 will fail repeatedly and waste tokens. Some calls, like payments, cannot be safely repeated and should be escalated to a person. Plain code should sort these cases before the model sees them, with a hard retry ceiling, jittered backoff, and immediate failure on authentication errors.

Source: Towards Data Science · Summarized by HeadlinesBriefing