Skip to content

Gemini Fixes After Merge (metadata.json & active agent)#94

Merged
gtrrz-victor merged 6 commits intomainfrom
fix/gemini-savecontext-missing-fields
Jan 28, 2026
Merged

Gemini Fixes After Merge (metadata.json & active agent)#94
gtrrz-victor merged 6 commits intomainfrom
fix/gemini-savecontext-missing-fields

Conversation

@peyton-alt
Copy link
Contributor

@peyton-alt peyton-alt commented Jan 22, 2026

Note

Aligns transcript position tracking across agents and improves Gemini support.

  • Replace transcript_uuid_* with transcript_identifier_* across state, strategy, checkpoint options/metadata, and hooks; persisted in metadata.json
  • Update Claude and Gemini hooks to source AgentType from the current hook agent (authoritative) and pass transcript identifier + line/message counts to strategies
  • Gemini: add id to GeminiMessage and new helpers GetLastMessageID*; capture last message ID in pre-prompt state; compute token usage from startMessageIndex
  • Auto/manual strategies propagate new fields and (auto-commit) now records files_touched
  • Tests added/updated for new Gemini ID APIs and state fields; remove unused docs/color.md

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

@peyton-alt peyton-alt requested a review from a team as a code owner January 22, 2026 21:08
Copilot AI review requested due to automatic review settings January 22, 2026 21:08
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

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

@peyton-alt peyton-alt force-pushed the fix/gemini-savecontext-missing-fields branch from 70af443 to 270f4c1 Compare January 22, 2026 21:14
@peyton-alt peyton-alt changed the title Fix/gemini savecontext missing fields Gemini Bugs After Merge Jan 22, 2026
@peyton-alt peyton-alt changed the title Gemini Bugs After Merge Gemini Fixes After Merge Jan 22, 2026
@peyton-alt peyton-alt changed the title Gemini Fixes After Merge Gemini Fixes After Merge (metadata.json & active agent) Jan 22, 2026
Copilot AI review requested due to automatic review settings January 23, 2026 04:32
@peyton-alt peyton-alt force-pushed the fix/gemini-savecontext-missing-fields branch from 9a9bca3 to db8dc34 Compare January 23, 2026 04:35
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

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

Copilot AI review requested due to automatic review settings January 23, 2026 19:47
@peyton-alt peyton-alt force-pushed the fix/gemini-savecontext-missing-fields branch from 84ea82e to db8dc34 Compare January 23, 2026 19:47
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

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

@peyton-alt peyton-alt force-pushed the fix/gemini-savecontext-missing-fields branch from db8dc34 to da409fb Compare January 23, 2026 19:59
Copilot AI review requested due to automatic review settings January 23, 2026 20:01
@peyton-alt peyton-alt force-pushed the fix/gemini-savecontext-missing-fields branch from da409fb to db8dc34 Compare January 23, 2026 20:01
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

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

@peyton-alt peyton-alt force-pushed the fix/gemini-savecontext-missing-fields branch from db8dc34 to 61cf5be Compare January 23, 2026 20:56
Copilot AI review requested due to automatic review settings January 23, 2026 21:13
@peyton-alt peyton-alt force-pushed the fix/gemini-savecontext-missing-fields branch from 61cf5be to 53c7b51 Compare January 23, 2026 21:13
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

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings January 23, 2026 23:08
@peyton-alt peyton-alt force-pushed the fix/gemini-savecontext-missing-fields branch from f12641d to d24cee3 Compare January 23, 2026 23:08
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

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

Copilot AI review requested due to automatic review settings January 28, 2026 01:07
@gtrrz-victor gtrrz-victor force-pushed the fix/gemini-savecontext-missing-fields branch from ccb9c50 to 9b13445 Compare January 28, 2026 01:07
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

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

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.

Entire-Checkpoint: 87e6f1a644a6
@gtrrz-victor gtrrz-victor merged commit 3cc27f9 into main Jan 28, 2026
4 checks passed
@gtrrz-victor gtrrz-victor deleted the fix/gemini-savecontext-missing-fields branch January 28, 2026 02:03
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