Skip to content

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.

Open in ChatGPT ↗
Ask ChatGPT about this page
Open in Claude ↗
Ask Claude about this page
Copied!

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.

  • 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.

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.

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.

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_NAME with your prompt and environment options. Replace KEY_NAME with the stored secret’s name.
  • API and SDK - Set the agent config’s harness.type to codex and select the OpenAI secret in the matching auth-secret field. See the API reference for the object schema.