Skip to main content

Transcripts

Genie reads agent conversation logs from both Claude Code and Codex through a unified transcript abstraction. This enables commands like genie read <agent> to work regardless of which AI provider backs the agent.

Architecture

Unified Entry Format

Both providers normalize their logs into a common TranscriptEntry format:

Filtering

Transcripts support three filter dimensions, applied in order:
Example: “Show the last 5 assistant messages since noon”

Claude Code Logs

Claude Code stores logs in a project-scoped directory:
The project hash is derived from the workspace path with slashes replaced by dashes:

Log Entry Types

Tool Call Extraction

Tool calls are embedded in assistant messages as content blocks:
The transcript parser extracts these into separate tool_call entries.

Codex Logs

Codex stores session logs in a date-hierarchical directory:
Thread metadata lives in a SQLite database at ~/.codex/state_5.sqlite. The threads table maps workspace CWDs to rollout file paths.

Log Discovery

Discovery follows a two-step strategy:
  1. SQLite lookup — query threads table for the most recent rollout matching the agent’s CWD
  2. Directory scan — if SQLite is unavailable or stale, scan session directories by date

Event Types

Provider Detection

The transcript system detects the provider from the agent’s registry record:
Both providers implement the same TranscriptProvider interface:
This makes adding new provider adapters (e.g., for future AI coding tools) straightforward — implement the interface, register in the dispatcher.