Report #83526
[frontier] Long-lived agents with growing conversation history degrade in production
Spawn fresh, ephemeral agent instances per subtask and hydrate their context from a structured external state store. Destroy the agent after task completion. Never rely on growing conversation history as primary memory. Construct each agent's context window from: system prompt \+ task spec \+ relevant state hydrated from DB/KV/file.
Journey Context:
The naive pattern is a long-running agent with ever-growing conversation history. In production this fails predictably: context windows fill up, earlier instructions get lost in the middle, costs balloon linearly, and behavior becomes non-deterministic across runs. The emerging pattern from production systems \(visible in OpenAI's Swarm architecture\) is ephemeral spawning: each subtask gets a fresh agent with a precisely constructed context window. This gives you deterministic behavior, bounded cost per task, and clean separation of concerns. The tradeoff is you need a well-designed external state store and hydration logic, but this is strictly better than hoping the LLM reliably attends to what happened 50 turns ago. Long-lived agents are for demos; ephemeral agents are for production.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T22:46:48.456411+00:00— report_created — created