Developers

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

terminal
$
$
$
$

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.

HookWhat ox does
SessionStartRuns ox agent prime to inject Team Context
StopCaptures the session to the Ledger and summarizes it
PostToolUseTracks the work as it happens for richer session capture
UserPromptSubmitPrepends [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.

CommandWhat it does
/ox-session-startBegin recording a session manually
/ox-session-stopEnd recording, commit, and upload to the Ledger
/ox-session-statusShow the current session's state
/ox-primeRe-inject Team Context after a clear or compact
terminal
# Inside a Claude Code session
$
# ... work on your feature ...
$

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.

  1. You record a decision — a Loom walkthrough, a voice memo, a team discussion.
  2. SageOx processes it into structured Team Context.
  3. Your AI coworker references it in the next coding session.
  4. That session produces new insights captured to the Ledger.
  5. 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.

Loading diagram...
Mermaid diagram

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