Factories > Harnesses
Running Codex in the cloud
Run Codex as a factory agent or standalone cloud harness using an OpenAI API key, with separate guidance for local CLI sessions.
Codex is OpenAI’s coding agent. Use it as a factory agent’s harness for tasks such as codebase migrations or batch test generation. Select its harness, model, and team-owned auth secret in Configuring factory agents.
Codex also runs as a standalone cloud agent without a factory. To run the CLI locally in Warp, follow Codex CLI in Warp; local authentication is separate from the cloud setup below.
Key features
Section titled “Key features”- Cloud orchestration - Launch Codex from any Automation Platform trigger: the Warp app, the Oz web app, the Oz CLI, the REST API, schedules, Slack mentions, Linear issues, or GitHub Actions.
- Codex model picker - Choose an available model and reasoning level for the task.
- Parent and child roles - A Warp Agent parent can dispatch Codex children in ad hoc orchestration. A factory foreman using Codex can dispatch named factory agents; those agents keep their configured harnesses and resources.
Available models
Section titled “Available models”Choose a model and reasoning level from the factory agent’s model picker. For standalone runs, use the model picker in the Warp app’s Cloud Mode or the “Model” field on the Oz web app‘s new-run pane. Use the current picker rather than a copied list of model versions. See Agent model choice and OpenAI’s Codex model docs for selection guidance.
Credentials and billing
Section titled “Credentials and billing”For cloud authentication with a managed secret, Codex accepts an OpenAI API key:
- OpenAI API key - Authenticates the cloud harness for OpenAI API usage. A local Codex subscription sign-in is not this managed-secret credential.
OpenAI bills the API account for inference with this credential. Warp charges for hosted compute and platform usage according to your plan or contract. See harness billing for cost-reporting limitations.
Factory agents select team-scoped secrets. Standalone ad hoc runs can use personal or team-scoped secrets. See Connecting Codex credentials.
Starting a Codex run
Section titled “Starting a Codex run”For a factory agent, follow Configuring factory agents. For a standalone cloud run:
- Warp app - In the Warp app’s Cloud Mode, open the “Agent harness” dropdown above the input and choose Codex.
- Oz web app - On the new run or new schedule pane, in the “Harness” dropdown, choose Codex. In the “Codex auth secret” field, select a stored OpenAI secret.
- Oz CLI - Use
oz agent run-cloud --harness codex --codex-auth-secret KEY_NAMEwith your prompt and environment options. ReplaceKEY_NAMEwith the stored secret’s name. - API and SDK - Set the agent config’s
harness.typetocodexand select the OpenAI secret in the matching auth-secret field. See the API reference for the object schema.
Related pages
Section titled “Related pages”- Choosing agent harnesses
- Configuring harness authentication - Store OpenAI credentials as Warp-managed secrets
- Warp Agent
- Multi-agent orchestration - Coordinate a Warp Agent parent with Codex children across local and cloud runs
- Managing cloud agents - Inspect Codex cloud runs in the Agent Management Panel and the Runs page
- Running Claude Code in the cloud
- Codex CLI in Warp - Codex in your local Warp terminal