Repository navigation
[Bug]: Google Antigravity 400 missing thought_signature on historical tool calls (cockpit-tools) #2125
Description
Client or integration
Codex App
Area
Provider adapter
Summary
When using google-antigravity (gemini-3.7-flash / thinking models) with subscriptions / accounts imported via the cockpit-tools integration module, multi-turn sessions with tool usage continuously crash with upstream HTTP 400 errors indicating that historical functionCall parts are missing the required thought_signature.
This error breaks and interrupts tasks repeatedly across different execution tools and multi-agent coordination steps:
Provider error 400: Antigravity invalid request: Function call is missing a thought_signature in functionCall parts. This is required for tools to work correctly, and missing thought_signature may lead to degraded model performance. Additional data, function call 'default_api:exec' , position 133. Please refer to https://ai.google.dev/gemini-api/docs/thought-signatures for more details.Provider error 400: Antigravity invalid request: Function call is missing a thought_signature in functionCall parts. This is required for tools to work correctly, and missing thought_signature may lead to degraded model performance. Additional data, function call 'default_api:wait' , position 238. Please refer to https://ai.google.dev/gemini-api/docs/thought-signatures for more details.Provider error 400: Antigravity invalid request: Function call is missing a thought_signature in functionCall parts. This is required for tools to work correctly, and missing thought_signature may lead to degraded model performance. Additional data, function call 'default_api:collaboration__wait_agent' , position 262. Please refer to https://ai.google.dev/gemini-api/docs/thought-signatures for more details.
Expected behaviour:
The proxy should preserve and replay all thought_signature tokens for historical functionCall items across turns, context compaction, and multi-agent subtasks so that upstream Gemini Antigravity reasoning models accept the tool call history.
Reproduction
- Import Google Antigravity account credentials via the
cockpit-toolsintegration format (ocx account import google-antigravity --format cockpit-tools). - Start OpenCodex (
v2.26.0) withgoogle-antigravityconfigured. - In Codex App (Desktop), select
google-antigravity/gemini-3.7-flashand start a multi-step task involving tool execution and agent coordination. - Execute several turns with tool invocations (
default_api:exec,default_api:wait,default_api:collaboration__wait_agent). - As conversation history grows or is replayed (positions 133, 238, 262), upstream rejects the request with HTTP 400 due to missing
thought_signature.
Version
2.26.0
Operating system
macOS 15.5
Provider and model
google-antigravity / gemini-3.7-flash
Logs or error output
Provider error 400: Antigravity invalid request: Function call is missing a thought_signature in functionCall parts. This is required for tools to work correctly, and missing thought_signature may lead to degraded model performance. Additional data, function call `default_api:exec` , position 133. Please refer to https://ai.google.dev/gemini-api/docs/thought-signatures for more details.
Provider error 400: Antigravity invalid request: Function call is missing a thought_signature in functionCall parts. This is required for tools to work correctly, and missing thought_signature may lead to degraded model performance. Additional data, function call `default_api:wait` , position 238. Please refer to https://ai.google.dev/gemini-api/docs/thought-signatures for more details.
Provider error 400: Antigravity invalid request: Function call is missing a thought_signature in functionCall parts. This is required for tools to work correctly, and missing thought_signature may lead to degraded model performance. Additional data, function call `default_api:collaboration__wait_agent` , position 262. Please refer to https://ai.google.dev/gemini-api/docs/thought-signatures for more details.Redacted configuration
{
"providers": {
"google-antigravity": {
"authMode": "oauth"
}
}
}Checks
- I searched existing issues and documentation.
- I removed secrets, tokens, account details, request credentials, and personal data.
Activity
agentHits commentedon Aug 19, 2026
CC: @lidge-jun @Ingwannu @Wibias
Hi maintainers!
Could you please prioritize investigating and fixing this issue? Currently, running
google-antigravity(specificallygemini-3.7-flashvia subscriptions imported throughcockpit-tools) in OpenCodex v2.26.0 is severely degraded / unusable for real workflows because any multi-turn session with tools quickly fails with HTTP 400 (Function call is missing a thought_signature in functionCall parts).The issue reliably interrupts work across different tool calls in long-running tasks and agent workflows:
default_api:execat position 133default_api:waitat position 238default_api:collaboration__wait_agentat position 262It appears that when conversation turns are replayed (or after compaction / multi-agent turns), the replay store is not restoring or attaching the required
thought_signatureto historicalfunctionCallitems for this provider/credential scope, causing upstream Google Antigravity to reject subsequent requests.Any fix or guidance on this would be greatly appreciated!
lidge-jun commentedon Aug 19, 2026
리뷰 · 우선순위 68 / 80
cockpit-tools가 범인이 아님. 그거 계정 임포트 포맷임(
ACCOUNT_IMPORT_FORMAT). 죽은 곳은google-antigravity+ thinking 모델의 툴 히스토리 리플레이임. 업스트림이 interleave thinking을 stateless로 돌려서, 예전에 나간functionCall에thought_signature가 없으면 400임. 리포터 문구가 그거임.default_api:exec133,wait238,collaboration__wait_agent262. 첫 턴이 아니라 히스토리가 커진 다음임.이미 있는 장치가 세 겹임.
observeAntigravityReplay/applyAntigravityReplay가 name+args로 캐시함(#897).googleToolCallMetadataFromPart가tool_call_start에providerMetadata.google.thoughtSignature를 실음(#1735). 클라이언트가extra_content를 안 메아리치면src/responses/thought-signature-replay.ts가 call_id로 다시 붙임. 세 겹이 다 첫 emit에서 서명을 봤어야 함. 못 보면 히스토리 재조립(google.tsassistanttoolCall직렬화)이 빈functionCall을 보냄.지금
dev의 구멍은 두 개임. SSE에서 thought 파트랑functionCall이 청크가 갈라지면observeAntigravityReplay가 청크마다pendingThoughtSig를 새로 만들어서 앞 청크 서명이 증발함. 같은 턴에 툴이 두 개면(exec+wait) 첫 콜에서pendingThoughtSig = undefined로 지워서 둘째부터 빈 값임.#897주석이 “다음 functionCall 하나랑 페어하고 짝 없는 건 버림”이라서 의도였음. 병렬 툴 턴이랑은 안 맞음.extractSignature는 이미thoughtSignature/thought_signature/extra_content.google.thought_signature를 봄.google.ts파서는part.thoughtSignature만 봄. 업스트림이 스네이크만 주면 메타데이터가tool_call_start에 안 실림. 리플레이 캐시는 채워져도 히스토리 직렬화는 빈 값임.점수는 68임. 2.26.0에서 Antigravity 툴 루프가 실제로 죽음. 80 아님. native-main 503(#2108/#2114)이랑은 다른 줄이고, 릴리즈 게이트도 아님. 2.27에 안 넣어도 됨.
해결방안은 드래프트 #2127 방향임. 스트림 턴 동안 pending을 청크 너머로 들고, 같은 턴 툴 전부 같은 thought 서명을 받게 하고, 파서도 스네이크를 읽게. 콤팩션/멀티에이전트가 메타데이터를 지우는 경로면 그 다음임.
Closes #2125는 필드에서 멀티턴 툴 루프 한 번 보기 전엔 이름.이 댓글은 grok-bot이 작성했습니다
lidge-jun commentedon Aug 20, 2026
Fixed on
devby #2150, merged as 9a78015.Verified present on the branch rather than assumed:
git log origin/devshows the merge commit above. These PRs targetdevrather thanmain, so GitHub does not auto-close the linked issue — this closure is manual.It ships in the next release cut from
dev. Reopen if you still see it after updating.fix(google): preserve and replay thought signatures across stream chunks
agentHits commentedon Aug 20, 2026
Update: Encountered this issue again on v2.28.0 (fresh turn,
default_api:execat position 6, and long conversation position 364):Note on position 6: this can happen in fresh short turns if freeform tool calls (
default_api:exec) or certain client history items are replayed without having theirthought_signatureresolved/re-attached from the store at serialization time.agentHits commentedon Aug 20, 2026
Additional reproduction log on v2.28.0:
Follow-up PR opened: #2198 to handle matching unwrapped freeform/custom tool arguments ({ input: string } vs parsed functionCall args) in the replay cache.
Ingwannu commentedon Aug 20, 2026
Reopening because the v2.28.0 reports show that #2150 did not cover the complete failure surface.
The earlier Grok review correctly identified the cross-chunk, parallel-call, and snake_case signature paths fixed by #2150. The new position-6 and position-381 reproductions point to a separate boundary: freeform/custom tool arguments can be represented to the client as
{ input: "<serialized JSON>" }while Antigravity replay observation stores the parsed function arguments. If those representations do not converge before replay lookup, the signature cannot be restored even in a short history.I am reviewing #2198 against the current
devhead now. I will keep this issue open until the exact PR head has a regression covering the full observe -> client-visible custom tool -> next-request parse -> Google serialization round trip, and all relevant CI is green. A local lookup-only test is not sufficient to close this again.agentHits commentedon Aug 20, 2026
Additional reproductions on v2.28.0
Updated PR #2198 with the requested review fixes:
call && matchedKeydirectly (independent ofckoverflow status).argsObj.input.trim()toREPLAY_MAX_CANONICAL_ARGS_BYTESbefore invokingJSON.parse.Ingwannu commentedon Aug 20, 2026
Confirmed against the current fix candidate in #2198. On exact head
99412cc85a65db31eca92947440d7ef7a03ee97c, the wrapped/freeform replay path now restores the matched signature after alternate parsed-input lookup, and the parser consumes the already bounded trimmed input.Maintainer validation on that head:
The report therefore has a credible scoped fix, but this issue should remain open for now: #2198 is still draft with its readiness checklist at 0/4 and does not yet have full exact-head cross-platform CI. The same-name/same-arguments occurrence ambiguity noted in the owner/Grok review is a separate low-frequency follow-up and is not blocking this specific v2.28.0 regression fix.
fix(google): support unwrapped freeform tool arguments in antigravity…
Ingwannu commentedon Aug 20, 2026
The reopened v2.28.0 failure surface is now fixed on
devby #2198, merged as8ba7caa7945946f42d0b06d3bf55707e71232b4ffrom exact reviewed head4e89471a7b9390fb8b1575fe528fe26282fa1c9b.This follow-up covers the representation mismatch that remained after #2150: client-visible freeform/custom tool arguments wrapped as
{ input: "<serialized JSON>" }are bounded, parsed, and matched against the observed AntigravityfunctionCallarguments so the storedthought_signaturecan be restored. The full observe -> client history -> next-request parse -> Google serialization round trip is covered by the focused suites.Final merge evidence: no unresolved review threads, clean merge against current
dev, and all exact-head Linux, Windows-shard, macOS, keyring, npm-global, hygiene, typecheck/test, and privacy gates green. Closing as completed. Please reopen with a fresh trace if the missing-signature 400 still occurs on a build containing8ba7caa79.agentHits commentedon Aug 22, 2026
Fresh reproduction trace (v2.29.0 / subagent and long turn positions)
Encountered the following missing
thought_signatureerrors ondefault_api:exec:Provider error 400: Antigravity invalid request: Function call is missing a thought_signature in functionCall parts. ... function call \default_api:exec` , position 7.`Provider error 400: Antigravity invalid request: Function call is missing a thought_signature in functionCall parts. ... function call \default_api:exec` , position 9.`Provider error 400: Antigravity invalid request: Function call is missing a thought_signature in functionCall parts. ... function call \default_api:exec` , position 632.`Provider error 400: Antigravity invalid request: Function call is missing a thought_signature in functionCall parts. ... function call \default_api:exec` , position 637.`Note: These occurred during multi-agent / subagent execution turns and deep conversation history. The recent landing of #2328 (
fix(responses): scope reasoning replay by conversation) and #2339 (fix(google): preserve stream signature source order) ondevare directly relevant to ensuring subagents without explicit thread headers maintain replay scope.agentHits commentedon Aug 22, 2026
Extended error traces from long-running sessions and multi-turn workflows
During active use of Antigravity (
gemini-3.7-flash), theFunction call is missing a thought_signatureerror recurred at both early positions and deep conversation history:Provider error 400: Antigravity invalid request: Function call is missing a thought_signature in functionCall parts. ... function call \default_api:exec` , position 7.`Provider error 400: Antigravity invalid request: Function call is missing a thought_signature in functionCall parts. ... function call \default_api:exec` , position 9.`Provider error 400: Antigravity invalid request: Function call is missing a thought_signature in functionCall parts. ... function call \default_api:exec` , position 632.`Provider error 400: Antigravity invalid request: Function call is missing a thought_signature in functionCall parts. ... function call \default_api:exec` , position 1500.`Root causes & Observations:
REPLAY_MAX_CALLS_PER_SESSION = 256,REPLAY_TTL_MS = 1h) cause LRU eviction of early historical calls within long active threads. Scaling limits to match the 7-day TTL and higher call capacity of the durable store prevents early history calls from losing their cached signatures in 500+ call sessions.agentHits commentedon Aug 22, 2026
Position 1952 reproduction on v2.31.0
Local diagnostic evidence
I inspected
~/.opencodex/antigravity-replay.jsonwhile the error was occurring:607ffc7a377b…had exactly 256 cached calls — the legacyREPLAY_MAX_CALLS_PER_SESSION = 256cap, with the oldest entries LRU-evicted as new calls arrived.Fix status
PR #2375 scales
REPLAY_MAX_CALLS_PER_SESSIONto 8,192 (and per-session bytes to 8 MiB) to cover these depths. I have verified the fix locally with a 1,500-call regression test that survives snapshot flush/reset/reload under production default limits.Requesting review on #2375 when you have a moment — this is actively blocking long-running Antigravity sessions.
fix(google): preserve and replay thought signatures across stream chunks
fix(google): support unwrapped freeform tool arguments in antigravity…