SageOx + Claude Code
Claude Code is the deepest ox integration. It gets the same prime-work-capture loop every agent gets, plus real-time hooks, slash commands, installed rules, and MCP support that no other agent has today.
For the general model — how priming injects Team Context and how sessions are captured — read how it works first. This page covers what's Claude-Code-specific.
Setup
ox init configures Claude Code to run ox agent prime at session start. That's the entire setup — start claude as normal and Team Context is injected automatically.
Real-time hooks
ox wires into Claude Code's lifecycle events, so context injection and session capture happen without you thinking about it.
| Hook | What ox does |
|---|---|
SessionStart | Runs ox agent prime to inject Team Context |
Stop | Captures the session to the Ledger and summarizes it |
PostToolUse | Tracks the work as it happens for richer session capture |
UserPromptSubmit | Prepends [ox-recall] from prior work on question-like prompts |
These fire automatically in any connected repo. No manual start or stop step is required for the common case.
Slash commands
For explicit control, ox installs slash commands you can run inside a Claude Code session.
| Command | What it does |
|---|---|
/ox-session-start | Begin recording a session manually |
/ox-session-stop | End recording, commit, and upload to the Ledger |
/ox-session-status | Show the current session's state |
/ox-prime | Re-inject Team Context after a clear or compact |
Installed rules
ox installs a canonical rule at .claude/rules/ox.md plus a pointer under the .claude/rules/sageox/ namespace. The pointer teaches Claude Code to discover your team's rules in their canonical home rather than syncing every team rule into every cloned repo.
The sageox/ namespace reserves room for future ox-installed rules without cluttering your .claude/rules/ directory. Uninstalling removes only ox-stamped files — your own rules are left untouched.
MCP support
Claude Code can reach SageOx over MCP, giving the agent live access to team knowledge and tools beyond the static prime payload. This is the path that lets the agent query across team-shared content during a session.
Anti-entropy auto-recovery
ox self-heals rather than failing loudly. If a session upload is interrupted, a hook set drifts, or a summary is missing, the background daemon detects the gap and repairs it on its next tick.
ox leaves your hand-authored .claude/settings.json alone. It only rewrites the hooks shape when Claude Code would actually reject the file — so your formatting, comments, and permission rules survive.
CLAUDE.md setup
When you run ox init, it adds this to your repo's CLAUDE.md so priming happens regardless of how the session was started — terminal, IDE, or orchestrator:
## SageOx
Run `ox agent prime` at session start, after /clear, and after /compact.The compounding loop
The value isn't any single session — it's the loop that makes each one start smarter than the last.
- You record a decision — a Loom walkthrough, a voice memo, a team discussion.
- SageOx processes it into structured Team Context.
- Your AI coworker references it in the next coding session.
- That session produces new insights captured to the Ledger.
- Future sessions start smarter because of steps 1–4.
After a week, Claude Code knows not just your code but why it's shaped the way it is. After a month, it carries context that would take a new hire weeks to absorb.
Multiplayer — shared context across coworkers
When several people work the same repo, they all receive the same Team Context, and decisions made in one session become available to every future session — human or AI.
The integration point is always ox agent prime via CLAUDE.md. Any tool that starts Claude Code in your repo — terminal, IDE, or orchestrator — gets SageOx context with no extra configuration. For running Claude Code at scale, see Agent factories.
Best practices
Record decisions, not just code The highest-value context is why things are the way they are. Record a 2-minute Loom after architecture calls, bug fixes, and design decisions.
Use descriptive session names
When you run /ox-session-start, the session gets a name. "Auth refactor investigation" is more findable than "Session 47".
Review your Team Context
Periodically browse .sageox/teams/primary/ to see what your AI coworkers are reading. Edit AGENTS.md to add conventions they should follow.
Capture onboarding sessions When a new teammate explores the codebase with Claude Code, capture that session. Their questions and the AI's explanations become documentation for the next person.
What's next
- How it works — the general prime-work-capture model
- Supported coding agents — every agent and its tier
- Session recording — how captured sessions become team memory
- Agent factories — orchestrating Claude Code at scale
- Team Context — what's in it and how to edit it
Connect a repository
Connect your git repository to SageOx and give AI coding agents access to your team context. One command links your codebase to shared team knowledge.
SageOx + Codex
Give OpenAI Codex your team's full context. ox bundles a Codex adapter that primes Team Context and captures sessions to the Ledger — the same prime-work-capture loop Claude Code gets.

