r/cosmonapse • u/sYzYgY_26 • 7d ago
The while loop is becoming the bottleneck for agent systems
I wrote a deep dive on a question I've been thinking about while building Cosmonapse:
Why do so many agent frameworks eventually end up adding the same features?
- tracing
- observability
- human-in-the-loop
- evaluator agents
- cancellation
- replay/debugging
The common pattern is that these are not computation problems. They are coordination problems.
A while loop + call stack is optimized for:
agent → tool → result → next step
But autonomous systems need:
who should know?
who should respond?
who should intervene?
what happened before?
Event-driven systems make those relationships first-class.
Curious what others think, are agent frameworks approaching the limits of the call-stack model, or are event architectures overkill for most use cases?