Routing Agent Tasks Across Multiple Harnesses by Task Type

Choosing the right harness for each task type improves agent reliability and cost efficiency.

· 10 min read
Cover illustration for “Routing Agent Tasks Across Multiple Harnesses by Task Type”
Harness Comparison · October 16, 2026 · 10 min read · 2,177 words

The choice of which harness runs an agent task is a structural decision, not a configuration detail. Routing tasks across Claude Code, OpenAI Codex, Cursor, and OpenCode by task type produces reliable output without locking a team into one tool. The framework below explains how to classify tasks and dispatch them deliberately.

Why harness choice is a structural decision, not a configuration detail

The dominant assumption in most engineering teams today is that swapping models is equivalent to switching agent capability. This conflates model routing with harness routing, and that conflation produces unreliable task outcomes. Model routing chooses which model handles an inference request while the same agent loop stays in place. Harness routing chooses the runtime that owns the complete task, including how it plans work, calls tools, manages files, and decides when a task is done.

Because each harness has its own task format, event stream, session model, and filesystem behavior, adding a second harness is not a config change. A model without a harness remains a passive generator, and a harness without capable models has no intelligence to orchestrate. A harness-native agentic routing architecture with multi-model configuration achieved a score of 60.82 on the full 100-task DRACO run, so the distinction carries operational weight.

Teams that want to run coding agents in the cloud with their own API keys face this question directly. Platforms like Replicas, which manage multiple harnesses in isolated cloud VMs, need to make this distinction explicit in their dispatch logic. If you treat harness routing as a configuration toggle rather than deliberate dispatch, you get inconsistent outcomes across identical task types.

What each major harness is actually built to do well

The four harnesses in active use have structurally different operating profiles that are not interchangeable, even when pointed at the same model. Each one encodes a distinct theory about where the developer should sit relative to the agent and how much state the agent should carry. Claude Code is terminal-first, built for deep autonomy on complex multi-file work. Its configuration surface includes CLAUDE.md, supporting MCP servers, hooks, subagents, and multi-agent orchestration. The harness assumes a developer who wants to hand over a large, coherent task and let the agent work through it with minimal intervention. It uses Git worktrees to queue separate tasks in parallel without polluting the shared working directory, but merge conflicts can still arise at integration time. That makes it structurally suited to high-volume, independent work items. Its configuration surface is AGENTS.md, MCP servers, and multi-agent orchestration.

Cursor is editor-first. The agent lives inside an AI-native code editor, suited to developers who want to see and accept changes in context. The configuration surface includes.cursor plus AGENTS.md, MCP servers, and plugins. Its strongest fit is interactive, in-editor work where a developer wants tight review control over each change. OpenCode rounds out the set as a full agent harness with a real tool loop, Language Server Protocol integration so the agent can read diagnostics as feedback, and session management for isolating separate work streams. It connects to over 75 providers and is designed to route different tasks to different models within a single run: a fast, cheap model for simple questions, a reasoning model for architecture, a coding-specialized model for implementation. Its configuration surface is AGENTS.md, MCP servers, and multi-agent orchestration. OpenCode is the strongest fit for teams that want model-agnostic, open-source infrastructure with provider flexibility.

A practical task taxonomy for routing decisions

Diagram: Four Task Types, Four Harness Fits. Visualizes: Show a ranked/categorized mapping of four task types to their best-fit harness.

Before you can make any routing decision, you need a shared vocabulary for task types. Without it, routing stays ad hoc and the same task gets dispatched inconsistently across runs. Four primary task categories cover most of the work an engineering team delegates, and each has a distinct harness fit.

Deep, multi-file implementation tasks include new features spanning multiple modules, architectural refactors, and complex bug fixes with cascading effects. These require sustained autonomy, multi-session state, and rich tool access, which are precisely the conditions Claude Code's harness is designed for. Its 30 hook events and Dynamic Workflows make it possible to verify intermediate states, recover from partial failures, and maintain coherence across a long execution. The OpenSquilla paper identifies long-context recovery and repository-scale editing as structurally specialized capabilities that differ across harnesses, not just models.

High-volume, parallelizable, well-scoped tasks cover dependency updates, test writing, documentation generation, mechanical migrations, and repetitive bug fixes with a reproducing test. These tasks are independent of each other, with no shared state and no merge conflicts, so the harness that wins here is the one that can queue and run them simultaneously. OpenAI Codex's Git-worktree-based parallel execution and background PR delivery make it structurally suited to this class of work. Token efficiency matters too: running dozens of these tasks simultaneously amplifies per-task token costs, so the leaner execution profile of Codex is a structural advantage over more token-intensive harnesses.

Interactive, in-editor review and refinement tasks include code review responses, inline refactors, PR comment follow-ups, and changes a developer wants to inspect and accept step by step. These tasks are not background work. The developer wants to remain in the loop at each step, which is exactly what Cursor's editor-native harness is built for. Cursor 3.6's three-stage review filter, with allowlisted auto-run, sandboxable isolation, and a classifier subagent, is a harness-level feature that structures this kind of human-in-the-loop control.

Model-flexible or multi-model pipeline tasks span different reasoning demands: planning requires a reasoning model, implementation requires a coding-specialized model, and validation requires a fast, cheap model. OpenCode routes across over 75 providers natively within a run, so it is the natural harness when a task does not fit a single model profile. It is also the right choice for teams that want to preserve optionality as better models ship, without being locked into a single provider's tool call format.

The OpenSquilla paper's four-layer routing stack provides a useful structural analogy here. It layers a token-complexity filter, a task-type classifier, a context-aware refiner incorporating harness state, and a LightGBM ranker selecting the cheapest capable model. Harness-native agentic routing improved quality by 1.02 points on the DRACO benchmark, and average cost per task dropped to $0.3766. Replicas surfaces this as a dispatch decision triggered from Slack or Linear, so tasks arrive at the right runtime with the right context pre-loaded, rather than being retrofitted into a single harness after the fact.

Why letting agents self-route by task type consistently fails

The obvious objection to a routing framework is that the agent could decide for itself. The evidence says otherwise. Leaving routing decisions to the requesting agent produces systematic errors that compound over time, because the agent optimizing for task completion is not the right entity to evaluate execution environment fit.

The Organ production case illustrates the failure modes directly. When agents picked their own workflow type, a deprecated catch-all tool labeled "do not use" in its own description received far more calls than all five typed tools combined over the same period. Code changes were routed through generic task workflows that had no review or validation phase, meaning AI-generated code shipped without one. There was no deduplication: hundreds of developer runs carried unique idempotency keys, so not a single duplicate was ever caught. The structural principle the case surfaces is that the agent asking for work should not also decide the routing. That decision requires facts the requesting agent doesn't have, including what's already in flight, what resources are committed, and what gates apply. A secondary failure mode compounds the first: agents route around task-type boundaries when the routing decision is made by the same model that wants the task to proceed, because the incentive structure is misaligned.

The performance numbers add context without softening the lesson. Organ's routing workflow had an 86.3% completion rate across the finished runs recorded, and routing cost averaged at least $0.77 per started run. Completion without correct routing still produces the wrong work.

How to build a routing layer that separates classification from dispatch

Diagram: Routing Layer: Three Concerns in Sequence. Visualizes: Illustrate a three-stage pipeline that separates evidence gathering, routing judgment, and dispatch authorization — the architecture the article prescribes.

A reliable harness routing layer separates three concerns that most teams currently collapse into one: evidence gathering, routing judgment, and dispatch authorization. The separation is what keeps the system auditable and correctable. Gather routing inputs with deterministic code, not a model. Collect what's already in flight, which repositories are registered, what spend is committed, and what task types are queued, all as structured facts before any model reasoning begins. Anything that can be a query should be a query. The model only reasons over facts that are already settled. The OpenSquilla paper describes a context-aware refiner layer, the third of four routing layers, that incorporates harness state rather than just query content into routing decisions.

Task-type classification is the first routing gate. The classification should be a structured, inspectable output, not a free-text recommendation, so it can be checked against policy in a separate pass. Task type is fast and cheap to determine, but harness-state refinement is slower and should not block classification.

Policy review happens in a separate pass before dispatch. The pass should be able to rewrite the routed request by removing a gated step, or deny it with a named condition. A denial with no next step is how work gets lost. Invariants are enforced in code, not by a model: the repository must be registered, spend must be within cap, and the same context must not already have a request in flight.

Dispatch goes to an isolated environment per task, not per harness. Each routed task should run in its own sandboxed VM with isolated filesystem, network namespace, and compute allocation, regardless of which harness handles it. This is not redundant with harness-level isolation. The cost evidence is modest but real: model tokens for routing cost $708.50 across the Organ runs with recorded cost, a number worth tracking from day one.

What full attributability across harnesses makes possible

A routing framework that dispatches tasks to the right harness but produces no structured record of what ran cannot improve. Every routing decision is made blind to the history of prior decisions. The data each routed task should produce includes which harness handled it, which model ran inside that harness, how long it ran, what it cost, and whether the output was merged, revised, or rejected.

The OpenSquilla paper names this the harness-native data flywheel. Every routing decision produces a structured record whose labels are supplied by the environment rather than by the router itself, and those records train better routers over time. These are two very different problems with very different fixes. Attribution also surfaces harness-level cost patterns. If a task class consistently uses far more tokens on one harness than another for equivalent output quality, that is a routing signal, not just a cost fact.

The Organ production data illustrates what becomes visible with full logging: completion rates by week, cost per routed run, failure modes by task type, and the ability to trace a failure to its cause, whether self-routing, a missing policy gate, or missing deduplication, rather than attributing it to model quality. Harness-native agentic routing reduced cost by 68.9% relative to the baseline. Replicas implements this attribution on every run, recording source, harness, model, credential, and duration, so the feedback loop is operational from the first dispatched task rather than retrofitted after the failure review.

Where to start routing tasks across harnesses without rebuilding the workflow

The practical barrier to harness routing is not conceptual. Most engineering leads understand the value immediately. The barrier is operational: teams fear that adding a second or third harness means rebuilding how they trigger and receive agent work.

The recommended starting sequence is deliberately narrow. Start with the highest-volume, most clearly scoped task class the team already runs, typically dependency updates, test writing, or bug fixes with a reproducing test, and route that class to a single harness consistently for four to six weeks before adding routing logic for a second class. Add a second harness only after the first routing path has a measurable baseline. Completion rate, cost per run, and merge rate are the three numbers that matter at this stage. Keep architecture decisions, sensitive repository access, and data migrations outside the routing framework until you have at least eight weeks of production routing data to calibrate against.

The integration surface matters as much as the routing logic. Routing should trigger from wherever work already lives, whether Slack, Linear, GitHub, or GitLab, so engineers don't adopt a new interface to get the routing benefit. Replicas provides the execution layer for this model directly: agents run inside isolated, fully configured VMs pre-loaded with the team's dependencies, triggered from those same systems, and return pull requests with every run attributed by harness, model, and credential.

The harness-agnostic posture is a durability argument, not just a flexibility one. As better models ship and harness capabilities shift, teams that have built routing logic on task types rather than on a single harness retain the ability to swap the harness under a task class without redesigning the workflow. Routing by task type is how a team stays harness-agnostic in practice, not just in principle.

Sources

  1. Agentic Routing: The Harness-Native Data Flywheel

More in Harness Comparison