Skip to content

Event Schema

All Omnodex events follow a consistent schema regardless of which interceptor captured them.

Every event contains these fields:

interface TraceEvent {
id: string; // Unique event identifier
timestamp: string; // ISO 8601 timestamp
sessionId: string; // Session this event belongs to
kind: InterceptorKind; // Which interceptor captured it
type: EventType; // What type of event
payload: object; // Event-specific data
}

Identifies the source of the event:

ValueDescription
claude-code-hookCaptured by the Claude Code hook
codex-hookCaptured by the Codex hook
mcp-proxyCaptured by the MCP proxy interceptor
ValueDescription
session.startAgent session began
session.endAgent session ended
tool.invokedA tool was called
tool.resultA tool returned a result

The most common event type. Payload structure:

{
tool: string; // Tool name (e.g., "Read", "Bash", "WebSearch")
params: object; // Parameters passed to the tool
result?: object; // Result returned (when available)
}
{
agent: string; // Agent identifier
model?: string; // Model used (when available)
cwd?: string; // Working directory
}
{
duration: number; // Session duration in milliseconds
eventCount: number; // Total events in session
}

Events are stored one per line in JSONL (JSON Lines) format:

{"id":"evt_001","timestamp":"2026-05-16T10:00:00Z","sessionId":"sess_abc","kind":"claude-code-hook","type":"session.start","payload":{"agent":"claude-code","model":"claude-sonnet-4-6"}}
{"id":"evt_002","timestamp":"2026-05-16T10:00:01Z","sessionId":"sess_abc","kind":"claude-code-hook","type":"tool.invoked","payload":{"tool":"Read","params":{"file_path":"/src/index.ts"}}}

Each line is a complete, self-contained JSON object. The file can be processed with standard tools:

Terminal window
# Count events
wc -l $OMNODEX_HOME/events.jsonl
# Filter by type
cat $OMNODEX_HOME/events.jsonl | jq 'select(.type == "tool.invoked")'
# Find credential-related events
cat $OMNODEX_HOME/events.jsonl | jq 'select(.payload.tool == "Bash")'