CodeDB is a semantic index of your codebase that your AI coworker can query during a session — search by meaning, trace git history, and navigate cross-references, instead of falling back on grep and a stack of file reads.
What CodeDB indexes
CodeDB builds a local database from your repository: code symbols, git history, and (optionally) GitHub activity. Your AI coworker queries it during sessions to navigate with precision rather than guessing at file names.
| Source | Content |
|---|---|
| Code symbols | Functions, types, classes |
| Git history | Commits, diffs, file changes |
| GitHub PRs and issues | Titles, descriptions, comments, review threads |
The index lives in your repository's .sageox/cache/codedb/ directory and never leaves your machine. SageOx servers never see your source code.
Index your repo
Run the index once. It updates incrementally after that — only new commits since the last run are processed.
Force a full rebuild after a major refactor or when results look stale:
Check what's indexed and when it last ran:
Search by meaning
Once indexed, query CodeDB with natural language. Search matches on what code does, not on a text pattern alone.
What your AI coworker gains
When a session starts, your AI coworker gains access to CodeDB queries. That turns a few common questions from slow file-spelunking into direct lookups:
- Semantic search — find functions and types by what they do, not by guessing the name
- History queries — "when did this behavior change?" answered from git history instantly
- Cross-reference navigation — understand how modules connect across the codebase
- PR and issue context — reference decisions from code review threads
Without CodeDB, your AI coworker relies on grep and file reads. With it, the agent has a map of your codebase — and spends its turns reasoning instead of searching.
CodeDB is local-only by design. Your code and git history stay on your machine; the index is rebuilt from your repo, never uploaded.
What's next
- Supported coding agents — which agents can query CodeDB
- SageOx + Claude Code — CodeDB in a live coding session
- ox index — full indexing reference, flags, and GitHub activity

