Expand description
Find a coding agent’s transcript on disk and read its recent rendered messages.
Everything here is pure over strings, slices, and injected directories: no ~, no
environment reads, no spawned processes. The binary passes in sessions_dir,
projects_dir, a process-table snapshot, and an env lookup. The rules come from
Plannotator’s last implementation (see docs/decisions.md, decision 9).
Modules§
- claude
- Claude Code:
~/.claude/sessions/<pid>.jsonnames a running session, and~/.claude/projects/<slug>/<session>.jsonlis its transcript. - codex
- Codex:
$CODEX_HOME/sessions/YYYY/MM/DD/rollout-<timestamp>-<thread>.jsonl. - copilot
- GitHub Copilot CLI:
$COPILOT_HOME/session-state/<uuid>/holdsevents.jsonl,workspace.yaml(acwd:line) and, while the session runs,inuse.<pid>.lock. - droid
- Droid (Factory):
$FACTORY_CONFIG_DIR/sessions/<slug>/<session>.jsonl, where the slug is Claude Code’s rule for a cwd and the entries are Claude’s shape withid/parentId. - pi
- Pi (pi-mono coding agent):
<sessions>/--<encoded cwd>--/<timestamp>_<uuid>.jsonl.
Structs§
- Message
- One rendered message: every text block that shares the host’s message id, in order.
- Session
Meta ~/.claude/sessions/<pid>.json: one running Claude Code session.
Enums§
Functions§
- detect_
host - Which host launched us, from the environment.
PLANNOTATOR_TUI_HOSToverrides when it names a known host; then the hosts’ own markers, in Plannotator’s order; then Claude Code.