# OpenAI turns the Codex harness into a managed Agents API

OpenAI’s new public-beta Agents API lets developers run long-lived cloud agents on the managed harness behind Codex, while choosing OpenAI-hosted sandboxes, their own infrastructure or integrated sandbox providers.

The important shift is that agent orchestration itself becomes a managed API surface: context compaction, tool discovery, programmatic tool calls and subagent coordination can now come from OpenAI’s maintained Codex harness rather than an application team rebuilding those layers.

- Status: Active
- Published: 2026-09-11T22:01:57+12:00
- Updated: 2026-09-11T22:01:57+12:00
- Categories: Artificial Intelligence, Web Development, AI Agents, AI Coding, Inference & APIs, Developer Tools
- Tags: AI agents, Codex, Coding agents, Model Context Protocol, OpenAI
- Canonical HTML: https://beyondthe.news/dossiers/openai-agents-api-managed-codex-harness-cloud-agents

## What changed

OpenAI launched the Agents API in public beta for all developers on September 10, 2026. The API exposes the managed harness and infrastructure used by Codex: developers specify a task, model, tools and execution environment, while OpenAI maintains the orchestration layer. The API supports long-running sessions with automatic context compaction, tool search, programmatic tool calling, MCP and custom functions, built-in tools such as web search, and parallel subagents. Execution can run in an OpenAI-hosted sandbox, on customer-managed infrastructure or through first-class sandbox partners including Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop and Vercel. OpenAI says the API itself adds no separate fee beyond the tokens and tools consumed.

## Why it matters

Agent builders have increasingly had to own two products at once: the useful workflow and the harness that keeps a model working across tools, context windows and parallel tasks. The Agents API productizes that second layer. Teams can adopt a maintained Codex-style control loop without giving OpenAI exclusive control of execution infrastructure, because the environment remains selectable. That can reduce orchestration work, but it also moves more application behavior onto a versioned vendor harness whose semantics can change during beta. Builders need to separate model behavior, harness behavior and sandbox behavior when testing reliability and cost.

## The harness is now an API product

The Agents API does more than expose another model endpoint. OpenAI operates the control layer that manages context, tools and subagents, and developers interact with it through agent sessions. The launch explicitly describes this as the same class of harness and infrastructure used to run Codex.

## Long sessions can cross context windows

OpenAI says the API automatically compacts earlier context as a session approaches its context limit, preserving information needed to continue. That lets applications span multiple model context windows without implementing their own compaction loop, although teams should still test what information survives compression on their workloads.

## Tool use is optimized inside the harness

Tool search can load only relevant tool definitions rather than placing every schema into the prompt. Programmatic tool calling can run calls in parallel, chain operations and filter results before returning them to model context. The API supports MCP, custom functions and built-in tools such as web search.

## Execution location remains a separate choice

Developers can use OpenAI-hosted sandboxes, run the agent against their own environment or select integrated sandbox providers. That separation matters for networking, secrets, compliance, performance and cost: using OpenAI’s harness does not require every command or file operation to execute inside an OpenAI sandbox.

## Subagents become a first-class primitive

The API can let one agent delegate work to multiple subagents with bounded concurrency. OpenAI positions this as a built-in way to parallelize larger tasks rather than forcing application code to maintain a separate orchestration graph for every branch of work.

## Public beta makes harness versioning an architectural dependency

OpenAI says it will maintain and improve the harness alongside model launches and expose versioned access to capabilities. That can reduce application maintenance, but it also means model upgrades and harness upgrades are separate variables. Production teams should pin, evaluate and audit both rather than assuming an API-compatible model change leaves agent behavior unchanged.

## Key details

- The Agents API entered public beta on September 10, 2026 and is available to all developers.
- It exposes a managed agent harness derived from the infrastructure behind Codex.
- Long-running sessions include automatic context compaction across context windows.
- Tool search, programmatic tool calling, MCP, custom functions and built-in tools are supported.
- Agents can delegate work to parallel subagents.
- Execution can use OpenAI-hosted sandboxes, customer infrastructure or integrated third-party sandbox providers.
- OpenAI lists Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop and Vercel as environment partners at launch.
- OpenAI says there is no additional Agents API fee; developers pay for the tokens and tools their agents consume.
- The service is public beta and OpenAI expects the API and harness to evolve before general availability.

## Builder takeaways

- Separate harness evaluation from model evaluation. A model benchmark does not tell you how OpenAI’s compaction, tool search or subagent orchestration behaves on your production workflow.
- Choose the execution environment independently from the harness. Keep workloads on your own or approved infrastructure when network, residency or secret-handling requirements demand it.
- Persist external side-effect state outside the agent session so retries, compaction or harness updates cannot make destructive operations ambiguous.
- Set explicit subagent concurrency and cost boundaries before allowing fan-out across expensive models or tools.
- Test multi-window sessions for information loss around compaction, especially when earlier instructions or evidence remain safety-critical.
- Treat the public beta as a versioned dependency: pin behavior where possible and rerun workflow-level evaluations when the harness changes.

## What to watch

- General availability and any compatibility guarantees around harness versions.
- Pricing or quotas for OpenAI-hosted sandboxes and high-concurrency agent sessions.
- How much control developers receive over compaction policy and retained session state.
- Additional sandbox providers, private-network options and regional execution controls.
- Observability and replay tooling for understanding why the managed harness selected tools or delegated to subagents.
- Whether the open-source Codex harness stays behaviorally close enough to the hosted implementation to make self-hosting a realistic fallback.

## Uncertainties

- The API is in public beta, so request shapes, limits and orchestration behavior can change.
- OpenAI provides customer performance claims in the launch material, but those results are workload-specific and should not be treated as general benchmarks.
- Automatic compaction reduces context-management work but does not guarantee that every earlier detail remains available with equal fidelity.
- Using a customer or partner sandbox changes the execution boundary, but OpenAI still operates the agent harness and model interaction layer.

## Sources

- [Introducing the Agents API](https://openai.com/index/introducing-the-agents-api/) — OpenAI · primary release announcement · 2026-09-10T00:00:00+12:00. Primary launch details for availability, managed Codex harness, long-session context management, tools, subagents, environments, partners and pricing boundary.

