Agent Infrastructure Is the Real Barrier, Not the Harness
This article argues that the real obstacle to moving AI agents into production is infrastructure rather than harness engineering—the execution shell built around a model, including tool-calling protocols and system prompts. Prototype demos usually work fine, but at scale, teams run into dropped sandbox connections, lost context and memory, long-running tasks that cannot progress asynchronously, cross-contamination between concurrent requests, and no way to resume after a failure. These are system design problems, not model capability problems. The article explains why harness work hits diminishing returns, breaks down the four most common infrastructure gaps—sandbox and session lifecycle, state and memory, asynchronous long-running tasks, and observability and cost control—and proposes a five-layer reference architecture: access, orchestration, execution, state, and observability. It also covers multi-agent orchestration patterns, verifiable acceptance criteria, and realistic expectations for the year ahead.
Introduction: The Difficulty Is Often Misdiagnosed
In the early stages of an agent project, most engineering effort tends to go into scaffolding: designing tool-calling protocols, refining system prompts, and adapting to every small difference in model behavior. The industry often calls this work harness engineering—wrapping a model in a controlled execution shell. Yet a frontline observation from platform product and engineering leaders points to a different conclusion: what actually stops agent projects from reaching production is not how finely the shell is built, but the wall of infrastructure.
Everything works during the prototype stage. One session, one sandbox, and a script that runs sequentially can already produce a demo that looks impressive. Once the project reaches production and tries to scale, the problems arrive all at once: sandbox connections drop, context and memory are lost, long-running tasks cannot progress asynchronously, concurrent requests pollute each other’s state, and failures cannot be resumed from where they left off. None of these are model capability issues. They are system design issues.
This article takes that judgment as its main thread, abstracts a general architecture for agent infrastructure, and offers practical engineering recommendations.
1. Why Harness Engineering Is Not the Final Challenge
The value of harness engineering is real, but its payoff curve flattens quickly, for three reasons:
- Diminishing returns: Improvements from prompts and tool descriptions tend to concentrate on a specific task distribution. A different batch of inputs can invalidate them, so they need continuous maintenance.
- Declining portability: Early in the industry, the common idea was a “universal harness” with the freedom to swap models at any time. But technical approaches now differ more and more in reasoning style, context management, and tool-calling conventions. Harnesses and models are becoming tightly paired, and deep tuning for a single model family has become the norm.
- No solution to stability: No matter how polished the shell is, if the foundation lacks session isolation, state persistence, and task recovery, the system remains unusable under high concurrency and long-running workloads.
Put another way: the harness determines whether the system can be made smarter, while infrastructure determines whether it can keep working.
2. Four Common Cracks in the Infrastructure Wall
2.1 Sandbox and Session Lifecycle
Every agent run needs an isolated execution environment to handle file reads and writes, command execution, and dependency installation. Common problems in production include connections reaped while idle, inconsistent image dependencies, concurrent sessions interfering with each other, and timeout policies that do not match real business durations. Treat the sandbox as a “disposable but rebuildable” resource, decouple the session from the sandbox, and define idle-reaping and heartbeat-renewal policies explicitly.
2.2 State, Files, and Memory
Prototypes often keep state in process memory, so a restart means total amnesia. Production requires three kinds of state to be externalized: short-term session context, workspace files, and long-term memory. The common approach is to use object storage for large files and artifacts, key-value or document stores for structured state, and vector retrieval for long-term memory recall, with session identifiers used for partition isolation.
2.3 Asynchronous and Long-Running Tasks
Real business tasks can last from minutes to hours. Waiting on them through synchronous requests is neither economical nor reliable. Introduce message queues and task scheduling, and split the flow into independent stages—submit, execute, callback, verify—paired with idempotency keys and retry policies so that network jitter does not cause duplicate side effects.
2.4 Observability and Cost Control
Agent call chains are long and branch heavily. Without tracing, it is impossible to pinpoint which step’s context went wrong. Instrument each step with input summaries, tool calls, latency, and token consumption, and set budget caps and circuit-breaking thresholds.
3. Target Architecture: A Five-Layer Reference
Access layer: authentication, rate limiting, quotas, auditingOrchestration layer: task decomposition, state machine, retries and compensationExecution layer: sandbox pool, tool gateway, provisioned dependenciesState layer: session storage / object storage / memory retrievalObservability layer: tracing, metrics, logs, alerting
A skeleton of the state machine looks like this (illustrative of structure only, not a specific interface):
class TaskState:CREATED, RUNNING, WAITING_TOOL, VERIFYING, DONE, FAILED = range(6)def advance(task, event):if task.state == TaskState.RUNNING and event.kind == "tool_result":task.state = TaskState.VERIFYINGelif task.state == TaskState.VERIFYING and not event.passed:task.state = TaskState.RUNNING # Return to execution, carrying the failure reasonelif event.kind == "timeout":task.retry += 1task.state = TaskState.RUNNING if task.retry < 3 else TaskState.FAILEDreturn task
The key point is this: failure is not an exception but a normal branch of a state transition, and a failed verification must be able to return to the execution stage with the reason attached, rather than restarting the whole task.
4. Multi-Agent Orchestration: Moving Harness Experiments onto the Infrastructure
Once the foundation provides isolation and orchestration, teams start experimenting with different harness strategies, and multi-agent orchestration becomes a common test bed:
- Executor and advisor separation: One agent takes action while another only reviews without executing, reducing the risk of mistaken operations.
- Adversarial generation and review: Generation and validation constrain each other, which suits content and compliance scenarios.
- Swarm-style parallel search: Multiple instances investigate in parallel, suited to problems that can be split up, such as defect localization and solution exploration.
Three engineering points need attention: writes to shared state must be serialized or partitioned; subtask results need structured aggregation rather than free-text concatenation; and there must be an overall budget and concurrency cap to avoid subtasks multiplying cost.
5. Acceptance: From “Looks Right” to “Verifiable”
The acceptance layer should express success conditions as executable checks: unit tests, format validation, policy rules, and manual spot checks. Only when acceptance results are structured can the system automatically decide whether to retry, degrade, or hand off to a human.
6. A Reasonable Expectation One Year Out
Taken together, these trends support a conservative prediction: as managed infrastructure matures, the scaffolding teams have to build themselves will shrink significantly, the share of tool building and prompt tuning will decline, and the engineering focus will shift toward task definition, acceptance criteria, and data governance. Deep pairing between harness and model will still exist, but it will be encapsulated inside the platform, and users will face a stable runtime instead of brittle scripts.
Conclusion
Competition in agents has moved from “whose prompts are cleverer” to “whose runtime is more stable.” Building solid foundations in four areas—sandbox, state, asynchrony, and observability—before turning to harness and model tuning is the order that scales. For teams that want to build agents in their own environment, this layered architecture can be built on general cloud capabilities such as container platforms, object storage, message queues, and log monitoring, gradually approaching the goal of “deleting the scaffolding.”
