Control Plane Cage Match Self-Hosted Codex and Claude Code Runners Scored Round by Round Against Managed Cloud Platforms
Self-hosted agents keep code local but leave transcripts with vendors.

A bring-your-own API key cloud coding agent runner separates managed execution from model access through a team’s own Anthropic or OpenAI API key. For teams seeking to run Claude Code or Codex in the cloud without managing infrastructure, the comparison must cover execution, inference, coordination, and data handling separately.
What the self-hosted versus managed choice actually involves in 2026
A coding agent setup has five data flows. Host execution covers the filesystem, shell, build toolchain, and local credentials. The model request includes prompts, file contents, and tool output sent to inference, while hosted coordination covers session state, transcripts, and orchestration metadata. Tool and MCP output sends the results of commands back into model requests. Artifacts include recordings, pull request text, and logs uploaded to storage or a dashboard.
“Self-hosted” usually describes only the first of these flows. Moving execution on-premises while leaving transcripts and orchestration in a vendor cloud does not relocate the whole control plane. The available architectures therefore form a spectrum, from a VM running a CLI to vendor runners, bring-your-own-cloud arrangements, and fully managed agents. Each round below judges a different part of that stack.

What "self-hosted" means for Claude Code runners and Codex specifically
Claude Code self-hosted environments are in beta on Team and Enterprise plans. A runner on a team’s Linux host or container claims sessions started from the web, desktop app, or phone and runs the agent locally. Repository checkouts, build artifacts, credentials, and written files stay on that hardware. Conversation data still travels to Anthropic, which stores the transcript. The feature is unavailable to organizations with Zero Data Retention enabled or the HIPAA configuration applied.
Runner capacity has two operating modes available. Fixed runners stay active for predictable workloads, while on-demand runners use an orchestrator to start and stop capacity as work arrives. Model calls go to Anthropic by default but can be redirected to Amazon Bedrock or Google Cloud. Anthropic does not mount files or GitHub repositories into self-hosted sandboxes. The sandbox runtime supports credential injection through its credential masking feature.
Codex self-hosted environments use codex exec-server through OpenAI’s Agents API. Each session needs its own executor, authenticated with a restricted environment key from the Agents tab in the platform dashboard. The executor connects outbound to receive commands and return results. OpenAI retains the harness, models, and session state. The Agents API supports US-only data residency and is not Zero Data Retention-eligible.
Secrets and artifacts have separate restrictions as well. Files from self-hosted environments do not appear in the artifacts API, and vault environment-variable credentials work only in OpenAI-hosted environments, so self-hosted teams supply a trusted secrets proxy. Codex’s default cloud sandbox instead clones a GitHub repository, makes changes, runs tests, and supports opening a pull request. Setup scripts have internet access, but agent execution does not, and air-gapped deployments are unsupported. Neither product ships model weights with its self-hosted option.
Round 1: Environment control — what teams actually gain by owning the execution layer
Repository clones and build outputs sit on hardware the team can audit and wipe, while the agent can reach private package registries, staging databases, and services behind a VPN. That network position enables work unavailable to an isolated cloud sandbox. The team also defines the scope of push tokens, database URLs, and cloud credentials. Managed execution instead provides a clean, preconfigured sandbox without control over that container’s network position.
The boundary stops short of the model request. When an agent reads a sensitive file, its contents can become a tool result, enter inference, and reach the vendor’s transcript. Even serving a model locally would constrain only inference, leaving exposures from file access, telemetry, and a compromised host process. The 80-engineer financial services case illustrates that distinction. On-premises runners met the rule on cloud-side code execution, but the team still needed limits on model selection and more human review.
Round 2: Security posture — where each architecture is actually exposed
Internal access is both a capability and an exposure. A misdirected or compromised self-hosted agent can reach services inside the corporate perimeter. Repository content, dependencies, and tool or MCP output can supply prompt-injection instructions that steer the agent toward sensitive files. Those files can then enter a model request despite local execution. Read permissions, write permissions, egress policy, and credential scope therefore require independent controls regardless of the hosting label.
With managed execution, the agent loses that position inside the network. It introduces different concerns, including vendor storage of transcripts, tool results, and session metadata, plus shared exposure to a vendor-level compromise. Regulated teams must check that those flows meet their data handling agreements. Claude Code’s transcript restrictions and the Agents API’s lack of ZDR eligibility apply even with self-hosted execution. Local runners are not a workaround for either constraint.
Cursor self-hosted machines and Devin Outposts keep execution on team-controlled hardware while leaving the agent loop, inference, and transcript in the vendor cloud. Workers send back file contents, terminal output, diffs, and screenshots as a run takes place. Self-hosted execution is therefore the better choice when code custody and control over the internal network matter most. Managed execution is the better choice when the team needs to keep a privileged agent from reaching services inside the perimeter.
Round 3: Ops burden — what it actually costs to own the control plane
Anthropic’s documentation assigns self-hosted runner ownership to a platform or developer-productivity team. That team handles setup, builds and maintains the runner image, updates runners, and operates the orchestrator for on-demand workloads. The work continues after the initial deployment. Fixed capacity requires planning, while elastic capacity requires orchestration, patching, and upgrades. Self-hosting inference adds GPU administration and MLOps and SRE requirements beyond runner management.
Vendor-managed sandboxes, scaling, and updates put execution-capacity maintenance in the vendor’s hands, leaving the engineering team configuring integrations and reviewing output. A plain Linux VM with tmux and SSH offers a lighter self-hosted starting point and works with any CLI agent. It has team-scale limits, however, because shared sessions require shared SSH access, concurrent tasks can conflict without scripted git worktrees, and sessions are lost on reboot.
Staffing matters more in this round than how hard the setup is. The notes provide no defensible universal headcount estimate, but the ownership responsibilities are concrete enough to budget. As usage expands across a team, runner lifecycle work remains an ongoing internal commitment. The financial services case also recorded lower productivity gains than less-regulated peers. Some of that gap reflected compliance overhead alongside model constraints.
Round 4: Cost at scale — where managed pricing and self-hosted TCO cross over
Hosting Claude Code or Codex executors locally does not replace their managed inference with locally served models. The GPU breakeven calculation instead compares managed model usage with self-hosted inference. Managed API spending rises with usage, while local inference starts with fixed GPU and operating costs. Low usage leaves those fixed costs poorly amortized.
For a 10- to 20-person team using a mid-tier primary agent, managed costs are manageable and predictable. Managed inference also retains the advantage at mid-sized teams with mid-tier model usage. For a mid-sized team using top-tier models, the costs are closer, and which option costs less depends on the mix of usage. At large teams with mixed usage, self-hosted TCO can fall below managed spending. Scale changes the economics, but workload determines the crossover.
Hidden costs can move that crossover in either direction. Self-hosted estimates need to include off-peak GPU underutilization, monitoring, on-call work, and model update cycles. Managed estimates need to account for development bursts and enterprise per-seat minimums. A hybrid can assign autocomplete, simple refactoring, and test generation to self-hosted open-weight models while reserving managed frontier APIs for architecture planning, multi-file edits, and code review. That division reduces managed API use without demanding the same model for every task.
Round 5: Harness flexibility — whether the platform lets teams switch agents without rebuilding
A control plane tied tightly to one agent makes each switch an infrastructure project. A managed, multi-harness orchestration layer can instead route work to Claude Code, Codex, or another agent without replacing the underlying infrastructure. Per-token inference also avoids committing GPU capacity to particular model weights. The advantage grows as teams change agents for different tasks.
With self-hosted inference, the team does the work to keep models up to date. Moving to a newer model architecture can require changes to GPU memory provisioning, the inference framework, and runner-image validation. That consumes MLOps capacity even when execution workflows remain similar. However, the harness and inference layers are separable. With self-hosted runners and managed inference, teams keep execution custody while someone else runs the model-serving infrastructure.
The strongest position is therefore a multi-harness control plane. Support for Claude Code, Codex, Cursor, and other agents lets teams allocate work by task type and replace an agent as benchmarks shift. Managed platforms hold a structural advantage when they provide that shared orchestration across harnesses. A self-hosted execution layer can participate in the same arrangement. The relevant test is whether switching agents also forces a runner rebuild.
Round 6: Workflow integration — whether agents fit into existing tools or require new ones
Workflow reach can decide adoption before infrastructure economics do. Stripe’s engineers most often start Minions from Slack, so they hand off work in a tool they already use to talk to each other. Linear identifies Ramp’s Inspect as built on its API and Coinbase’s Forge as built on its Agent SDK. Forge works across Slack, GitHub, and Linear with context that is already in each system.
Linear’s MCP server supports finding, creating, and updating issues, projects, and comments through Claude, Claude Code, Codex, Cursor, VS Code, and other MCP clients. That server is available on all plans, including Free. Coding Sessions are a distinct feature with separate access requirements. Sessions that use Claude Code or Codex need Basic, Business, or Enterprise and use workspace AI credits. Access to issue tools does not by itself establish access to hosted coding sessions.
With Codex’s Slack integration, someone can start cloud coding tasks by tagging @Codex in a channel. Its workspace agents have persistent workspaces, connected apps, cross-session memory, and scheduled autonomous work. The current gap in support for GitLab and Bitbucket workflows in Slack-triggered tasks can determine fit for an otherwise suitable platform. Teams with self-hosted control planes must do the work for each Slack command, Linear webhook, or GitHub Action, while pre-built connectors on managed platforms leave teams with less integration work.
How to score each round against a team's actual constraints
The scoring should begin with requirements that cannot bend. A code-custody rule favors self-hosted execution only after the team identifies which of the five flows the rule covers. A threat model centered on privileged internal access favors managed isolation, while required access to private services points in the other direction. Lack of dedicated runner ownership gives managed operations greater weight. Broad adoption gives existing workflow connectors more weight than an isolated technical advantage.
Teams should look into self-hosting when three or more of these conditions apply. Managed spending exceeds self-hosted TCO at the current team size, GPU expertise exists internally, or compliance prohibits code or build artifacts from leaving the network. The other conditions are that most usage is high-volume and lower-complexity, and that the platform team has time set aside to own the runner lifecycle. In particular, a runner requirement does not automatically justify investment in local inference.
The resulting architecture can combine different winners by layer. Self-hosted execution can provide code custody and internal access, managed inference can provide frontier models, and pre-built integrations can provide workflow reach. A cloud orchestration layer that routes across harnesses keeps that combination from becoming a commitment to one agent. For a bring-your-own API key runner, the decisive comparison is therefore what the platform operates, what the key authorizes, and where each data flow goes. Hybrid and multi-harness designs make those choices separable rather than forcing one answer across the whole stack.


