Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mukhtharcm
Copy link
Contributor

Summary

This PR excludes the google-antigravity provider from the downgradeGeminiHistory mechanism in sanitizeSessionHistory.

The downgradeGeminiHistory function converts structured tool calls into simple text, which was a workaround for other Google/Gemini models. However, google-antigravity handles tool calls natively, and this conversion was "poisoning" the history, causing tool calls to be treated as plain text and not executed.

Fix Details

  • Updated sanitizeSessionHistory in src/agents/pi-embedded-runner/google.ts to accept a provider argument.
  • Modified the logic to skip downgradeGeminiHistory if the provider is google-antigravity.
  • Updated call sites in compact.ts and attempt.ts to pass the provider.
  • Added a unit test in src/agents/pi-embedded-runner.sanitize-session-history.test.ts to verify the exclusion.

Fixes #893

@mukhtharcm
Copy link
Contributor Author

mukhtharcm commented Jan 14, 2026

@steipete

tbh, just wanted to clarify, I kinda hate dealing with antigravity now :)

I resisted the urge for this pr for almost a day, but since there were other people bringing this up in discord, here it is :)

and it's really a blocker for me soo :)

@Iamadig
Copy link
Contributor

Iamadig commented Jan 14, 2026

@mukhtharcm - I feel you. I was also resisting the urge for this PR. Antigravity has been painful but not horrible so I am still seeing if we can support it reliably. thanks for the PR. appreciate it!

@steipete steipete force-pushed the fix/google-antigravity-history branch from f5633c1 to 53a4087 Compare January 16, 2026 08:14
@steipete steipete merged commit cd409e5 into openclaw:main Jan 16, 2026
39 of 42 checks passed
@steipete
Copy link
Contributor

Landed via temp rebase onto main.\n\n- Gate: pnpm lint && pnpm build && pnpm test\n- Land commit: 53a4087\n- Merge commit: cd409e5\n\nThanks @mukhtharcm!

@krariuk
Copy link

krariuk commented Jan 20, 2026

Thank you so much @mukhtharcm !!!

rsneh pushed a commit to rsneh/clawdbot that referenced this pull request Jan 21, 2026
)

* Agent: exclude google-antigravity from history downgrade hack

* Lint: fix formatting in test

* Lint: formatting and unused vars in test

* fix: preserve google-antigravity tool calls (moltbot#894) (thanks @mukhtharcm)

---------

Co-authored-by: Peter Steinberger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Google Antigravity tool calls displayed as text instead of executed

4 participants