Skip to content

read_transcript --mode dump returns 0 user messages on Codex rollouts that contain them #45

Description

@ElliotDrel

What happened

--mode dump --role user returns 0 of 0 messages on Codex rollout files that demonstrably contain many user messages. A hand-rolled pass over the same files (reading payload.type == "message" / role == "user" off each line) found 150 user prompts on 2026-09-08 across the same rollouts.

The same zero result comes back through the library path: parser.get_messages(parser.parse_lines(path)) yields no role == "user" entries for these rollouts.

--mode debug on one of them reports the whole file as assistant-only:

=== Entry type distribution ===
   250  assistant [SIGNAL]

=== Content block types (across all signal messages) ===
   145  tool_use
   105  thinking

=== Sample assistant messages (first 3 with text) ===
  No assistant messages with text found.

So the Codex normalization appears to be dropping role: "user" message entries (and assistant text) and keeping only tool_use / thinking.

Why it matters

dump --role user is documented as "the workhorse for 'what happened in this window'", and the akiflow backfill skill routes three of its five escalation triggers to it. Silently returning zero reads as "he wasn't working then" rather than as a parse failure, which is exactly the wrong answer during a backfill.

Repro

PY="$HOME/.claude/skills/estack-read-agent-history/scripts/read_transcript.py"
F="C:\Users\2supe\.codex\sessions\2026\09\08\rollout-2026-09-08T09-25-11-01a08131-adae-7820-a9c6-dd5e71a5f0fc.jsonl"
python "$PY" --file "$F" --mode dump --role user -n 0
# --- Conversation dump (0 of 0 messages, user only) ---
python "$PY" --file "$F" --mode debug
# 250 assistant [SIGNAL], 0 user

Second file, where the first user message is plainly present in the raw JSONL (let's do kickoff today. but really do it...):

C:\Users\2supe\.codex\sessions\2026\09\08\rollout-2026-09-08T14-40-52-01a07f16-f3ee-79f3-a639-ad11acb37f44_01a08252-b231-7e11-81df-3e209df50251.jsonl

Secondary issue in the same flow

On a 16.4MB rollout, dump prints:

[note: transcript is 16.4MB - degraded to last. Override with --force-dump.]
[... - 265 entries]

No assistant messages found.

Two problems there: the degraded path prints "No assistant messages found" for a --role user request, and --force-dump with an explicit --since/--until window still returned 0 of 0 messages in window.

Also worth noting: day-overview.py (akiflow skill) counted 172 messages for session 01a08131 while dump found 0 for the same file, so the two counting paths disagree.

Environment

  • Windows 11, python (not python3)
  • skill version 4.1.4
  • observed 2026-09-11 during an Akiflow backfill of 2026-09-08

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions