Skip to content

show's latest event is empty for long Session traces: the 64 KiB tail holds about 4× fewer events #1084

Closed

Description

@JacobStephens2

Problem

show's latest event comes out empty for long Session traces. Converting both hosts' Session logs in #994 left 178 Sessions unconverted with round-trip reader difference: 114 on thirdshift and 64 on stephens. In every case only the show reader differs. All 56 cases probed (cascade and chart35) failed the same way: the original reads the last tool call, and the trace reads None.

original: Some("Bash: timeout 590 gh pr checks 30 --watch --interval 30 2>&1 | tail -15")
trace:    None

Cause

session::tail_events (src/logs/session.rs) reads a fixed 64 KiB window, extended back to the start of an OTLP line. Wrapped as OTLP records, a raw event takes about 3.6× more bytes: cascade #29's implement session is 1.34 MB raw and 4.86 MB as .logs.jsonl. So the same window holds far fewer events: 8 in the trace against 36 in the original. A finished Claude session ends with several large result and summary events, so the trace's window never reaches the last tool call, and latest_session_event returns None.

This isn't only about conversion. Any live reader of a long Session trace (show, the Console's latest event) gets the smaller window. Once #997 removes the old format, it is the only window left.

Acceptance criteria

  • tail_events on a Session trace covers at least as many events as the old 64 KiB raw window would. One way: extend the window back until the decoded bodies reach the old raw budget.
  • A regression test: a trace whose last few records are large result events still gives the last tool call as show's latest event.
  • After a release, rerunning thirdshift logs --convert on both hosts passes these Sessions. Rerunning retries kept Sessions.

Part of #700, found in #994. #997 should wait for this, since it removes the reader the 178 unconverted originals still need.

Activity

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