SageOx

The hivemind for agentic engineering

Cookbooks

SageOx + Codex

OpenAI Codex is a powerful AI coding agent, but like any AI, it starts each session knowing nothing about your team's conventions, architecture decisions, or domain terminology. This cookbook shows how to give Codex your team's full context using SageOx.

How it works

SageOx provides team context through ox agent prime, which outputs structured context that any AI coding agent can consume. Codex can read this context at session start, giving it the same team knowledge that Claude Code receives.

Setup

1. Install SageOx and connect your repo

terminal
$
$
$
$

2. Configure Codex to use SageOx context

Add the following to your Codex configuration or system prompt:

## SageOx Team Context

Run `ox agent prime` at session start to receive team context including:
- Coding conventions and patterns
- Architecture decisions
- Domain terminology
- Current work happening across the product

Always run this command before starting work on the codebase.

The exact configuration depends on how you're running Codex (CLI, API, or integrated environment). The key is ensuring ox agent prime runs at session start.

3. Verify the setup

Start a Codex session and confirm it receives context:

$ ox agent prime
agent_id: Ox_abc123...
[Team Context loaded: 12 files, 3 recordings, 847 lines of context]

Your Codex session now has your team's shared knowledge.

What Codex receives

When ox agent prime runs, Codex gets:

WhatWhere it comes from
Team conventionsAGENTS.md in your Team Context
Architecture decisionsTranscribed discussions and recordings
Domain terminologyTeam Context definitions
Current workWhat's happening across your product
Coding standardsPatterns and anti-patterns your team follows

The difference: Without SageOx, Codex reads your code and guesses at conventions. With SageOx, it knows your team chose specific patterns for specific reasons.

Recipe 1: Context-aware Codex sessions

After setup, every Codex session starts informed:

  1. Codex runs ox agent prime
  2. Team Context loads into the session
  3. Codex understands your conventions before writing any code

Ask Codex to implement a feature, and it follows your team's patterns — not generic best practices from its training data.

Recipe 2: Feed recordings into Codex context

Import your Loom walkthroughs, Figma design sessions, and team recordings. Codex can reference them during implementation.

  1. Import recordings via the web UI
  2. Recordings are transcribed and added to Team Context
  3. Codex receives this context via ox agent prime

When you ask Codex to implement a design, it can reference the designer's explanation from the walkthrough — not just interpret a static mockup.

Recipe 3: Multi-agent workflows

If you're running Codex alongside other AI coding agents (Claude Code, Cursor, etc.), they all share the same Team Context.

Loading diagram...
Mermaid diagram

Decisions discovered in one session become available to all future sessions, regardless of which AI agent is used.

Recipe 4: Codex in CI/CD pipelines

If you're running Codex in automated pipelines (code review, test generation, documentation):

  1. Ensure ox agent prime runs before Codex starts
  2. Pass the context output to Codex's system prompt
  3. Codex operates with full team context even in headless mode

This ensures automated Codex tasks follow your team's conventions.

Best practices

Run ox agent prime at every session start Context injection should be automatic. Configure your Codex setup to always run this command first.

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.

Use the same Team Context across all AI agents Whether you use Codex, Claude Code, or Cursor, they should all read from the same Team Context. SageOx makes this automatic.

Limitations

  • Session capture: Unlike Claude Code's /ox-session-start, Codex doesn't have built-in session capture. You'll need to manually export valuable session insights to Team Context.
  • Integration depth: The integration is context-based (via ox agent prime), not a native plugin. Configuration depends on your Codex setup.

What's next