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
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:
| What | Where it comes from |
|---|---|
| Team conventions | AGENTS.md in your Team Context |
| Architecture decisions | Transcribed discussions and recordings |
| Domain terminology | Team Context definitions |
| Current work | What's happening across your product |
| Coding standards | Patterns 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:
- Codex runs
ox agent prime - Team Context loads into the session
- 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.
- Import recordings via the web UI
- Recordings are transcribed and added to Team Context
- 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.
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):
- Ensure
ox agent primeruns before Codex starts - Pass the context output to Codex's system prompt
- 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
- Team Context — what's in it and how to edit it
- SageOx + Claude Code — comparison with Claude Code integration
- Video Import — import recordings that feed into context
- Discussions — capture team knowledge for AI coworkers
SageOx + Claude Code | Team Context for AI Coding Sessions
Give every Claude Code session your team's full context. Automatic context injection, session capture, and the compounding loop that makes AI coworkers smarter over time.
SageOx + OpenClaw | AI Agent Factories with Team Context
Run OpenClaw AI agent factories with full team context. Factory-spawned agents receive your team's conventions, decisions, and domain knowledge automatically.

