[Checkpoints V2] Tag "thinking" lines for compact transcript#973
Draft
computermode wants to merge 4 commits intomainfrom
Draft
[Checkpoints V2] Tag "thinking" lines for compact transcript#973computermode wants to merge 4 commits intomainfrom
computermode wants to merge 4 commits intomainfrom
Conversation
Entire-Checkpoint: 5e0dbcccf51a
Entire-Checkpoint: c4da4bf56e17
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the compact transcript generator to include explicit thinking blocks (and Gemini thoughts) in the emitted content arrays, so “thinking” can be associated with the surrounding assistant message blocks in the compact JSONL format.
Changes:
- Preserve Claude Code
thinkingblocks (while still droppingredacted_thinking) during compacting. - Emit Gemini
thoughtsas{"type":"thinking","thinking":"..."}blocks in compact output (including thought-only assistant messages). - Update compact transcript fixtures and unit tests to expect the new
thinkingblocks.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| cmd/entire/cli/transcript/compact/compact.go | Adds a preserve-thinking path for Claude Code and updates assistant-content stripping to keep thinking blocks. |
| cmd/entire/cli/transcript/compact/compact_test.go | Adjusts compact tests to expect preserved thinking blocks (including thinking-only assistant). |
| cmd/entire/cli/transcript/compact/gemini.go | Adds Gemini thoughts parsing and emits them as thinking blocks in compact transcripts. |
| cmd/entire/cli/transcript/compact/gemini_test.go | Adds test coverage for a Gemini assistant message with only thoughts (no content/tool calls). |
| cmd/entire/cli/transcript/compact/testdata/claude_expected.jsonl | Updates expected Claude fixture output to include a thinking block. |
| cmd/entire/cli/transcript/compact/testdata/claude_expected2.jsonl | Updates expected Claude fixture output to include thinking blocks (including empty thinking markers). |
| cmd/entire/cli/transcript/compact/testdata/gemini_expected.jsonl | Updates expected Gemini fixture output to include thought-derived thinking blocks. |
…ing-lines-compact-transcript
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.
Adds "thinking..." tags to their corresponding message blocks in the compact transcript.
(Work in progress + this doesn't gate shipping checkpoints V2 and this information isn't consumed by the CLI or UI. It was requested internally.)
Note
Medium Risk
Changes the normalized
transcript.jsonloutput by retaining assistantthinkingcontent forclaude-codeand emitting Geminithoughtsasthinkingblocks, which may affect any downstream consumers expecting thinking to be stripped or thinking-only assistant lines to be dropped.Overview
Compact transcript output now preserves assistant “thinking” content. For
claude-codeJSONL compaction,thinkingblocks are kept (whileredacted_thinkingremains dropped), which also means assistant messages containing only thinking are no longer filtered out.Gemini compaction now includes
thoughts. Gemini messages’thoughts[]are converted into{"type":"thinking","thinking":"..."}blocks and prepended to assistant content; tests and fixtures are updated accordingly.Reviewed by Cursor Bugbot for commit 46c8809. Configure here.