Universal text transcript CLI for agent/harness sessions. Output is text only — no HTML, no TUI.
Useful for inspecting agent runs, debugging what happened, and evaluating results — including handing a transcript to another agent for review.
Implemented in Python using only the standard library.
- Claude Code
- Codex
- Pi
With uv:
uv tool install git+https://github.com/ertygiq/agent-trace.gitagent-trace --harness <harness> --session <session-id> <filters...>Three things to specify:
--harness— which harness produced the session:claude-code(aliases:cc,claude),codex, orpi.--session— the session id to read.- filters — what to include in the output (at least one required, see below).
agent-trace --harness claude-code --session abc123 --human --assistantFilters select which event categories appear in the transcript. At least one is required; multiple filters combine as a union (OR).
| Filter | Shows |
|---|---|
--human |
Human-authored messages (alias: --user) |
--assistant |
Assistant text messages |
--thinking |
Assistant thinking blocks |
--bash-command |
Bash command text |
--bash-output |
Bash command output |
--bash-description |
Harness-provided description for a Bash command, when available |
--bash |
Shortcut for the three --bash-* filters |
--all |
All supported categories |
# human + assistant messages
agent-trace --harness codex --session abc123 --human --assistant
# thinking + bash commands
agent-trace --harness claude-code --session abc123 --thinking --bash-command
# everything bash: description, command, and output
agent-trace --harness claude-code --session abc123 --bashEach harness has a default location agent-trace reads from:
claude-code:~/.claudecodex:~/.codexpi:~/.pi
Use --root to override the default — for example, to read sessions from another machine's exported data. The path may be either the harness config directory or the directory that directly contains session/project folders.
agent-trace --harness codex --session abc123 --root /path/to/.codex --bash-command
agent-trace --harness claude-code --session abc123 --root /path/to/.claude --human