A technical publication on agent-native infrastructure, persistent VM architecture, and deploying production AI agents at scale.

Multi-Step Task Continuity in Agentic Pipelines

Agents fail at long tasks because systems don't preserve state between steps.

· 11 min read · Updated
Cover illustration for “Multi-Step Task Continuity in Agentic Pipelines”
Persistent Agents · October 8, 2026 · 11 min read · 2,489 words

Multi-step task continuity in agentic pipelines fails because of infrastructure, not intelligence. Agents lose the thread between steps because the systems built around them don't hold onto state and hand it back when needed, not because the underlying model can't reason well enough to finish the job.

The formal shape of an agent is a loop: perceive, reason, act, observe, repeated over however long the task takes. For that loop to hold together across an extended stretch of work, the model needs enough of the right context at each turn to act the way it did on the turn before. Nearly every pattern used to build agents today is some variation on this cycle, and the place where the cycle breaks down repays careful tracing.

The break happens at the boundary most agent systems are built around: one context window, then a stop. Real enterprise work doesn't respect that boundary. An operations remediation can outlive the shift that opened it. A compliance investigation can run for a week, touching dozens of documents, several reviewers, and a handful of systems that don't share a clock.

Making the context window bigger or swapping in a stronger model moves the boundary further out without getting rid of it. Context compaction quietly deletes state the agent needed, agents drift from the goal they started with as the task stretches on, and no matter how much room the window has, the work itself can always run longer than the room allows. StackAI's 2026 architecture guide makes the point bluntly: gains in agentic systems come from picking the right architecture and the right guardrails for the job at hand, not from a smarter model dropped into the same broken scaffolding.

What an agent needs is state that lives somewhere durable outside the window, regardless of how long that window is.

How state loss propagates through a sequential pipeline

A sequential pipeline runs agents in a fixed, predefined order, each one handing its output to the next through whatever shared state the system provides, with the sequence locked in at design time. Beam.ai's 2026 production patterns guide points to a Microsoft Azure Architecture Center example that makes this concrete: a law firm's contract generation pipeline, broken into template selection, clause customization, compliance review, and risk assessment, with a separate agent handling each stage.

The failure that matters most here is easy to miss because it looks like the pipeline is working. By the time the work reaches the fifth agent in a standard pipeline, that agent sees only what the fourth agent handed it. The organizational profile established back at step one, the detail that gave the whole task its shape, is gone by then, and early prototypes of these pipelines show this breakdown happening in exactly that way.

Once bad output enters the chain, it propagates through every stage that comes after it. A pipeline shares no memory of what was established earlier, so an error introduced upstream travels downstream unnoticed, with nothing to flag what the correct version looked like. That is the specific hazard sequential pipelines carry that other architectures don't: there's no backtracking, because there's nothing to backtrack to.

SearchOS, a framework built around exactly this problem, treats it as a system-design failure rather than a model limitation: agents tend to treat plans, progress, evidence, and failed attempts as disposable conversation content, when the system should hold onto that information instead. The project's own framing states that search state should be maintained by the system rather than inferred repeatedly from interaction history. SearchOS's answer is Search-Oriented Context Management, which externalizes the evolving state of a task into four structures: a Frontier Task tracking what comes next, an Evidence Graph recording what has been established, a Coverage Map showing what gaps remain, and a Failure Memory logging what hasn't worked. Every agent in the system reads from and writes to this shared structure, so later stages inherit what earlier stages learned instead of starting from whatever scraps got passed forward.

None of this comes free. Beam.ai's guide documents a four-agent pipeline that accumulates roughly 950 milliseconds of coordination overhead against only 500 milliseconds of actual processing time, and a three-agent pipeline that burns nearly three times the tokens an equivalent single-agent approach would use. Specialization across multiple agents only earns back that overhead when the state between them is genuinely shared. Without it, the pipeline pays the full cost of coordination while actually getting less reliable as work moves downstream, because the fix was never going to be a better handoff between adjacent agents. It requires state that survives the handoff.

What persistent shared state requires architecturally

Durable continuity requires state built as an explicit artifact outside the agents themselves, something every stage in a pipeline can read from and write to on demand, rather than something that happens to accumulate as a side effect of agents talking to each other. StackAI's guide sorts agent architectures by workflow shape and control topology: sequential, hierarchical, fan-out/fan-in, swarm. Memory and state sit on top of all four as a separate capability layer, and the question that actually decides whether a system holds together is whether that layer is durable or whether it evaporates at the end of each turn.

Applied to a sequential pipeline, the fix is a persistent context every agent in the chain reads and writes to, so a stage five steps downstream knows what a stage three steps upstream established. Absent that, the pipeline behaves no differently from a sequence of one-turn calls that happen to run in order. SearchOS's SOCM shows what this looks like worked out in practice: a Frontier Task naming what's next, an Evidence Graph recording what's been established and where it came from, a Coverage Map tracking what's still missing, and a Failure Memory holding onto which search patterns already failed so the system doesn't repeat them. Each one is a durable, shared structure, not a line item in a transcript that gets discarded once the conversation moves on.

The orchestrator-worker pattern has become the dominant way to put this into practice. One orchestrator takes in the task, splits it into subtasks, and hands them to specialist workers; beam.ai's production guide notes the orchestrator typically runs a more capable model while the workers run cheaper, narrower ones. Because the orchestrator is the one component that sees the task from start to finish, it's the natural place to anchor persistent shared state.

That design has its own failure mode when persistence isn't built in correctly: context window overflow. Once four or more workers are reporting back, the orchestrator's accumulated context routinely exceeds what the window can hold. A bigger window doesn't solve this, because the orchestrator doesn't need more room to hold raw transcripts. It needs summaries written to externalized state so it can reconstruct what happened without replaying the entire conversation.

A harness-level mechanism called durable execution handles the related problem of waiting. When an agent needs to pause for a tool response, a human approval, or a timer, a durable execution harness snapshots the full state of that execution to durable storage, lets the process terminate completely, and resumes it later from the exact point it left off. Researchers at Tsinghua and Pengcheng Laboratory frame this with a direct analogy: if the language model is the CPU and the context window is main memory, the agent framework around it is the operating system, and state management belongs to that operating system layer.

None of this, however, means the problem is solved once the software holds the state correctly. Durable state at the application level only matters if the machine running the agent can actually preserve and restore the full environment that state refers to, files, open connections, credentials, everything mid-task. The compute layer underneath the software has to answer that question.

The compute layer's role in making persistence real

Persistent state written correctly at the application layer still depends on whether the compute substrate underneath can snapshot and restore a complete, isolated agent environment. Containers can't do this reliably, which makes them the wrong foundation for an agent that needs to survive a pause and come back exactly where it left off.

Containers share a layer with the thing they're meant to contain. Denylists, permission prompts, and container boundaries all exist in the same space an agent reasons in, in userspace, in the logic and language the agent itself operates on. A microVM's isolation is enforced underneath that layer, at the hardware level, somewhere the agent has no way to reason about or get around.

Security isn't the only reason containers fall short here. A running agent environment carries open file handles, in-progress network connections, and kernel state that containers have no reliable way to snapshot and restore to the exact mid-execution point where the agent left off. Containers save application data. They don't preserve the full execution context an agent needs to resume as though nothing happened, which is the gap Maritime, a cloud infrastructure platform that gives each AI agent its own persistent Firecracker micro-VM, was built to close.

Firecracker, the microVM technology built for exactly this kind of isolation, launches a minimal virtual machine with its own kernel in under 125 milliseconds, with less than 5MB of memory overhead. It uses KVM for hardware virtualization, which gives it the isolation guarantees of a full virtual machine at a performance cost close to a container's. The virtual machine monitor itself is written in Rust, with a device model kept deliberately small to limit what there is to go wrong.

Production systems have already built around this. AWS Bedrock AgentCore provisions a dedicated Firecracker microVM for every agent session running its Code Interpreter and Runtime tools. Deno Sandbox, Deno's managed service for running untrusted code in the cloud, announced in beta on February 3, 2026, runs each sandbox as its own dedicated Firecracker microVM on Deno Deploy's infrastructure.

GPU access draws a real distinction between isolation approaches. gVisor's user-space kernel intercepts GPU calls and proxies them to the host NVIDIA driver through nvproxy, which supports CUDA workloads without giving the guest direct PCIe passthrough. Firecracker's hardware virtualization path takes a different route: it has no PCI bus and no VFIO device assignment, so it doesn't support that kind of passthrough. Teams that need direct GPU passthrough alongside microVM isolation need a different virtual machine monitor, such as Cloud Hypervisor or QEMU/KVM.

The security case for hardware-level isolation got a concrete demonstration in a vulnerability disclosed by Microsoft in February 2026 and made public in May 2026, CVE-2026-25592, which showed how prompt injection inside an agent framework could escalate into host-level remote code execution. Isolation enforced at the hardware layer is the structural answer to that kind of failure, because it sits below the point where a manipulated agent's own reasoning can reach.

Snapshot-restore scheduling and the idle-cost problem of per-agent isolation

Running a dedicated microVM for every agent session has looked too expensive to justify at scale, because idle compute is what drives cost once the number of concurrent sessions gets large. Snapshot-restore scheduling solves this by letting an idle agent cost what storage costs.

Consider what a single agent session actually looks like over time. It might fire off a burst of tool calls in a few seconds, then sit completely idle for 30 seconds waiting on a human to respond, a database query to return, or an external API to answer. Multiply that pattern across millions of concurrent agent sessions: an architecture that keeps every session's virtual machine running the whole time pays for idle compute at a scale no other part of the infrastructure stack would tolerate.

A three-temperature lifecycle model, drawn from an AWS-published sample project and blog series built around multi-tenant agent fleets on Lambda MicroVMs, gives a working answer. A session in the Hot state is running, billed at full rate, with zero restore latency. A session in the Warm state is suspended, billed at a reduced rate, and takes seconds to resume. A session in the Cold state is fully terminated, with its state held in durable storage at close to zero cost. Under this model, cost tracks how many sessions are actively doing something at a given moment, not how many sessions exist in total.

Polling breaks this model. A continuous polling loop keeps a virtual machine busy by definition, so it never goes idle and it never suspends. A thousand tenants polling continuously means a thousand virtual machines running at full rate all the time, which erases the entire economic argument for the cold tier before it gets a chance to work.

Copy-on-write snapshotting is the specific mechanism that bends the cost curve. An idle virtual machine that hasn't been snapshotted still occupies a host whether it's doing anything or not. Snapshotting lets the number of hosts in use track actual active concurrency instead. A session that has only changed a small number of disk chunks adds very little new data to storage, even if the guest machine itself sees a full 128 GiB disk.

Durable execution harnesses are what make this work for agents waiting on something outside their control. When an agent suspends to wait for a tool response, a human approval, or a timer, the harness snapshots its full execution state to durable storage and lets the underlying process terminate completely, dropping compute cost to near zero for as long as the wait lasts. That's the specific mechanism behind why idle-pending cost falls sharply for any workflow with a human-in-the-loop step. Isolation at the per-agent level stops being a cost nobody can justify once snapshot-restore makes the idle portion of that cost approach zero.

What this means for choosing and evaluating agent infrastructure

Evaluating agent infrastructure means testing for three concrete properties: durable isolated state, sub-second wake latency, and idle cost priced like storage.

Durable isolated state means the agent's full environment, its files, credentials, open sessions, and installed packages, survives being put to sleep and brought back, including across a redeploy. Testing for this is straightforward: suspend an agent in the middle of a task and check whether it resumes into exactly the same execution context it left, not an approximation rebuilt from a summary.

Storage-priced idle cost means an idle agent accrues charges at storage rates, not at the rate of a running virtual machine. If the billing model charges for a running VM regardless of whether it's doing anything, the economics described above don't hold at scale, and a fleet of per-user agents becomes unaffordable well before it becomes useful.

StackAI's guide offers a design principle that applies directly here: give an agent system the smallest amount of freedom it needs to deliver the outcome, then put the real engineering effort into tool design, safety, and observability. Infrastructure that provides genuine isolation and genuine persistence makes that principle enforceable, because it turns the safety boundary into something guaranteed by hardware.

Sources

  1. SearchOS-V1: Towards Robust Open-Domain Information-Seeking Agent Collaboration
  2. Model-Native Computing Architecture: Envisioning Future System Architecture Through the Lens of Computer Architecture
  3. An Architecture for Long-Horizon Agents: Levels, Ticks and Cascaded Intelligence
  4. Firecracker

More in Persistent Agents