Repo Isolation Routing How a Managed Agent Platform Assigns Claude Code Codex Cursor or OpenCode to the Right Job
A managed platform picks the right coding agent by checking policy and runtime fit first.

A multi-harness cloud coding agent platform routes Claude Code, Codex, Cursor, or OpenCode by matching the job to an isolated runtime. Its routing layer applies governance constraints, reads workload shape, and assigns a compatible harness. Engineers can start work from Slack or an issue tracker and get a pull request to review without having to manage each agent’s infrastructure.
Why agent selection is the wrong frame for routing
Manual agent selection assumes that agents are stable, interchangeable tools whose suitability can be judged independently of where they run. An agent may fit a task but lack the gateway path, credential boundary, or execution scope that it needs. Capability alone does not establish eligibility for the job.
The more useful distinction is between the harness that performs the work and the system that makes its execution safe. A managed platform reads repository characteristics, runtime requirements, and workload shape before assigning a harness. Developer preference can inform that assignment, but it cannot override a constraint that makes execution unsafe or incompatible with policy. The product is the environment.
What each agent actually requires from its runtime environment
The agents differ in the shell access and filesystem scope they have, how they handle model routing, and their gateway compatibility. Claude Code has a 1M token context, deep MCP integration, and cross-file dependency reasoning, so it fits long-context, multi-file work. That work needs an environment in which repository access, tool connections, and model traffic follow the task’s constraints.
Codex suits asynchronous work in a sandboxed VM, where execution can proceed without a developer watching. Its gateway path depends on provider configuration. Codex CLI uses OPENAI_BASE_URL with the built-in OpenAI provider, while custom model_provider configurations use their own base_url. OpenCode’s model-agnostic design serves a different requirement, allowing a workload to use a chosen provider or a self-hosted model endpoint.
Cursor remains anchored in the IDE and inline interaction. Cursor 3, launched April 2, 2026, added an agent-first interface and an Agents Window for parallel work across repositories, locally, in worktrees, in the cloud, and over remote SSH. It supports per-agent selection across Claude, GPT, and Gemini, while Cursor Router added automated per-request multi-provider routing on July 22, 2026. Parallel execution still needs a suitable host. Amazon Bedrock AgentCore’s official blog notes that agents running on a laptop share the developer’s shell, filesystem, tokens, VPN, and loaded SSH keys, while closing the lid can stop their work.
Repo isolation as the technical precondition for safe parallel delegation
Those shared resources make isolation a precondition for safe parallel delegation. Separate branches do not create separate security boundaries. A git worktree can separate working files, but multiple agents remain processes on one host, with shared exposure to secrets and ports. Assigning a branch to each agent therefore solves only part of the problem.
Amazon Bedrock AgentCore gives each agent session a dedicated isolated Linux microVM with a persistent workspace, a real shell, and deterministic command execution. Its Identity layer lets the agent act as the user who triggered it. Its Gateway exposes GitHub, Jira, Slack, and other tools through one MCP endpoint while keeping real tokens outside the agent. Observability sends every step to CloudWatch.
That separation enables a concrete parallel-racing workflow. The same GitHub issue can go to Claude Code, Codex CLI, and Cursor CLI simultaneously, each in its own microVM. Each opens a pull request through the Gateway, and the team reviews and merges the best result. The platform needs traffic to go through the VPC rather than the public internet, identity to be tied to the company IdP, credentials to stay off disk inside the LLM-controlled environment, and CloudTrail records of every invocation.
How a managed platform reads workload shape to assign the right harness
Governance sets which assignments are allowed before the platform scores how well they fit the workload. Eligibility filtering then checks enabled harnesses, quota availability, and gateway compatibility, so an unavailable or incompatible harness never enters the ranking. The platform reads context depth, task duration, model routing requirements, and parallelism demand within that permitted set.
The resulting matches follow from the work itself. A long-context, multi-file refactor points toward Claude Code, while a fire-and-forget asynchronous task points toward Codex. Inline pair-programming points toward Cursor because the developer takes part in the editing loop. A model-agnostic or open-source-required workload points toward OpenCode. Gateway configuration, spend caps, audit requirements, and credential scope constrain each assignment before launch.
Gateway behavior shows why preference is insufficient. Claude Code propagates ANTHROPIC_BASE_URL to sub-agents and background tasks, whereas Codex CLI’s route depends on whether it uses the built-in provider or a custom provider configuration. Cursor had a reported sub-agent routing bug as of July 2026, in which the runner ignored the custom base URL and reverted to default routing. The fix shipped by October 2, 2026. Routing must therefore account for how the deployed harness works and whether its past limits still apply.
Parallelism also changes the economics of an assignment. A large Claude Code refactor can use a lot of tokens, and running several agents multiplies that use. Spend controls belong in the routing layer because that is where parallel execution is authorized.
What automation and event-driven triggers add to the routing picture
With event-driven work, the developer who might spot a poor assignment is out of the loop. Routing must work without that immediate correction. AgentCore supports container- or zip-deployed harnesses, allowing Claude Code, Codex, Cursor CLI, and OpenCode to be triggered programmatically. Their sessions can persist after the developer closes the laptop.
Linear’s coding sessions, launched June 11, 2026, show how far that workflow can extend. When a new issue arrives, Linear Agent can investigate and attempt a fix before an engineer receives it. Linear’s official changelog says the agent follows team guidance, gathers evidence from Sentry or Datadog through MCP, and inspects the codebase to trace the root cause. The same changelog reports that Linear uses this workflow internally to resolve roughly 30% of incoming bug reports, mostly on the first pass.
OpenAI Codex’s bug triage pattern connects Sentry, Slack, Linear, and GitHub in a sweep spanning alerts, issues, PR checks, deploy logs, support tickets, and conversations. It begins manually, is tuned in chat, and then runs on a schedule. It supports Claude Code, Cursor, and Codex, which fix and re-review the work on their own until the output is clean. These triggers leave no room to defer compatibility decisions to a developer prompt, so the routing layer must already know the workload’s model, gateway, and governance requirements.
How governance requirements narrow the assignment space
Rules for data residency, audit logging, gateway enforcement, and credential isolation can rule out a harness that would otherwise fit. A platform reads those rules from the workspace’s governance profile before scoring how well a harness fits the workload. This prevents capability matching from producing an assignment that policy will not permit.
Claude Code’s enterprise tier supplies SSO enforcement, SCIM provisioning, spend controls, and audit log integration. Its gateway configuration covers LLM inference traffic, including sub-agents, but the notes identify minor exceptions such as fast-mode checks and WebFetch preflight calls. Policy wording is therefore decisive. A requirement covering inference traffic is not necessarily identical to one covering every outbound request.
Cursor’s historical sub-agent gap makes the consequence concrete. While the bug was present, a workload requiring all LLM traffic to pass through a controlled gateway had to exclude that execution path, regardless of its suitability for the coding task. The shipped fix changes that assessment. Governance eligibility must be based on the version and configuration in use, with room to change as the product changes.
Network boundaries narrow the choices further. AgentCore supports Claude Code and Codex inside the customer’s VPC, and routing through Amazon Bedrock keeps prompts, tokens, and outputs within the AWS network. That arrangement is relevant to financial services, healthcare, and national security workloads. Where residency rules ban all third-party API calls, OpenCode can fit because it supports a self-hosted or on-premises model endpoint.
How can teams run multiple AI coding agents without managing infrastructure?
A self-assembled stack can separate branches, store per-agent configuration, and connect a webhook to an agent. It does not automatically provide the coordination layer. Individual developers must take care of credential boundaries, identity, audit records, and spend controls unless the team builds a system to manage them. Adding another harness adds another place where those responsibilities can diverge.
Worktrees, per-agent .env files, manual model selection, and ad-hoc webhook wiring each solve a problem, but leave the agents without a shared operating boundary. AgentCore shows how a managed foundation can tie identity to the user, keep tokens outside the agent, and record what runs in the existing CloudWatch infrastructure. A managed routing layer uses that foundation to enforce the same rules for assigning work to each harness.
A harness-agnostic platform also separates team workflow from agent choice. Work can begin in Slack, Linear, GitHub, or GitLab through issue assignments, PR events, alerts, and scheduled jobs. The platform dispatches a compatible agent to an isolated workspace and returns a reviewable pull request. Switching harnesses or models does not require a new workflow or rewiring every connection.
The output boundary is just as important as the execution boundary. A human merges, comments, or sends the work back, so a wrong assignment ends in a draft PR.
How teams can apply workload-shape thinking before a full platform is in place
Teams can begin by classifying tasks on three axes before assignment. Context depth describes how much of the repository the agent must reason over. Supervision posture distinguishes work that needs an active developer from work whose end state can be reviewed later. Governance requirements set whether model traffic needs a controlled gateway and which execution boundaries must be in place.
Those distinctions produce a practical decision tree. A large multi-file refactor that needs full codebase context and gateway enforcement points toward Claude Code in an isolated cloud environment. An asynchronous task with PR delivery and single-process gateway routing points toward Codex in a sandboxed VM, with the provider configuration accounted for. Inline pair-programming with multi-provider routing points toward Cursor when strict gateway enforcement is not required, while work that depends on a gateway calls for a check of how that version handles routing. A model-agnostic, open-source-preferred task requiring a chosen provider or self-hosted endpoint points toward OpenCode in a containerized environment.
A team can assign the same issue to two or three harnesses in separate isolated environments, review the resulting PRs, and merge the best result. The purpose is to validate workload fit before committing it to policy.
That policy can then govern a Sentry alert, an issue assigned in Linear, or a scheduled sweep without a developer choosing a harness in the moment. The assignment follows the workload and its permitted environment. The agent performs the work, and the developer reviews and merges the result. The unit of work is the pull request.


