Skip to content

Codex

Shiba packages OpenAI’s Codex CLI inside the container image, providing fast, automated execution for tasks optimized for OpenAI coding models.

Attribute Specification
Harness ID codex
CLI Binary codex
Pinned Version 0.155.0 (in Dockerfile)
Default Model openai/gpt-5.3-codex
Supported Models openai/gpt-5.3-codex, openai/o3-mini, openai/gpt-4o, openai/gpt-4.5-preview
Credential Model AI Gateway BYOK (dummy key inside sandbox; real key injected at egress)
Invocation codex exec --json --dangerously-bypass-approvals-and-sandbox "<task>"
Developer Request
└── CodingOrchestrator generates delegate_coding_task({ harness: "codex" })
└── Human signs off on exact prompt & repository
└── Ephemeral Cloudflare Sandbox boots
├── Clones repository via scoped git token
├── Executes: codex exec --json "<task>"
├── Streams structured JSON output to the Worker
└── Emits diff and pull request receipts

1. Configure the Provider Key in AI Gateway

Section titled “1. Configure the Provider Key in AI Gateway”

Store your OpenAI API key in your Cloudflare AI Gateway under the provider ID openai. Egress traffic to api.openai.com is intercepted and authorized at the Cloudflare edge.

In your environment or wrangler.jsonc:

Terminal window
# Set default harness to Codex
pnpm wrangler secret put AGENT_HARNESS # enter "codex"
# Set default model for Codex
pnpm wrangler secret put CODEX_MODEL # enter "openai/gpt-5.3-codex"

Specify harness: "codex" in any task request:

{
"repoUrl": "https://github.com/acme/frontend",
"task": "Add optimistic UI updates to the checkout mutation",
"baseBranch": "main",
"harness": "codex",
"codingModel": "openai/gpt-5.3-codex"
}

Codex runs non-interactively with codex exec --json. Each emitted line is parsed for:

  • Command and execution steps
  • Modified files and staged changes
  • Structured error envelopes (surfaced directly as honest failures)