Est.

Scheduling Strategies for Concurrent Agent Workloads

Operating systems solved this decades ago; AI agents need the same scheduling primitives.

Senior Writer · · 11 min read
Cover illustration for “Scheduling Strategies for Concurrent Agent Workloads”
Agent Runtime Internals · September 26, 2026 · 11 min read · 2,521 words

Concurrent AI agents fail the same way unscheduled operating system processes fail: they starve each other, they thrash against shared limits, and they collapse in cascades once one part of the system gets overloaded. This piece lays out the scheduling primitives, borrowed directly from operating system design, that fix this, and it works through why each one matters using a documented failure case.

Why concurrent agent workloads fail without scheduling

Running several AI agents at once has stopped being a niche pattern. Most new AI projects now use some kind of orchestration framework to coordinate multiple agents, and analyst projections put task-specific agents inside a large share of enterprise applications within the next couple of years, a sharp jump from where things stood in 2025. Multi-agent systems are becoming the default way people build with these models.

But orchestration is not scheduling, and the difference affects how teams handle failures and resource contention when systems scale. The popular frameworks for building agent systems give you a way to compose steps: chains, multi-agent conversations, handoffs between roles. What they don't give you is any concept of the LLM API as a limited resource. In OS terms, they run a multiprocess system with no scheduler. Every agent just fires its requests and hopes the plumbing holds.

The HiveMind incident from April 2026 shows what that hope costs. Eleven Claude Code agents ran in parallel against a single Anthropic API key. Three of them died, a 27% failure rate, and each dead agent had already burned around 45,000 tokens before it went down. That's roughly 135,000 tokens spent for nothing, plus all the wall-clock time that went with them. The API itself had plenty of room to serve all eleven agents if they'd gone one after another. Nothing about capacity caused this.

The people who investigated the incident said the failure was a coordination problem, not a capacity problem. A simple stagger between agent launches would have saved all three. That's the whole argument for scheduling in one sentence: the resource was fine, the traffic pattern wasn't.

Why the OS-to-agent scheduling analogy holds

Operating systems built schedulers for exactly this reason. Multiple processes competing for CPU cycles, memory, and I/O without any coordinating layer leads to thrashing, starvation, and deadlock, problems computer science solved decades ago. The HiveMind authors draw this comparison directly and treat it as a formal mapping, not a loose metaphor.

When the resources are lined up, the analogy holds cleanly. API rate limits play the role of CPU time. Token budgets and context windows play the role of memory. Network connection concurrency and per-key quota play the role of I/O bandwidth. Each agent instance is a process. And the scheduler that's supposed to arbitrate all of this is simply missing from most agent frameworks today. HiveMind and a related system called SAGA were built to close that gap.

Agent workloads do carry one complication that OS processes never had to deal with. A process is a fairly uniform unit of work from the kernel's point of view, but an agent "process" is usually a graph, a chain of tens or even hundreds of dependent calls, sometimes looping back on itself. That means preempting or reordering an agent isn't free the way pausing a CPU thread is. There's state, context, partial output, all of it tied up in the steps already taken. A scheduler that doesn't account for this will make bad calls.

Workload shape matters just as much as workload volume. Some agents run as a simple sequential chain, some fork into parallel branches and join back together, some sit in a self-reflection loop, re-checking their own output before moving on. A scheduler built to treat every agent as an identical unit of work misses the structure entirely, and structure determines where contention appears.

Admission control: deciding which agents may proceed before they consume resources

The OS equivalent here is the semaphore, or the condition variable that blocks a process from entering a critical section until a resource frees up. HiveMind implements the same idea at the proxy layer: agents wait at a gate, and the gate only opens when capacity is actually confirmed.

The payoff is straightforward once you see the alternative. Without admission control, an agent can run tens of thousands of tokens deep into a task before it hits a rate limit and dies, and all of that compute is wasted. With admission control, the agent never gets that far in the first place; it waits at the gate instead. In HiveMind's controlled scenarios, this cut wasted compute by a range of 48% to 100%, depending on the scenario.

Two design decisions shape how this plays out in practice. One is hard admission versus soft admission: hard admission blocks the agent entirely until capacity clears, while soft admission lets the agent in at a lower priority and keeps watching it. The other is scope, global admission control versus per-provider admission control. HiveMind takes the per-provider route, auto-detecting provider profiles and tracking rate limits separately across Anthropic, OpenAI, Azure OpenAI, Google AI, and local model runners like Ollama, since each of these has its own limits and its own failure behavior.

Admission control by itself is not the most important piece of this system. The ablation studies point somewhere else. Admission control compounds the effect of the other primitives, and the combination is where the real reliability gain is visible.

Priority queuing and dependency-aware dispatch

Operating systems solved the "what runs next" question a long time ago with multilevel feedback queues and priority scheduling: short jobs and urgent jobs get to run before long background jobs, and interactive tasks don't wait behind batch work. Agent scheduling needs the same logic, and HiveMind implements it through priority queues layered on top of dependency graphs. If one agent depends on another agent's output, the scheduler promotes the upstream agent so it doesn't sit there blocking everything downstream of it.

First-in-first-out is the wrong default here, and it's easy to see why. A bulk analysis job with no urgency, admitted first simply because it arrived first, can sit in front of a time-sensitive interactive agent and force it to wait. In a fork-join topology, where several branches have to complete before the results join back together, a single straggler on the critical path drags out completion time for every downstream consumer of that result, even the ones that finished their own branch early.

SAGA takes this idea down to the GPU layer with session-affinity batching combined with work stealing. Requests belonging to the same agent workflow get grouped onto the same GPU node, which preserves the KV cache and avoids redundant recomputation, while work stealing keeps any single node from turning into a bottleneck. This is scheduling at the level of the whole program, not at the level of individual requests, and it's a meaningfully different problem than the request-level dispatch HiveMind handles at the proxy.

Work-conserving dispatch with AIMD backpressure and circuit breaking

A scheduler is work-conserving if it never leaves a resource sitting idle while there's runnable work waiting for it. The goal for agent scheduling is to push the API or the GPU cluster as close to saturation as possible without triggering the failure rates seen when nobody's coordinating traffic, that 27% failure rate from the HiveMind incident being the cautionary number to keep in mind.

HiveMind borrows AIMD, additive increase and multiplicative decrease, straight from TCP congestion control. Concurrency climbs a little at a time as requests succeed, then drops sharply the moment latency crosses a target threshold. Errors like 429 and 502 responses get handled separately by a co-located circuit breaker. In practice, this is rate-limit tracking done as a live feedback loop rather than a fixed ceiling set in advance.

Circuit breaking adds protection by cutting off admission when a provider is failing. Once error rates cross a threshold, the circuit opens, and no new agents get admitted to that provider until conditions recover. Without this, an overloaded provider triggers a wave of retries from every agent at once, which piles more load onto a system that's already failing, the exact kind of cascade that turns one bad request into a system-wide outage.

The numbers from HiveMind's evaluation make the case on their own. Across seven scenarios ranging from 5 to 50 concurrent agents, uncoordinated execution failed at rates between 72% and 100%. With HiveMind's scheduling layer in place, failures dropped to somewhere between 0% and 18%. Most of that gap comes down to AIMD backpressure and circuit breaking, working together to stop the retry storm before it starts.

Diagram: Uncoordinated vs. Scheduled: Failure Rates Across 7 Scenarios. Visualizes: Show the contrast in agent failure rates between uncoordinated execution and HiveMind's scheduling layer, across the range of concurrent-agent scenarios tested (5…

Per-agent token budgets and fairness accounting

Linux has cgroups and ulimits so one runaway process can't eat all the system's memory and take everything else down with it. Token budgets are the same idea applied to agents: cap how much any single agent can consume so it can't quietly drain a shared API quota that other agents need too.

HiveMind assigns each agent a token ceiling. At 85% of that ceiling, the agent gets a warning. At 100%, it's checkpointed and stopped, much as an operating system enforces a hard resource ceiling on a runaway process. The motivation traces straight back to the HiveMind incident: those three dead agents had already burned 45,000 tokens each by the time they failed, and a budget check would have caught that spend well before it turned into waste.

SAGA extends the fairness idea to the GPU cluster with something it calls Agent Fair Share, a metric measuring task completion time with provable bounds on how much any tenant's agents can deviate from their fair share. The goal is to stop one tenant's agents from getting systematically starved by noisier or higher-priority neighbors on the same cluster, even under real multi-tenant interference. In evaluation, this held SLO attainment at 99.2%.

Kubernetes has its own version of this pattern through Volcano, which enforces queue-based fairness policies so no single ML team can monopolize a shared pool of GPU nodes. The mechanism looks different at each layer, API quota versus GPU cluster, but the underlying principle doesn't change: shared resources need an enforced ceiling, or someone always ends up taking more than their share.

Transparent retry as the most critical primitive

HiveMind's ablation studies found that transparent retry, not admission control, is the single most critical scheduling primitive in the whole system. Removing it drops reliability further than removing any other piece.

That result cuts against instinct. Engineers tend to build admission control and priority queuing first because those feel proactive, like real engineering. Retry logic feels like error handling bolted on afterward, not something that belongs in the scheduler itself. The OS framing corrects that instinct: retry isn't cleanup, it's fault tolerance built into the scheduling layer, the same as everything else discussed here.

Disk I/O makes the analogy concrete. When a kernel hits a transient read failure, it retries the operation silently; the process that requested the read never even finds out there was a problem. HiveMind does the same thing at the HTTP proxy layer, catching 5xx errors and connection resets and retrying them before the agent ever sees a failure.

"Transparent" here has a specific, narrow meaning: zero changes to the agent's own code. The proxy intercepts the failed call, retries it with exponential backoff, and hands back either a clean success or a clean failure. The agent's internal logic never has to know the retry happened.

Where the scheduler lives: proxy, sidecar, and cluster layers

Scheduling for agents doesn't live in one place. It appears at three layers, and each one covers a different scope of the problem.

At the API-proxy layer, the HiveMind model, a transparent HTTP proxy sits between the agents and the LLM API endpoint, handling admission control, AIMD backpressure, token budgets, and retry all in one place. Agent code doesn't need to change. This layer operates at the level of individual requests, inside a single team's deployment.

At the cluster layer, the SAGA model, a distributed scheduler replaces or sits alongside the inference server's default scheduler, operating at the level of whole workflows and across multiple tenants. Getting the full benefit here requires the framework to expose hints about its execution graph, things like callback logs. Without those hints, SAGA's task completion time degrades by 12% to 18%.

At the infrastructure layer, tools like Kubernetes paired with Volcano or the KAI Scheduler enforce gang scheduling at the level of pod groups, so a distributed job doesn't get scattered across node configurations that don't fit it, the way a default pod-by-pod bin-packing scheduler might place it. Queue-based fairness policies at this layer keep multiple tenants roughly equitable across the whole cluster.

These layers stack rather than compete. A team can put HiveMind in front of its API calls today with no change to cluster infrastructure at all, then add SAGA-style workflow-aware scheduling later as its GPU footprint grows and workflow-level contention starts to matter more than request-level contention.

SAGA degrades further, beyond that baseline 12% to 18% hit, on frameworks where the workflow structure gets generated dynamically through agent-to-agent debate rather than fixed in advance. The scheduler simply can't predict KV cache reuse it has no way to observe ahead of time. That's an open problem in the research right now, not a solved one, and a handful of research threads, including work published under names like TOPAS, MARS, Continuum, and MORI, are actively pushing on it.

Building a schedulable agent system: what engineers should implement first

Diagram: Scheduling Primitives: Build Order and Leverage. Visualizes: Show the five scheduling primitives in the recommended implementation sequence, with a clear sense of relative impact.

Retry comes first. The ablation data says so directly: it's the single highest-leverage primitive, it requires no changes to existing agent code, and it can sit in a proxy layer that gets deployed once and then forgotten. Any team running more than a handful of concurrent agents against a shared API key should have transparent retry with exponential backoff in place before touching anything else on this list.

Admission control and token budgets come next, and they belong together, since token budgets are what tell admission control when an agent has already used its share. Building these two side by side is far cheaper than adding them separately, and the wasted-compute numbers from HiveMind's evaluation, that 48% to 100% range, make the case for building them early rather than after the first outage.

AIMD backpressure and circuit breaking follow once the above is stable, because both depend on having real traffic data to tune against, thresholds for latency, thresholds for error rate, and those numbers only mean something once actual load is flowing through the proxy.

Priority queuing and dependency-aware dispatch matter most for teams already running fork-join or multi-stage workflows, where a straggler agent can visibly hold up everything behind it. Teams running mostly independent, single-shot agents can leave this for later without much cost.

Cluster-level fairness and gang scheduling belong at the end of this list because they only start paying off once GPU footprint and tenant count grow past what a single API proxy can reasonably arbitrate. Building this layer before the request-level layer is solid is solving a problem that hasn't arrived yet.

Sources

  1. HiveMind: OS-Inspired Scheduling forConcurrent LLM Agent Workloads
  2. HiveMind: OS-Inspired Scheduling for Concurrent LLM Agent Workloads
  3. SAGA: Workflow-Atomic Scheduling for AI Agent Inference on GPU Clusters

More in Agent Runtime Internals