Codex
Shiba packages OpenAI’s Codex CLI inside the container image, providing fast, automated execution for tasks optimized for OpenAI coding models.
Agent Overview
Section titled “Agent Overview”| 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>" |
How It Works
Section titled “How It Works”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 receiptsConfiguration & Deployment
Section titled “Configuration & Deployment”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.
2. Set Default Model
Section titled “2. Set Default Model”In your environment or wrangler.jsonc:
# Set default harness to Codexpnpm wrangler secret put AGENT_HARNESS # enter "codex"
# Set default model for Codexpnpm wrangler secret put CODEX_MODEL # enter "openai/gpt-5.3-codex"Selecting Codex in a Task
Section titled “Selecting Codex in a Task”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"}Event Parsing & Safety
Section titled “Event Parsing & Safety”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)
