ox gives any supported AI coding agent your team's institutional knowledge at session start, then records what the agent does so the next session inherits it. This page covers the general model — it applies to every agent ox supports.
The prime, work, capture loop
Every session follows the same three beats, regardless of which agent you run.
- Prime — the agent runs
ox agent primeand receives Team Context. - Work — the agent codes with your conventions, decisions, and domain terms in hand.
- Capture — the session is committed to the per-repo Ledger and summarized, feeding future primes.
This is the multiplayer loop: every session enriches the context the next one consumes.
Prime injects Team Context
When an agent starts in a connected repo, ox agent prime injects your Team Context — your team's shared knowledge. The agent reads it before touching code.
Re-run it after clearing or compacting the agent's context — priming is cheap and keeps the agent grounded.
What your agent receives
Prime delivers your team's accumulated knowledge as structured context. The categories below generalize across agents — the source is the same, the format adapts per agent.
| Context type | Source | Example |
|---|---|---|
| Team norms | AGENTS.md in Team Context | "We use snake_case for all API fields" |
| Architectural decisions | Recorded discussions | "We chose Postgres JSONB for metadata because the schema isn't stable yet" |
| Domain terminology | Team Context definitions | "A 'parcel' is a geographic land unit, not a shipping package" |
| Recent decisions | Transcribed walkthroughs | "The upload flow was redesigned last week — here's what changed and why" |
| Prior sessions | The repo's Ledger | "Auth was refactored to device-flow tokens three sessions ago" |
| Code patterns | CodeDB index | Symbol search, git history, cross-references across your codebase |
Works across every supported agent
The prime, work, capture loop is agent-agnostic. Claude Code, Codex, Gemini, Aider, and others all run ox agent prime and capture sessions the same way.
What differs is depth — some agents support real-time hooks and slash commands, others get priming and capture with fewer touchpoints. The coding agents page has the per-agent support matrix.
Local recall on question-like prompts
When you type a question — "how did we handle pagination on the activity feed?" — ox checks your locally-cached Ledger for prior sessions or decisions that look relevant. If it finds a match, it prepends a short [ox-recall] preamble above your prompt so the agent sees it.
Recall runs entirely on your machine by default — your prompt never leaves your laptop. It fires only on question-like prompts of a reasonable length, and silently skips if the lookup is slow or finds nothing. No configuration needed.
The preamble is a few lines at most:
[ox-recall]
2026-04-12-activity-feed · "we cursor-paginate by created_at desc with a tiebreak on id"
2026-03-30-feed-perf · "switched off offset pagination after the N+1 regression on page 30+"The agent reads it as additional context. If you want recall to also reach team-shared SageOx content beyond your local cache, opt into cloud mode — prompts pass through the same redactor used by session uploads before any byte transits the network.
What's next
- Coding agents — which agents are supported and at what depth
- SageOx + Claude Code — the deepest integration, with hooks and slash commands
- Session recording — how captured sessions become team memory

