The Resumability Problem in Long-Running Agent Architectures

If reconnecting to an interrupted five-minute autonomous agent run forces the system to replay every intermediate tool call and re-bill model tokens, the central engineering question is no longer whether to choose Server-Sent Events or WebSockets. The real problem is state recoverability.

Across multi-agent coordination, search indexing, codebase migrations, and developer tooling, delivering initial capability is the easiest part of system design. Production engineering begins with what happens when a network socket drops, a worker stalls, or a long-running process fails halfway through its assigned task.

Why Transport Protocols Cannot Solve Agent Durability

Server-Sent Events remain the standard transport for request-driven, unidirectional text streaming. Anthropic, OpenAI, Google, and the Model Context Protocol Streamable HTTP specification all standardize on text/event-stream over HTTP POST. With HTTP/2 connection multiplexing, historical browser connection limits are largely irrelevant.

However, neither SSE nor WebSockets provide state durability. Transport protocols simply pipe text across an open TCP socket. If a client disconnects four minutes into a multi-step task, a naive server architecture either terminates the running process or replays the entire conversation from the beginning upon reconnection.

Replaying execution logs causes catastrophic side effects. An agent that already created a staging database, modified local files, or dispatched external webhooks will repeat those operations unless every tool interface is strictly idempotent. Buffering intermediate token streams into Redis provides raw playback, but it introduces an expensive write-heavy dependency for failure modes that occur sporadically. Robust resilience requires structured execution logs, deterministic event offsets, and transactional checkpoints that track completed milestones independently of client connection state.

Process Orchestration Across Isolated Worktrees

As tasks expand beyond single prompts, agent workflows increasingly resemble classic Unix process orchestration. Claude Code introduced capabilities enabling active terminal sessions to discover, monitor, and message other sessions across separate cmux panes, Git worktrees, and remote servers.

In a representative deployment, an engineer maintains a dedicated production monitoring session while dispatching a background worker to implement bug fixes inside an isolated worktree. The critical advance is operational persistence. Instead of spawning an ephemeral subagent whose working memory evaporates when its command finishes, named workers remain alive and inspectable. An engineer can inspect the worker’s intermediate state, verify git diffs, and issue follow-up commands within the same session context.

Similar coordination enables heterogeneous models to collaborate, such as Codex and Claude Code sessions exchanging structured status reports over local Unix domain sockets. Yet coordination demonstrations should not be confused with production reliability. Without supervisory health checks, deadlock detection, and timeout boundaries, interconnected agents can easily stall or propagate unverified state across worktrees.

Embedded Search: Lucene’s 418 QPS Versus Database Proximity

The trade-off between isolated engine performance and system-level simplicity appears equally in search architectures. Developers frequently debate whether to embed lightweight search inside primary databases or deploy dedicated search clusters.

In the Govscape benchmark spanning 500,000 documents and 10,000 queries, Apache Lucene demonstrated the raw power of dedicated information retrieval engines. Lucene delivered 418 queries per second against a compact 2.8 GB index. In contrast, SQLite FTS5 achieved only 11 queries per second while requiring a 14 GB index file.

While Lucene dominates raw throughput, deploying an external search cluster introduces distributed systems tax: network latency, operational overhead, and dual-write synchronization bugs. Embedding FTS5 directly inside the application database eliminates external networking and guarantees transactional consistency, making it an attractive trade-off for modest English-language datasets. Hybrid engines like Turso and ParadeDB attempt to bridge this divide by embedding Tantivy, a Rust-based Lucene alternative, directly inside relational databases to retain transactional locality while supporting advanced tokenization and ranking.

A Million Lines in 11 Days: Speed Versus Migration Risk

Software engineering is also testing the boundaries of high-concurrency automated refactoring. In an aggressive migration experiment, the Bun runtime project utilized Claude Fable 5 across up to 64 concurrent agent instances to generate more than one million lines of Rust code in just 11 days.

The velocity of automated generation is undeniable, but merged code is not equivalent to trusted software. Bun’s Rust rewrite remains classified as an experimental Canary release, demanding extensive manual stabilization. This contrasts sharply with Facebook’s historical PHP evolution, where engineering teams spent years gradually swapping compiler layers and virtual machines while running live production traffic.

High-concurrency AI generation allows teams to build massive ports in days, but it compresses testing and validation debt into the review cycle. Building resilient systems requires matching generation speed with rigorous verification, transparent provenance, and recoverable architecture.