SageOx

The hivemind for agentic engineering

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

terminal
$

Subcommands

CommandDescription
ox agent primeInitialize agent session, inject Team Context
ox agent listList active AI coworkers and session state
ox agent <id> doctorCheck session health for a specific agent
ox agent <id> sessionManage sessions (start, stop, summarize, etc.)
ox agent <id> whisperCheck for pending whispers
ox agent <id> querySemantic search across Team Context
ox agent hookHandle agent lifecycle events
ox agent team-ctxRead Team Context content
ox agent redactView and test redaction policy

How it works

When an AI coworker starts working in a repository:

  1. Prime - The agent runs ox agent prime to get an agent_id and load Team Context
  2. Session start - Optionally starts a session to track the conversation
  3. Work - The agent performs tasks
  4. 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.

terminal
$
agent_id: Oxa7b3
context_version: 2024-01-15T10:30:00Z
team: acme-engineering
injected: true

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.

terminal
$
AGENT_ID STATUS SESSION STARTED
Oxa7b3 active fix-auth-bug 2024-01-15 10:30:00
Oxf2c1 idle - 2024-01-15 09:15:00

ox agent <id> doctor

Check session health for a specific agent.

terminal
$
Agent Health: Oxa7b3
[OK] Session active
[OK] Team Context loaded
[OK] Daemon connected

Session management

Session commands track AI coworker conversations for future reference and team visibility.

Session subcommands

CommandDescription
startBegin recording a new session
stopEnd recording and save
logAppend a conversation entry
summarizeGenerate session summary
importImport a prior session
capture-priorCapture untracked history
recoverRecover stale/crashed session
abortDiscard active session
deleteDelete a completed session
remindEmit reminder info for active session
recordRecord batch session entries
planSave plan document to session
context-traceAccess context trace events
subagent-completeReport subagent completion to parent
subagent-listList subagent sessions

Start a session

terminal
$
session_id: ses_01JQ2X3Y4Z
status: recording
FlagDescription
--titleHuman-readable session title

Stop a session

terminal
$
session_id: ses_01JQ2X3Y4Z
status: saved
duration: 45m

Summarize a session

Generate a summary of the session content.

terminal
$
FlagDescription
--fileOutput summary to a file

Log a conversation entry

Append a conversation entry to the active session.

terminal
$

Import a prior session

Import a session from another source.

terminal
$
FlagDescription
--titleSession title
--filePath to session file

Capture prior history

Capture conversation history from a previous session that wasn't tracked.

terminal
$
FlagDescription
--titleSession title
--filePath to history file
--session-idSpecific session ID to capture
--adapterAdapter for history format

Recover a session

Recover a stale or crashed session.

terminal
$
Recovered session: ses_01JQ2X3Y4Z

Abort a session

Discard the active session without saving.

terminal
$
Session aborted: ses_01JQ2X3Y4Z

Delete a session

Delete a completed session.

terminal
$
Deleted session: fix-auth-bug

Whispers

Check for pending whispers (messages from humans or other AI coworkers).

terminal
$
No pending whispers

Query Team Context and repository knowledge.

terminal
$
FlagDescription
--limitMaximum number of results
--teamSearch team-wide context
--repoSearch repository-specific context

Lifecycle hooks

Handle agent lifecycle events (called by orchestration systems).

terminal
$

Events include session start, stop, and error conditions.

Team Context access

Read Team Context content directly.

terminal
$

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

terminal
$

Test redaction

Test how a sample string would be redacted.

terminal
$
API_KEY=[REDACTED]

Global flags

These flags work with all ox agent commands:

FlagDescription
--reviewPreview changes without executing
--textOutput in plain text format
--forceSkip 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