Add support for condensing full.jsonl -> transcript.jsonl (opencode and claude first)#788
Merged
computermode merged 15 commits intomainfrom Mar 27, 2026
Merged
Conversation
Entire-Checkpoint: 6f706f143b9f
Entire-Checkpoint: 2889117f8bb3
Soph
reviewed
Mar 27, 2026
Entire-Checkpoint: 3c6474f90a4c
…e-opencode-transcript Review Feedback for #788
pfleidi
reviewed
Mar 27, 2026
Entire-Checkpoint: ec2fe4e4f035
…ed-claude-opencode-transcript
Soph
approved these changes
Mar 27, 2026
pfleidi
approved these changes
Mar 27, 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.
Pulling out changes that have been tested from #754 to keep the diffs smaller.
With these changes, Opencode and Claude
full.jsonlfiles can be transformed to a uniformtranscript.jsonlformat that only includes what the UI needs. The changes have also been validated with the UI: the generatedtranscript.jsonlformat is parse-able for both of these agent types.You may notice that the Claude changes are in a
compact.gofile: that's because that file will include what all the agents have in common. Since Claude is the default and has a decent amount of crossover already with itsfull.jsonlwith other agents, that's why its code is within that shared file. The Opencode agent parser uses some of the helper methods from it.Below are screenshots from the UI where I supplied the code with real
full.jsonlfiles and generatedtranscript.jsonlfiles that I manually pushed up to the checkpoints v1 branch on a test repo (themetadata.jsonhad to be updated to route totranscript.jsonlas well of course).Note
Medium Risk
Introduces new transcript-compaction logic that changes how tool results and streaming assistant fragments are merged/omitted, which could affect downstream UI parsing across multiple agent formats.
Overview
Adds a new
transcript/compactpackage that converts agent transcripts into a normalizedtranscript.jsonlformat with stable field ordering and per-line metadata (v,agent,cli_version).For JSONL-based agents (Claude Code/Cursor), the converter now filters non-semantic event types, strips assistant thinking/redacted blocks and extra tool fields, merges streaming assistant fragments by message ID, and inlines
tool_resultoutputs into precedingtool_useblocks while dropping tool-result-only user lines.Adds OpenCode support by detecting the single-JSON session export format and emitting equivalent compact user/assistant lines (including tool parts and timestamps), plus comprehensive fixtures and unit tests covering truncation, mixed formats, and edge cases.
Written by Cursor Bugbot for commit f672fc9. Configure here.