SageOx + Claude Code
Every Claude Code session starts with context from your team's decisions, conventions, and past discussions — and every session's discoveries flow back for future use. This cookbook walks through the full loop: setup, daily usage, and the patterns that compound over time.
Prerequisites
ox init adds a hook to your CLAUDE.md that runs ox agent prime at session start. That's the entire setup.
Recipe 1: context-aware coding sessions
Start Claude Code as normal. SageOx injects your Team Context automatically.
Your AI coworker receives:
| What | Where it comes from |
|---|---|
| Team conventions | AGENTS.md in your Team Context repo |
| Architecture decisions | Transcribed discussions and recordings |
| Domain terminology | Team Context definitions |
| Code patterns | CodeDB index of your codebase |
The difference: without SageOx, your AI coworker reads your code and guesses at conventions. With SageOx, it knows your team chose Postgres JSONB for metadata because the schema isn't stable, that parcel means a geographic unit not a shipping package, and that you use snake_case for API fields.
Recipe 2: index your codebase with CodeDB
CodeDB gives your AI coworker a semantic map of your codebase — far beyond what grep and file reads provide.
With CodeDB, your AI coworker can:
- Search by meaning — "find the function that validates upload permissions" returns results even if "validate" and "upload" don't appear in the function name
- Trace history — "when did the auth middleware change?" answered from git history, not guesswork
- Navigate cross-references — understand how
RecordingServiceconnects toTranscriptPipelineacross modules
Without CodeDB: AI coworker relies on grep and file reads. Works for small repos, falls apart at scale.
With CodeDB: AI coworker has a map. It finds what it needs in seconds, not minutes.
Recipe 3: capture session knowledge
Coding sessions produce valuable insights — architecture discoveries, debugging breakthroughs, refactoring rationale. Capture them so future sessions and coworkers benefit.
The session transcript — your questions, the AI coworker's reasoning, decisions made — gets committed to your repo's Ledger. Future sessions can reference it.
High-value moments to capture:
- Debugging sessions where you root-cause a tricky bug
- Architecture decisions made mid-implementation
- Refactoring rationale ("we're splitting this service because...")
- Onboarding exploration of unfamiliar code
Recipe 4: multiplayer — shared context across AI coworkers
When multiple people (or multiple agents) work on the same repo, they all receive the same Team Context. Decisions made in one session become available to all future sessions.
This works with any orchestration layer — terminal sessions, IDE integrations, OpenClaw, or custom agent factories. The integration point is always ox agent prime via CLAUDE.md.
Agent factory setup
If you're using OpenClaw or another agent factory that spawns Claude Code sessions:
- The factory starts Claude Code in your repo
- Claude Code reads
CLAUDE.mdand runsox agent prime - Team Context flows in — no factory-specific configuration needed
- Session artifacts get captured if
/ox-session-startis configured
The CLAUDE.md hook is the universal integration point. Any tool that starts Claude Code in your repo gets SageOx context for free.
The compounding loop
The real value isn't any single session. It's the loop:
- You record a decision (Loom walkthrough, voice memo, Slack thread via OpenClaw)
- 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, your AI coworker knows not only your code but why it's structured the way it is. After a month, it has context that would take a new hire weeks to absorb.
What's next
- SageOx + Loom — feed Loom walkthroughs into the context loop
- SageOx + Slack via OpenClaw — capture Slack decisions automatically
- SageOx for solo players — start the loop before your team joins

