Skip to content

fix: read Codex session IDs from provider metadata - #147

Merged
zzxwill merged 1 commit into
masterfrom
fix/codex-session-metadata
Oct 21, 2026
Merged

zzxwill merged 1 commit into
masterfrom
fix/codex-session-metadata

Conversation

@zzxwill

@zzxwill zzxwill commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

Codex previously parsed session IDs from plain assistant output, so a review mentioning a fixture UUID could save that UUID and route a later reply to the wrong conversation. This change requests Codex JSONL for fresh and resumed reviewer/judge runs, reads IDs only from the provider thread.started event, and extracts the final assistant response only after a completed turn. Live output remains readable and raw JSON is retained. Model selection and role sandbox arguments are preserved.

Validation on d462235d7101003124348ec94efc66349350c24b:

  • Two regressions failed on merged master before the fix and pass afterward. Six focused Codex tests cover metadata/prose separation, failed or incomplete turns, known IDs, UTF-8 streaming and role arguments; existing model/resume/role fixtures were updated for JSON output.
  • node scripts/ci-check.mjs test: exit 0, 316 tests passed.
  • node scripts/ci-check.mjs test:package: exit 0, 55 installed files and package CLI regression checks passed.
  • Actual Jury: exit 0, NO NEW FINDINGS, reviewed this exact head in 57.9 seconds. The real provider thread ID was captured from metadata. No judge invocation or live resume occurred because the first review was clean. The reviewer sandbox restricted temporary-file tests; the independent full/package checks above passed.

Actual command (run from the isolated local worktree):

GIT_AUTHOR_NAME=zzxwill GIT_COMMITTER_NAME=zzxwill node bin/jury.js review --dir /Users/bytedance/Documents/Codex/2026-10-20/task/codejury-codex-session --trunk master --reviewer codex --judge codex --rounds 2 --summary 'Review the focused Codex session metadata fix. Plain stdout previously let an incidental fixture UUID in assistant prose become the resume ID; two regressions failed on master. All Codex invocations now request JSONL, session IDs come only from thread.started metadata, and reports require a completed assistant turn. Check failure handling, final report extraction, live text, exact session routing, model arguments and role isolation. Independent full suite passed 316 tests and installed-package checks passed. Preserve existing read-only reviewer and workspace-write judge boundaries; avoid unrelated changes.' --web=false --push=false > ../codex-session-review-evidence/jury-first.log 2>&1

Codex CLI 0.163.0 help and the official non-interactive documentation confirm the JSONL contract and CLI flags. No live-model reproduction was needed for the original false-ID regression.

@zzxwill
zzxwill marked this pull request as ready for review October 21, 2026 19:24
@zzxwill
zzxwill merged commit a3d85b0 into master Oct 21, 2026
8 checks passed
@zzxwill
zzxwill deleted the fix/codex-session-metadata branch October 21, 2026 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant