Silent MCP Tool Failments Cause Massive Token Leaks; Dev Open-Sources Fix

Thirumalaiboobathi · reddit · 2026-08-03

Running MCP servers in production hides an expensive pitfall: tool failures often return HTTP 200 with isError: true in the payload. Standard OpenTelemetry instrumentation misinterprets this as success, resulting in a falsely green dashboard.

The Danger: The agent receives the error text as a normal result, assumes it made a mistake, and retries. Because context accumulates, each retry resends the full history, causing token costs to snowball.

The author open-sourced a Node.js library to fix this by inspecting the payload, marking spans as ERROR, and fingerprinting failures. The latest version detects retry loops and summarizes the exact tokens and cost burned.

Original post →

More from coding & agent

coding & agent channel →