Agenta now ships three harnesses: Claude Code, Pi, and Codex. A harness is the program that drives the model, runs the tools it asks for, and manages context. You pick one per agent, and the rest of the agent does not move with it.

## Picking Codex

Go to `Sidebar > Agents > <agent name>`, set `Playground mode` to `Build`, and open the `Model & harness` section at the top of the `Configuration` column. Click `Detailed configuration`, open the `Harness` section, and choose `Codex`. Then pick a model in the `Model` section below.

## The models

| Model          | Picker label         | Context window |
|----------------|----------------------|----------------|
| GPT-5.6 Sol    | `Sol (default)`      | 1,050,000      |
| GPT-5.6 Terra  | `Terra`              | 1,050,000      |
| GPT-5.6 Luna   | `Luna (cheapest)`    | 1,050,000      |
| GPT-5.5        | `GPT-5.5`            | 1,050,000      |
| GPT-5.2        | `GPT-5.2`            | 272,000        |

Sol is the strongest of the three 5.6 tiers, Luna is the fastest and cheapest, and Terra sits between them. The picker shows each model's price and its cost, intelligence, and speed ratings so you can compare before you switch.

Codex reaches OpenAI directly. Unlike Claude Code, it does not route through Bedrock, Vertex AI, or a custom gateway.

## Tool approvals

Codex uses the same permission rules as your other agents. A tool set to `allow` runs, a tool set to `deny` is refused, and a tool set to `ask` stops the run and puts the question in front of you.

An `ask` parks the session warm. Answering resumes the session that was already running, keeping the original tool call, instead of paying for a cold start. Denying a tool ends the turn cleanly and reports the tool as denied rather than as an error.

This works on both the local sandbox and Daytona.

## Tools, MCP, and attachments

Every tool you have configured on the agent works: Agenta's own tools, code tools, and connected integrations all reach Codex, with tracing and cost reporting attached as usual.

You can also point Codex at your own HTTP MCP servers, the same way you can with Claude Code. The `MCP servers` section appears in the agent configuration when you select Codex.

Codex reads image attachments natively. Paste or drag an image into the chat and the model sees it. Audio and document attachments are not supported on Codex today.

## Paying for the model

Two options, the same two the other harnesses have:

- **An API key.** Add an OpenAI key to the agent and Agenta uses it for the run. This works on Agenta Cloud and on self-hosted deployments, on both sandbox types.
- **Your ChatGPT subscription.** When you self-host, an agent can authenticate from a ChatGPT/Codex login you already pay for, instead of metered API billing. This works on local runs only. A Daytona run cannot use a subscription, and the option is not available on Agenta Cloud.

## Notes for self-hosters

If you run agents on Daytona, rebuild your sandbox snapshot before you use Codex there. Run the snapshot recipe with `--force` so `agenta-agent-sandbox-v1` picks up the Codex build from this release.

To use a ChatGPT subscription, mount your `~/.codex` login into the runner and set `CODEX_HOME`.

## Getting started

- [Use your own subscription](/content/docs/self-host/use-your-own-subscription/index.html) has the Codex login setup.
- [Run agents in a cloud sandbox (Daytona)](/content/docs/self-host/agent-execution/daytona/index.html) covers the snapshot rebuild.
- [Permissions](/content/docs/concepts/permissions/index.html) covers the approval rules Codex follows.
