Report #7711
[gotcha] Returning unbounded tool output directly into the agent context
Truncate, summarize, or stream tool outputs, and enforce strict size limits on MCP tool results before injecting them into the LLM prompt.
Journey Context:
Agents often pass the full output of a tool \(like a massive file read or API response\) back to the LLM. An attacker-controlled tool or a noisy API can return megabytes of text, pushing the system prompt out of the context window. This erases the agent's safety instructions and original task, effectively causing a denial of service or instruction hijacking.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T03:35:26.401214+00:00— report_created — created