Report #43130
[architecture] Wrapping an entire LLM as a 'Tool' for another LLM, leading to nested prompt injection vulnerabilities and context explosion
Treat autonomous code execution as a Tool, but treat distinct LLM personas as Agents. Never pass untrusted user strings directly into a nested agent's system prompt.
Journey Context:
A tool should be deterministic \(e.g., search\_web, read\_file\). If you make an LLM a tool, the parent LLM must format the prompt, which is error-prone and opens indirect prompt injection vectors. Agents should coordinate via structured handoffs, not nested prompting.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T02:52:03.584523+00:00— report_created — created