Skip to content

bug(debug): a Codex debug bundle can miss the latest prompt body #1336

Description

@Juliusolsson05

Found by review C of #1332 (#372). The behavior predates that PR.

Expected

A debug bundle for a Codex session carries the latest request body (the prompt that produced the behavior being reported), as Claude bundles do through latest-request-body.json (#1273).

Actual

The bundle's proxy section is the last 5 MiB of proxy-events.jsonl (plus .1 after a rotation, #1332). A /v1/responses request followed by more than 5 MiB of response chunks or /v1/models refreshes has its body_b64 before the tail, so the bundle holds recent chunks but no prompt body.

Evidence

temp/review-1332/report-c.md finding 1. Line by line over the live corpus:

  • Legacy format: in 40 of 65 Codex files with an inline body, the last body lies more than 5 MiB before EOF.
  • Projected to the current base64 format: 10 of 65.

Codex has no latest-request-body.json sidecar.

Direction

Mirror Claude: have codex-headless's EventsMirror keep the newest request body in a sidecar next to the events file (or re-emit it after each rotation). readLatestRequestBody in proxyEventsReader.ts already appends a sidecar.

No activity

Activity on this issue will appear here.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions