Checkpoints v2: Support compact transcript for factorydroid and codex#852
Merged
computermode merged 6 commits intomainfrom Apr 6, 2026
Merged
Checkpoints v2: Support compact transcript for factorydroid and codex#852computermode merged 6 commits intomainfrom
computermode merged 6 commits intomainfrom
Conversation
Entire-Checkpoint: 812ca724d405
Entire-Checkpoint: 255cac7ae856
Entire-Checkpoint: b60128265d2b
Entire-Checkpoint: 81001728c362
Contributor
There was a problem hiding this comment.
Pull request overview
Adds compact transcript conversion support for Factory AI Droid and Codex JSONL formats, enabling full.jsonl → transcript.jsonl generation for these agents.
Changes:
- Added Droid envelope detection + unwrapping preprocessor to reuse the existing JSONL compaction pipeline.
- Added a Codex-specific compactor that filters system-injected content, groups function calls with outputs, and maps token counts.
- Added fixtures and unit tests covering both formats, including
StartLinebehavior.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| cmd/entire/cli/transcript/compact/compact.go | Routes Codex before truncation; adds JSONL line preprocessor hook; detects Droid after truncation. |
| cmd/entire/cli/transcript/compact/droid.go | Implements Droid format detection and envelope unwrapping for reuse with JSONL compaction. |
| cmd/entire/cli/transcript/compact/droid_test.go | Adds Droid fixture + inline test cases (including StartLine). |
| cmd/entire/cli/transcript/compact/testdata/droid_full.jsonl | Droid full-format fixture input. |
| cmd/entire/cli/transcript/compact/testdata/droid_expected.jsonl | Expected compact output for Droid fixture. |
| cmd/entire/cli/transcript/compact/codex.go | Implements Codex format detection, parsing, system-content filtering, tool call/result stitching, and token handling. |
| cmd/entire/cli/transcript/compact/codex_test.go | Adds Codex fixture + inline test cases (including StartLine + token_count handling). |
| cmd/entire/cli/transcript/compact/testdata/codex_full.jsonl | Codex full-format fixture input. |
| cmd/entire/cli/transcript/compact/testdata/codex_expected.jsonl | Expected compact output for Codex fixture. |
Contributor
Author
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 48b290e. Configure here.
pfleidi
reviewed
Apr 6, 2026
pfleidi
reviewed
Apr 6, 2026
pfleidi
previously approved these changes
Apr 6, 2026
Contributor
pfleidi
left a comment
There was a problem hiding this comment.
I had two non-blocking questions about the use of the linePreprocessor type. Otherwise 👍
pfleidi
approved these changes
Apr 6, 2026
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.
Support converting full.jsonl to transcript.jsonl for factory droid and codex agents.
Note
Medium Risk
Adds new format detectors and parsing paths for Codex and Factory AI Droid, and refactors the shared JSONL compactor to support preprocessing; mistakes could mis-detect formats or alter truncation/tool inlining behavior across agents.
Overview
Adds support for compacting Codex JSONL transcripts by detecting
session_meta, filtering system-injected user blocks, emitting user/assistant messages, and inliningfunction_call+function_call_outputpairs (plustoken_countusage) into compacttool_useblocks.Adds support for Factory AI Droid transcripts by detecting the envelope format and unwrapping
{"type":"message",..."message":{...}}entries via a new JSONL preprocessing hook, so existing compacting logic (tool result inlining, token usage,StartLinetruncation) can be reused.Refactors the core JSONL compaction pipeline to accept an optional per-line preprocessor and updates format detection order so Codex is detected on raw content and Droid is detected after truncation. Includes fixtures and inline tests for both new formats and
StartLinesemantics.Reviewed by Cursor Bugbot for commit 48b290e. Configure here.