Gemini Fixes After Merge (metadata.json & active agent)#94
Merged
gtrrz-victor merged 6 commits intomainfrom Jan 28, 2026
Merged
Gemini Fixes After Merge (metadata.json & active agent)#94gtrrz-victor merged 6 commits intomainfrom
gtrrz-victor merged 6 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request fixes missing fields in the Gemini CLI's SaveContext when creating checkpoints. The changes ensure that Gemini sessions properly track transcript position and token usage, bringing parity with Claude Code's checkpoint metadata.
Changes:
- Added message ID tracking to Gemini transcripts for checkpoint position tracking
- Populated previously missing SaveContext fields (AgentType, TranscriptLinesAtStart, TranscriptUUIDAtStart, TokenUsage) in Gemini hook handlers
- Updated checkpoint metadata comment documentation
- Removed an unrelated test file (docs/color.md)
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/color.md | Deleted test documentation file (appears unrelated to PR purpose) |
| cmd/entire/cli/state.go | Added lastMessageID extraction from Gemini JSON transcripts in CaptureGeminiPrePromptState |
| cmd/entire/cli/hooks_geminicli_handlers.go | Populated missing SaveContext fields: AgentType, TranscriptLinesAtStart, TranscriptUUIDAtStart, TokenUsage with proper type conversion |
| cmd/entire/cli/checkpoint/checkpoint.go | Updated comments for TranscriptUUIDAtStart and TranscriptLinesAtStart fields; removed omitempty from TranscriptLinesAtStart JSON tag |
| cmd/entire/cli/agent/geminicli/transcript.go | Added ID field to GeminiMessage struct; implemented GetLastMessageID* functions for message ID extraction |
70af443 to
270f4c1
Compare
9a9bca3 to
db8dc34
Compare
84ea82e to
db8dc34
Compare
db8dc34 to
da409fb
Compare
da409fb to
db8dc34
Compare
db8dc34 to
61cf5be
Compare
61cf5be to
53c7b51
Compare
f12641d to
d24cee3
Compare
ccb9c50 to
9b13445
Compare
There was a problem hiding this comment.
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.
Entire-Checkpoint: 87e6f1a644a6
gtrrz-victor
approved these changes
Jan 28, 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.
Note
Aligns transcript position tracking across agents and improves Gemini support.
transcript_uuid_*withtranscript_identifier_*across state, strategy, checkpoint options/metadata, and hooks; persisted inmetadata.jsonAgentTypefrom the current hook agent (authoritative) and pass transcript identifier + line/message counts to strategiesidtoGeminiMessageand new helpersGetLastMessageID*; capture last message ID in pre-prompt state; compute token usage fromstartMessageIndexfiles_toucheddocs/color.mdWritten by Cursor Bugbot for commit 8beb1f1. This will update automatically on new commits. Configure here.