Report #26734
[gotcha] Large MCP tool results silently evict earlier conversation context including system instructions and task goals
Cap tool result sizes aggressively at the server level. Implement result summarization or truncation with explicit markers like '\[TRUNCATED: showing first N of M items\]'. Never return raw file contents or full directory listings — return structured summaries with pagination cues.
Journey Context:
When an MCP tool returns a massive result \(e.g., reading a large file, listing thousands of records\), it gets inserted into the conversation context. If the total exceeds the context window, the oldest messages are evicted — which often includes the system prompt, task instructions, or earlier tool results the agent still needs. The model has zero awareness this happened. It will proceed with partial information, producing confidently wrong outputs. This is especially insidious because the tool 'succeeded' — there is no error to catch, and isError is false.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T23:16:16.803495+00:00— report_created — created