release: 0.37.0 — codex responses-lite reconstruction, exit auto-merge progress - #88
Merged
Merged
Conversation
… with progress Codex >= ~0.146 (x-openai-internal-codex-responses-lite) sends response.completed with usage but an empty output[] — every assistant reply reconstructed as nothing and the session's final answer vanished. openaiCompleted now grafts the output_item.done items into the hollow completed object, and a stream cut mid-answer assembles the partial text from output_text.delta events (under lite the deltas are the only copy). The leading run of developer messages (five in codex 0.146) folds into the system prompt instead of rendering as a fake user turn, and the AGENTS.md digest / environment_context wrappers no longer win the turn snippet, thread sig, or registry first-prompt — the human's prompt does. The exit auto-merge on huge sessions looked hung: planMerge parsed every trace in the log dir silently (~22s at 7GB RSS on a 2.5GB dir) even when there was nothing to consolidate. Scoped plans now substring-scan for the run's session ids before parsing anything, so unrelated traces are never JSON-parsed and the common fresh-single-file exit concludes from the scan alone (5.9s, 2.5GB on the same dir). Files >= 16MB print scan/read/write progress lines headed by a ctrl-c-is-safe note; merged outputs write in 8MB chunks; cctrace merge gets the same printer. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two fixes from Eric's 2026-08-06 reports, released as 0.37.0.
Codex responses-lite session reconstruction
codex-tui >= ~0.146 sends
x-openai-internal-codex-responses-lite:response.completedstill carries usage/status but itsoutputis[]— the real items only stream asresponse.output_item.doneevents. The old adapter returned the hollow completed object, so every assistant reply reconstructed as empty and the session's final answer (10k chars in the reporting trace) was missing entirely.openaiCompletedgrafts collectedoutput_item.doneitems into an empty completed output; the truncated-stream fallback also assemblesoutput_text.deltaruns into a synthetic partial message (dedup by item id) — under lite, deltas are the only copy of an interrupted answer.openaiSystemTextandnormalizeOpenaiTurns; later developer messages still render as context injections.turnSnippet/openaiFirstUserTextskip the codex harness wrappers (AGENTS.md digest, environment_context, mode banners), so outlines, thread sigs, compact labels, and the registry firstPrompt land on the human's prompt.Verified on the real trace: turn 0 snippets the actual prompt, the final verdict turn renders and attributes, 50/50 assistant turns attributed, 0 unattributed/rewound.
Exit auto-merge: scan-first + progress
Huge-session exits looked hung:
planMergeread and JSON-parsed every trace in the log dir with zero output — measured ~22s at 7GB peak RSS on a 2.5GB dir — even when the answer was "nothing to consolidate".MergeProgressevents from plan/apply; the CLI prints steps for files >= 16MB, headed once by "Consolidating session traces — safe to ctrl-c (atomic writes; sources kept until fully merged)".cctrace mergewires the same printer.Tests
623 pass (10 new: lite graft, delta synthesis/dedup, leading-run fold, wrapper skips, scoped-scan never parses unrelated files, scan-only conclusion, .zst prior prefix, write progress).
🤖 Generated with Claude Code