cd /news/ai-agents/how-an-8mb-mcp-tool-response-crashes… · home › topics › ai-agents › article
[ARTICLE · art-169153] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

How an 8MB MCP Tool Response Crashes Claude Code — And How to Debug Prompt Cache Misses Across Agents

A developer released three open-source, zero-telemetry tools for debugging Model Context Protocol (MCP) failures in coding agents such as Claude Code, OpenAI Codex CLI, Cursor and VS Code Copilot. The tools target three silent failure modes: oversized tools/list responses that exhaust context, tools/call outputs large enough to tear down the stdio pipe (Claude Code's 8 MiB limit, Codex's 16 MiB), and prompt-cache misses caused by mid-session config edits. The packages are @framy2/ctxwise (context firewall, multi-editor MCP auditor and CI budget guard), @framy2/mcp-diet (a stdio MCP proxy that offloads large results and redacts secrets) and @framy2/agent-wire-tap (a wire contract tester with a --passthrough prompt-prefix cache-miss debugger).

by read2 min views4 publishedNov 13, 2026

If you use Claude Code, OpenAI Codex CLI, Cursor, or VS Code Copilot with Model Context Protocol (MCP) servers, your context window and prompt cache are exposed to three silent failure modes:

tools/list): github, postgres, playwright) injects tools/call):<error>Connection closed</error> (anthropics/claude-code#105703`` openai/codex#60383``cache_control, or mid-session "disableAllHooks": true edits (anthropics/claude-code#106225 We built three zero-telemetry open-source tools to inspect and prevent all three:

@framy2/ctxwise`` v1.2.0) — Context Firewall, Multi-Editor MCP Auditor & CI Budget Guard (Apache-2.0)@framy2/mcp-diet`` v0.1.1) — Stdio MCP Proxy with MIT)@framy2/agent-wire-tap`` v0.2.0) — Local Wire Contract Tester & Live --passthrough Prompt-Prefix Cache-Miss Debugger (

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": [
        "-y",
        "@framy2/mcp-diet@0.1.1",
        "--read-only",
        "--max-desc", "160",
        "--max-result-kb", "512",
        "--redact-secrets",
        "--",
        "npx", "-y", "@modelcontextprotocol/server-github"
      ]
    }
  }
}

mcp-diet sits on stdio between the host CLI and the upstream MCP server:

>= 512 KiB tool outputs to a local temp file and returns a compact < 2 KB preview so Claude Code (8 MiB) and Codex ( 16 MiB) never tear down the pipe. sk-ant-*, sk-proj-*, ghp_*, AKIA*, DB passwords) before they reach the model transcript.

npx @framy2/ctxwise mcp-xray --probe-stdio

npx @framy2/ctxwise agents --fail-on-divergence

npx @framy2/ctxwise shield --strict --sarif ctxwise.sarif

npx @framy2/ctxwise budget
npx @framy2/agent-wire-tap \
  --assert-contains "AGENTS.md" \
  --assert-not-contains "sk-ant-" \
  --assert-max-bytes 32768 \
  --assert-max-tools 12 \
  -- codex exec "ping"

npx @framy2/agent-wire-tap --passthrough https://api.anthropic.com --port 8787

--passthrough keeps credentials strictly in memory ([REDACTED] in traces/logs) while hashing each prefix segment (model, tools[], system[], messages[]) and flagging the exact firstDivergentLayer / firstDivergentIndex whenever a mutation breaks a cache_control breakpoint.

Paste your .mcp.json, .vscode/mcp.json, CLAUDE.md, or AGENTS.md right in the browser (100% local, zero uploads):

── more in #ai-agents 4 stories · sorted by recency
── more on @claude code 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-an-8mb-mcp-tool-…] indexed:0 read:2min 2026-11-13 · —