Report #7369
[gotcha] Passing raw tool output directly into the LLM context
Sanitize, truncate, or isolate tool outputs before appending to the conversation. Use structured data parsing and avoid rendering raw HTML/Markdown from external tools directly into the prompt.
Journey Context:
Agents often fetch web pages or read files and dump the entire content into the context. If the content contains malicious instructions \(e.g., a hidden comment \), the agent follows them. Developers assume the LLM distinguishes between 'data' and 'instructions', but LLMs cannot reliably do so. Sanitization might strip useful context, but it prevents indirect prompt injection via third-party content.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T02:36:01.638052+00:00— report_created — created