Skip to content

Conversion's show check fails Sessions whose last 64 KiB differs: recovered Codex diffs and large final events #1126

Closed

Description

@JacobStephens2

Problem

In #994's second conversion pass (0.14.2, 2026-10-22), 59 Sessions were kept with round-trip reader difference. In every one, show is the only reader that differs. These Sessions are blocked from thirdshift logs --remove-converted, and #997 would leave them without a reader.

Host Kept for show Codex, with recovered diffs Claude, no diffs
thirdshift 30 30 0
stephens 29 26 3

Every Codex Session kept for show had diffs recovered (#1085). The Codex Sessions that passed with diffs (48 + 50) have fewer or smaller ones.

Cause (from the code)

  • Codex: convert appends the recovered diffs after every original event (src/logs/convert.rs, the amendments loop). Each record carries its full patch. session::tail_events (src/logs/session.rs:42) reads a trace back until it has 64 KiB of decoded raw events. When the amendments total more than that, the tail window holds no Codex events, so the trace's latest event no longer matches the original's. The conversation check already compares against the original plus its amendments, but the show check doesn't.
  • Claude (3 on stephens): these Sessions end in 20–50 KB events. The original's 64 KiB byte window starts mid-event and drops that partial line. The trace's window keeps whole records. So the two windows can contain different events, and the trace's is the more complete.

Neither case affects show in use: it reads only a live Command's latest event, and amendments are written when a session ends.

What to build

Make the round-trip check's show comparison measure what show would report for the Session, without depending on the tail window. For example, compute latest_session_event over the whole Session for both the original (with its amendments, as the conversation check does) and the trace. Keep show's live tail behavior unchanged.

Acceptance criteria

  • A converted Codex Session whose recovered diffs total more than 64 KiB passes the round-trip check.
  • A Claude Session that ends in an event larger than the remaining tail window passes the round-trip check.
  • A real show difference, where the trace's latest event changes, is still caught.
  • Both are covered by tests at the conversion seam.

Part of #700, found in #994.

Activity

  1. added
    bug
    ready-for-agent
    in-progress
    and removed
    ready-for-agent
    on Oct 23, 2026
  2. removed
    in-progress
    on Oct 23, 2026
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions