Report #93281
[architecture] Passing full unedited history of upstream agents exhausts context windows and increases context poisoning risk
Implement a Context Distillation step at the agent boundary, where the orchestrator uses a fast, cheap LLM to summarize the upstream agent's output into only the facts required by the downstream agent's schema, discarding the raw reasoning traces and intermediate steps.
Journey Context:
Developers often pass the entire messages array from Agent A to Agent B to preserve context. This is an anti-pattern. It wastes tokens, increases latency, and if Agent A encountered a prompt injection, the malicious payload is carried forward. By distilling the output to a strict schema or summary, you act as a firewall, stripping out irrelevant or malicious conversational artifacts. The tradeoff is the latency/cost of the distillation step and potential loss of nuance, but it is essential for long chains of agents to prevent context overflow and cascading injections.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T15:09:34.781894+00:00— report_created — created