Skip to content

Checkpoints v2: Support compact transcript for factorydroid and codex#852

Merged
computermode merged 6 commits intomainfrom
support-compact-transcript-all-agents
Apr 6, 2026
Merged

Checkpoints v2: Support compact transcript for factorydroid and codex#852
computermode merged 6 commits intomainfrom
support-compact-transcript-all-agents

Conversation

@computermode
Copy link
Copy Markdown
Contributor

@computermode computermode commented Apr 3, 2026

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 inlining function_call + function_call_output pairs (plus token_count usage) into compact tool_use blocks.

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, StartLine truncation) 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 StartLine semantics.

Reviewed by Cursor Bugbot for commit 48b290e. Configure here.

Entire-Checkpoint: 812ca724d405
Entire-Checkpoint: 255cac7ae856
Entire-Checkpoint: b60128265d2b
Entire-Checkpoint: 81001728c362
@computermode computermode requested a review from a team as a code owner April 3, 2026 22:06
Copilot AI review requested due to automatic review settings April 3, 2026 22:06
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 compact transcript conversion support for Factory AI Droid and Codex JSONL formats, enabling full.jsonltranscript.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 StartLine behavior.

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.

@computermode
Copy link
Copy Markdown
Contributor Author

bugbot run

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.

✅ 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.

@computermode computermode enabled auto-merge April 3, 2026 23:47
pfleidi
pfleidi previously approved these changes Apr 6, 2026
Copy link
Copy Markdown
Contributor

@pfleidi pfleidi left a comment

Choose a reason for hiding this comment

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

I had two non-blocking questions about the use of the linePreprocessor type. Otherwise 👍

@computermode computermode merged commit 804ea1d into main Apr 6, 2026
3 checks passed
@computermode computermode deleted the support-compact-transcript-all-agents branch April 6, 2026 20:28
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.

3 participants