Skip to content

Conversation

@peyton-alt
Copy link
Contributor

@peyton-alt peyton-alt commented Feb 6, 2026

Note

Low Risk
Scoped to transcript parsing/counting and hook-side new-content detection; main risk is off-by-one/format-detection regressions for edge-case transcripts.

Overview
Fixes Gemini transcript handling in the manual-commit strategy by counting transcript position as message count (via geminicli.ParseTranscript) instead of treating the JSON blob as a single line, keeping CheckpointTranscriptStart and condensation offsets consistent.

Improves Gemini format detection to treat any JSON object with a messages field (even an empty array) as Gemini format, and updates new-content checks (countTranscriptLines) to use the same counting logic. Adds targeted tests covering Gemini/Claude counting behavior and the empty-messages detection case.

Written by Cursor Bugbot for commit 6e4b418. This will update automatically on new commits. Configure here.

@peyton-alt peyton-alt requested a review from a team as a code owner February 6, 2026 22:00
Copilot AI review requested due to automatic review settings February 6, 2026 22:00
@peyton-alt peyton-alt force-pushed the fix/gemini-transcript-position-tracking branch from 20bbff8 to e50f2c7 Compare February 6, 2026 22:04
Copy link
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

Updates manual-commit strategy transcript accounting so Gemini session transcripts track “position” by message count (instead of treating the whole JSON file as a single line), aligning condensation and “new content” detection with GeminiCLIAgent.GetTranscriptPosition().

Changes:

  • Count Gemini transcript progress using parsed messages length (message count), not “1 line”.
  • Update countTranscriptLines to detect Gemini JSON transcripts and count messages.
  • Add unit tests covering transcript line/message counting behavior.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
cmd/entire/cli/strategy/manual_commit_hooks.go Counts Gemini transcripts by message count for “has new content” checks.
cmd/entire/cli/strategy/manual_commit_condensation.go Records FullTranscriptLines as Gemini message count to keep condensation offsets consistent with Gemini’s transcript position semantics.
cmd/entire/cli/strategy/manual_commit_test.go Adds tests for countTranscriptLines across Claude JSONL and Gemini JSON cases.

@peyton-alt peyton-alt force-pushed the fix/gemini-transcript-position-tracking branch from e50f2c7 to e34d15e Compare February 6, 2026 23:25
Copy link

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

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@peyton-alt peyton-alt force-pushed the fix/gemini-transcript-position-tracking branch from e34d15e to 10d94d8 Compare February 6, 2026 23:43
Soph
Soph previously approved these changes Feb 8, 2026
khaong and others added 2 commits February 10, 2026 12:33
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 9ff9bc1149d8
…-position-tracking

# Conflicts:
#	cmd/entire/cli/strategy/manual_commit_test.go
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 846dc1c1b06e
@khaong khaong merged commit 4c2a062 into main Feb 10, 2026
4 checks passed
@khaong khaong deleted the fix/gemini-transcript-position-tracking branch February 10, 2026 02:31
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