ox agent
Commands for AI coding assistants. Provides session management, Team Context access, and diagnostics.
These commands are designed for AI coworkers, not humans. Your AI coworker runs these commands automatically when configured via CLAUDE.md or AGENTS.md hooks.
Usage
Subcommands
| Command | Description |
|---|---|
ox agent prime | Initialize agent session, inject Team Context |
ox agent list | List active AI coworkers and session state |
ox agent <id> doctor | Check session health for a specific agent |
ox agent <id> session | Manage sessions (start, stop, summarize, etc.) |
ox agent <id> whisper | Check for pending whispers |
ox agent <id> query | Semantic search across Team Context |
ox agent hook | Handle agent lifecycle events |
ox agent team-ctx | Read Team Context content |
ox agent redact | View and test redaction policy |
How it works
When an AI coworker starts working in a repository:
- Prime - The agent runs
ox agent primeto get anagent_idand load Team Context - Session start - Optionally starts a session to track the conversation
- Work - The agent performs tasks
- Session stop - Saves the session for future reference
The agent_id (e.g., Oxa7b3) identifies the agent throughout its session and is used as a prefix for subsequent commands.
ox agent prime
Initialize an agent session and inject Team Context. This is the most common agent command.
The returned agent_id is used as a prefix for all subsequent agent commands in that session.
For detailed coverage of context injection, see ox prime.
ox agent list
List all active AI coworkers and their session state.
ox agent <id> doctor
Check session health for a specific agent.
Session management
Session commands track AI coworker conversations for future reference and team visibility.
Session subcommands
| Command | Description |
|---|---|
start | Begin recording a new session |
stop | End recording and save |
log | Append a conversation entry |
summarize | Generate session summary |
import | Import a prior session |
capture-prior | Capture untracked history |
recover | Recover stale/crashed session |
abort | Discard active session |
delete | Delete a completed session |
remind | Emit reminder info for active session |
record | Record batch session entries |
plan | Save plan document to session |
context-trace | Access context trace events |
subagent-complete | Report subagent completion to parent |
subagent-list | List subagent sessions |
Start a session
| Flag | Description |
|---|---|
--title | Human-readable session title |
Stop a session
Summarize a session
Generate a summary of the session content.
| Flag | Description |
|---|---|
--file | Output summary to a file |
Log a conversation entry
Append a conversation entry to the active session.
Import a prior session
Import a session from another source.
| Flag | Description |
|---|---|
--title | Session title |
--file | Path to session file |
Capture prior history
Capture conversation history from a previous session that wasn't tracked.
| Flag | Description |
|---|---|
--title | Session title |
--file | Path to history file |
--session-id | Specific session ID to capture |
--adapter | Adapter for history format |
Recover a session
Recover a stale or crashed session.
Abort a session
Discard the active session without saving.
Delete a session
Delete a completed session.
Whispers
Check for pending whispers (messages from humans or other AI coworkers).
Semantic search
Query Team Context and repository knowledge.
| Flag | Description |
|---|---|
--limit | Maximum number of results |
--team | Search team-wide context |
--repo | Search repository-specific context |
Lifecycle hooks
Handle agent lifecycle events (called by orchestration systems).
Events include session start, stop, and error conditions.
Team Context access
Read Team Context content directly.
Without a slug, returns the full Team Context. With a slug, returns a specific section.
Redaction
View and test the redaction policy that filters sensitive information.
View policy
Test redaction
Test how a sample string would be redacted.
Global flags
These flags work with all ox agent commands:
| Flag | Description |
|---|---|
--review | Preview changes without executing |
--text | Output in plain text format |
--force | Skip confirmation prompts |
CLAUDE.md integration
AI coworkers like Claude Code are configured to run ox agent prime automatically via CLAUDE.md:
<!-- ox:prime --> Run `ox agent prime` on session start, after compaction, or clear.This ensures the agent has Team Context loaded before starting work. The agent should re-prime after /clear or /compact commands that may clear context.
What's next
- ox prime - Detailed guide to context injection
- ox doctor - Diagnose setup issues
- Team Context - Understanding Team Context

