Agent keeps calling MCP tool after API key revoked—where to intercept?

Dinu_Dev · reddit · 2026-10-18

A developer hit an agent orchestration issue: after an MCP tool returned "API key is invalid or revoked," the agent kept calling the same tool and got the same error again.

Current mitigations: manually disabling the server once noticed, and adding the error to the agent's instructions. But they haven't found a way to block the next call inside a running session.

The core question: where should the stop live so that a definitive auth error blocks the very next call to that tool?

Original post →

More from coding & agent

coding & agent channel →