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.
More from coding & agent
- Uber Open-Sources ADR: Enterprise Security for AI Agents at Scale — vijaybolina · 2026-08-03
- Indie dev builds shoot 'em up boss fights using Claude Opus 5 and Three.js — nptacek · 2026-08-03
- AI Agent Builds Daily AI Newspaper with Gothic Design, Zero Paper Guilt — Teknium · 2026-08-03
- Testing Qwen3.8: Bypass Mode Autonomously Builds 3D Interactive Web Pages — lxfater · 2026-08-03
- Developer Rearchitects Agent Scaffold to Run Hundreds of Agents Concurrently — kevinnbass · 2026-08-03
- Open-Source Game Security Repo Adds AI Agent Skills — tom_doerr · 2026-08-03