Report #80604
[gotcha] Agent produces confidently wrong answers after reading large files — no error thrown
Cap tool result size before injecting into the conversation context. When a result exceeds your limit, truncate it and prepend an explicit marker like '\[TRUNCATED: showing first N of M bytes. Use search or read with offset to see more.\]'. Never silently truncate — the model must know it is working with partial data.
Journey Context:
When an MCP tool like read\_file returns a massive result \(e.g., a 10K-line source file\), the result gets appended to the conversation. If it exceeds the context window, some MCP client implementations silently truncate from the middle or end to fit. The model then reasons over incomplete data without any signal that data is missing, producing answers that are wrong but stated with full confidence. There is no error, no exception — just a silently wrong answer. The fix sounds obvious \(mark truncations\) but many MCP client implementations skip this because the truncation happens at the LLM API layer, not in the MCP client code, making it invisible to the developer.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T17:53:53.683512+00:00— report_created — created