Skip to content

Add Codex support for explain --generate#875

Open
peyton-alt wants to merge 2 commits intomainfrom
codex-explain-generate
Open

Add Codex support for explain --generate#875
peyton-alt wants to merge 2 commits intomainfrom
codex-explain-generate

Conversation

@peyton-alt
Copy link
Copy Markdown
Contributor

@peyton-alt peyton-alt commented Apr 8, 2026

Adds support to generate summary from codex session with entire explain -c <checkpointID> --generate

Avoids error failed to generate summary: transcript has no content to summarize

Note

Medium Risk
Adds a new parsing/scoping path for Codex transcripts used by explain --generate, which could affect checkpoint transcript slicing and summary accuracy for Codex sessions but is localized to transcript processing.

Overview
explain --generate and transcript rendering now support Codex sessions by scoping checkpoint transcripts using Codex response_item offsets (via new codex.SliceFromResponseItem) instead of generic line slicing.

summarize.BuildCondensedTranscriptFromBytes gains a Codex path that compacts Codex rollout JSONL into the shared condensed transcript format (including tool calls), and compact Codex format detection is broadened to recognize additional Codex line types. New tests cover Codex scoping and condensed-transcript extraction, and tool-detail extraction is hardened against nil inputs.

Reviewed by Cursor Bugbot for commit 7189770. Configure here.

Entire-Checkpoint: 9b668a38f4bf
Copilot AI review requested due to automatic review settings April 8, 2026 18:37
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 7189770. Configure here.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Codex rollout transcript support to the explain --generate summarization flow by enabling checkpoint-scoped parsing/compaction and condensed transcript extraction.

Changes:

  • Expanded Codex format detection to recognize checkpoint-scoped Codex JSONL that may not include session_meta.
  • Added Codex handling in summarization condensation by compacting Codex rollouts into the shared compact transcript schema and extracting user/assistant/tool entries.
  • Updated transcript scoping for Codex in explain and added unit tests for Codex summarization/scoping.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
cmd/entire/cli/transcript/compact/codex.go Broadens Codex JSONL detection to handle mid-file (scoped) transcripts.
cmd/entire/cli/summarize/summarize.go Adds Codex-specific condensed transcript building via compact.Compact and parses compact JSONL into summary entries.
cmd/entire/cli/summarize/summarize_test.go Adds a unit test validating Codex condensed transcript extraction.
cmd/entire/cli/explain.go Scopes Codex transcripts using response_item-based slicing before generating summaries/intents.
cmd/entire/cli/explain_test.go Adds a unit test for Codex checkpoint transcript scoping behavior.
cmd/entire/cli/agent/codex/transcript.go Introduces SliceFromResponseItem helper used for Codex transcript scoping.

Entire-Checkpoint: a1c5ef641832
@peyton-alt peyton-alt marked this pull request as ready for review April 8, 2026 19:01
@peyton-alt peyton-alt requested a review from a team as a code owner April 8, 2026 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants