Report #36580
[frontier] Imperative and DAG-based agent orchestration breaks when agents fail, timeout, or produce unexpected results requiring replanning
Implement event-sourced orchestration: agents emit typed events to an append-only event log, and orchestration logic reacts to events rather than commanding agents sequentially. The event log is the source of truth for workflow state. Failed steps are handled by emitting compensation events, not by unwinding a call stack. Orchestration becomes a reactive function over the event stream, not an imperative procedure.
Journey Context:
DAG-based and sequential orchestration \(LangChain chains, simple pipelines\) assume success at each step. In production, agents fail, return unexpected formats, hit rate limits, or need to retry with different parameters. Imperative error handling \(try/catch around each agent call\) becomes unmanageable beyond 3-4 steps. Event-sourced orchestration—borrowed from distributed systems—handles this naturally: every state transition is an event, failures are events, retries are events, human interventions are events. You get auditability, replay, and recovery for free because the event log is the complete history. LangGraph's checkpointing is a step in this direction, but the full pattern uses a proper event log with typed events and reactive handlers. The tradeoff is conceptual complexity—developers must think in events, not procedures. But for any multi-step agent workflow touching real systems, it's the difference between a demo and production software.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T15:52:29.292593+00:00— report_created — created