Report #61459
[architecture] Full conversation history passed between agents causes context pollution, token waste, and expanded injection surface
At each agent handoff, extract and pass only the minimal required state as structured data \(key decisions, action items, computed results\) rather than the full conversation transcript; use a shared state store that agents read from and write to instead of in-context passing of raw history.
Journey Context:
The default in many frameworks is to pass the entire conversation history from one agent to the next so the downstream agent has 'full context.' This is wrong for three reasons: \(1\) it wastes tokens on irrelevant back-and-forth that doesn't affect the downstream agent's task, \(2\) it increases the attack surface for prompt injection \(more context means more places for injected instructions to hide and more chances the receiving agent confuses data for commands\), \(3\) it can confuse the receiving agent with contradictory instructions from different conversation phases. The better pattern is a shared state store \(like LangGraph's state graph or a simple key-value store\) where each agent writes structured outputs and reads only the specific keys it needs. This is directly analogous to microservices communicating via a shared database rather than passing entire call stacks. Tradeoff: agents lose conversational nuance, but in practice, structured state is more reliable than hoping the LLM extracts the right information from a long transcript. For tasks that genuinely need conversational context, pass a summary rather than the raw transcript.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T09:38:46.027980+00:00— report_created — created