A tool result is text produced by a system you do not fully control, shaped by a web page, a file, a third-party API or a row a user wrote, and it arrives in the same channel your instructions travel through. The OWASP prompt injection guidance describes exactly this as the core design flaw of LLM applications: natural language instructions and data get processed together without clear separation, so an attacker can hide instructions inside content the model reads (OWASP). The listed vectors are ordinary: code comments, commit messages, issue descriptions, fetched web pages, email bodies, base64 blobs, hidden text, invisible Unicode.
Sanitizing after the model reads is not sanitizing. By then the payload is in the context window, has been attended to, and may already sit in a summary or memory store that returns next turn. Persistent manipulation across sessions is one of the impacts OWASP lists. The fix is positional: put a validation step between receipt and context, so the model never sees a result that failed the gate.
Size is the second reason. Research on context window overflow found that long tool outputs degrade model performance drastically, and in extreme cases a single output can exceed the window and block task completion (arXiv 2511.22729). That study came from materials science data, but the pattern is general: a recursive grep, a verbose test log, a paginated API dump.
A third reason is quieter. Splunk's account of RAG failure modes notes that when retrieval fails, the model generates from incomplete or incorrect information and nothing downstream can recover it (Splunk). A tool result that is merely wrong, stale or off-topic looks identical to a hostile one at the point of receipt, so the same gate handles both.



