Developers

SageOx + Codex

OpenAI Codex is a bundled, Silver-tier ox integration. ox init wires it up: Codex primes your Team Context at session start, its hooks fire, and its sessions are captured to the Ledger in real time — the same prime-work-capture loop every agent gets, with a touch less depth than Claude Code.

For the general model — how priming injects Team Context and how sessions are captured — read how it works first. This page covers what's Codex-specific.

Setup

terminal
$
$
$
$

ox init configures Codex to run ox agent prime at session start. Codex's adapter ships inside ox — no separate install.

Enable hooks

Codex hooks are opt-in. Turn them on once so session capture and lifecycle events fire automatically:

terminal
$

Verify the wiring:

terminal
$

What's Codex-specific

AspectCodex behavior
TierSilver — core parity with Claude Code's Gold
SourceBundled (ships inside ox)
Session captureReal-time, tailing append-only JSONL session files
HooksSessionStart, PreToolUse, PostToolUse, Stop (after codex features enable codex_hooks)
Context injectionox agent prime at session start

The one deliberate step Claude Code doesn't need: enabling codex_hooks. After that, capture and priming run without you thinking about them. See the support matrix for how the tiers compare.

Recipe 1: Context-aware Codex sessions

Start Codex as normal. ox primes your Team Context first, so Codex follows your team's patterns instead of generic best practices from its training data — it knows your conventions, architecture decisions, domain terms, and current work before it writes a line.

Recipe 2: Feed recordings into Codex context

Import your Loom walkthroughs, Figma design sessions, and team recordings. Codex references them during implementation — citing the designer's explanation from a walkthrough, not just interpreting a static mockup.

Import via the web UI; recordings are transcribed and added to Team Context, which flows to Codex via ox agent prime. See Video import.

Recipe 3: Multi-agent workflows

Run Codex alongside other agents — they all share one Team Context. A decision discovered in one session becomes available to every future session, regardless of which agent surfaced it.

Loading diagram...
Mermaid diagram

Recipe 4: Codex in CI/CD pipelines

Running Codex in automated pipelines (code review, test generation, docs)? Authenticate with a Personal Access Token instead of ox login:

export SAGEOX_TOKEN="${{ secrets.SAGEOX_TOKEN }}"
ox agent prime

ox auto-detects the CI environment and skips the daemon, local Ledger, and CodeDB setup — no flag required. See Running ox in constrained environments for the full reference, including Claude Code Cloud, Devin, and GitHub Actions recipes.

Best practices

Enable codex_hooks once per machine Without it, priming still works but session capture is manual. Turn it on so the loop closes automatically.

Record decisions that affect code patterns The more context in your Team Context, the better Codex performs. Record architecture calls, design decisions, and convention changes.

Review what Codex receives Browse .sageox/teams/primary/ to see your Team Context. Edit AGENTS.md to add conventions Codex should follow.

What's next