Transcripts
Genie reads agent conversation logs from both Claude Code and Codex through a unified transcript abstraction. This enables commands likegenie read <agent> to work regardless of which AI provider backs the agent.
Architecture
Unified Entry Format
Both providers normalize their logs into a commonTranscriptEntry format:
Filtering
Transcripts support three filter dimensions, applied in order:Claude Code Logs
Claude Code stores logs in a project-scoped directory:Log Entry Types
| Type | Content |
|---|---|
user | User messages |
assistant | Claude responses (may include tool_use content blocks) |
progress | Progress updates, tool results, hook events |
system | System messages |
file-history-snapshot | File tracking snapshots |
queue-operation | Message queue operations |
Tool Call Extraction
Tool calls are embedded in assistant messages as content blocks:tool_call entries.
Codex Logs
Codex stores session logs in a date-hierarchical directory:~/.codex/state_5.sqlite. The threads table maps workspace CWDs to rollout file paths.
Log Discovery
Discovery follows a two-step strategy:- SQLite lookup — query
threadstable for the most recent rollout matching the worker’s CWD - Directory scan — if SQLite is unavailable or stale, scan session directories by date
Event Types
| Type | Content |
|---|---|
session_meta | Session initialization metadata |
response_item | Model messages (user, assistant, tool calls, reasoning) |
event_msg | Turn lifecycle (user_message, agent_message, task_complete) |
turn_context | Per-turn workspace metadata |
Provider Detection
The transcript system detects the provider from the agent’s registry record:TranscriptProvider interface: