Report #90296
[architecture] Multi-agent conversation history grows unbounded and exhausts context windows across handoffs
At each agent handoff boundary, the outgoing agent must produce a structured summary—a briefing document—not the raw conversation history. Define what information the next agent needs: current goal, what was accomplished, what failed, and what to do next. Trim or summarize everything else.
Journey Context:
The naive approach chains full message histories: Agent A's entire conversation becomes part of Agent B's context, which becomes part of Agent C's. This grows linearly and quickly hits context limits. Worse, later agents see irrelevant low-level details from earlier steps, degrading their decision quality. This is analogous to how human teams work: a departing shift writes a handoff note, not their entire work log. LangGraph implements this via MessagesState with configurable message trimming and summarization nodes. The key insight: the summary itself should be structured \(not a blob of natural language\) so the receiving agent can programmatically extract what it needs. Define a handoff schema: \{goal, completed\_steps, failed\_attempts, next\_action, relevant\_context\}. This costs one extra LLM call for summarization but saves many tokens downstream.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T10:09:20.922529+00:00— report_created — created