Managed runtime for Codex

Run Codex like an autonomous engineer.

Codex Managed Agents gives you the harness, secure tool execution, and cloud runtime for long-running agent work. Instead of building your own loop, sandbox, and orchestration stack, you get a managed environment where Codex can read files, run commands, browse the web, and execute code efficiently.

Secure command, file, and web execution
Built-in prompt caching and compaction
Persistent sessions with server-side event history

Runtime topology

Four primitives, one managed control plane.

Cloud-native

Model + tools

Agent

Define Codex behavior once.

Container template

Environment

Bring packages, files, and access rules.

Execution runtime

Session

Combine the agent and environment for a live task.

App I/O

Events

Send instructions in and stream tool/status updates out.

Core concepts

Everything in the platform maps to four runtime objects.

Agent, Environment, Session, and Events form the vocabulary of the system. The homepage keeps them visible because they are the shortest path to understanding how the product fits together.

01 / behavior

Agent

The model, system prompt, tools, MCP servers, and skills that define how Codex behaves.

02 / runtime

Environment

A configured container template with pre-installed packages, mounted files, and network rules.

03 / execution

Session

A running agent instance inside an environment, working on a concrete task and producing outputs.

04 / control plane

Events

Messages flowing between your application and the agent, including user turns, tool results, and status updates.

How it works

Start from a definition, then let sessions do the work.

The workflow is intentionally small: define Codex behavior, choose the runtime, launch a session, and keep steering it through events while the infrastructure stays managed.

01

Create an agent

Define the model, prompt, tools, MCP servers, and skills once, then reuse the agent by ID.

02

Create an environment

Provision a cloud container template with the packages, files, and access controls your workload needs.

03

Start a session

Launch an execution that binds the chosen agent and environment for a specific task.

04

Send events and stream responses

Push user input as events while Codex autonomously calls tools and streams back updates over SSE.

05

Steer or interrupt

Guide the session mid-run, interrupt it, or redirect it without rebuilding the whole runtime loop.

When to use it

Best suited for agent workloads that need durable infrastructure.

Codex Managed Agents is not just a UI wrapper around a model. It is a runtime layer for workloads that need time, tools, isolation, and a memory of what already happened.

Long-running execution

Handle workloads that span minutes or hours and require multiple coordinated tool calls.

Cloud infrastructure

Run inside managed containers with pre-installed packages, mounted files, and explicit network access.

Minimal infrastructure

Skip building your own agent loop, sandbox, and tool orchestration layer from scratch.

Stateful sessions

Keep a persistent file system and conversation history across multi-turn tasks and retries.

Ready to ship

Build the agent once. Launch sessions whenever the task shows up.

Start with the Quickstart to create your first managed session, then move into the API Reference when you are ready to wire it into your own application.