Repository navigation
fix: keep Gemini NO_REPLY replies silent when the signature arrives on its own part - #203174
Conversation
…rate part - Select signed unphased answer text only for OpenAI Responses messages; a Gemini thought signature is not a Responses item id. Fixes #203131
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Observed proof (real Gateway via |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR restricts signed-block answer selection to OpenAI Responses so Gemini signature-only parts do not hide the actual answer. Example: Gemini streams "NO_REPLY" followed by an empty text part carrying thoughtSignature "Q2lNAQ==".
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR repairs a current Gemini reply-classification regression with a focused change and no actionable findings. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherProvider adapters produce assistant content blocks; the shared answer selector supplies raw answer text to terminal reply preparation, whose recorded disposition controls delivery. flowchart LR
A[Provider stream] --> B[Assistant content blocks]
B --> C[Shared answer selector]
C --> D[Terminal reply preparation]
D --> E[Recorded reply disposition]
E --> F[Chat and automation delivery]
Technical reviewBest possible solution: Keep the provider-specific selection rule in the existing shared answer owner while preserving Google's original signature-part boundaries. Do we have a high-confidence way to reproduce the issue? Current-main source deterministically selects the empty signed block for the reported two-part Gemini response; the supplied Gateway comparison demonstrates the same failure on the merge base. Is this the best way to solve the issue? The patch fixes the existing selector's provider distinction, reuses the canonical Responses API set, and avoids altering transport replay or adding a competing silence policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c23cd7f6ec5f. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +4, Tests +13. Total +17 across 2 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 21, 2026, 11:24 AM ET / 16:24 UTC. |
|
Merged in fcfb114. Thanks @Avi711 for the precise trace in #203131. With Gemini 3 on a |
…9388 stage 4) Absorbs openclaw/openclaw main 5a3e6b1 (473 commits past the absorbed 1129d4c, which is the merge-base) into 16541aa, so openclaw#129388's presentation can fast-forward. rerere was off for the merge; nothing arrived pre-staged. 24 content conflicts: - Generated, regenerated rather than hand-merged: config-baseline counts and sha256 (config:docs:gen; core 2667 + fork 17 = 2684), gateway predicates.js (gateway:validators:gen), and the four PostgreSQL state catalogs (db:postgres:gen). - package.json schemaVersions: state 41 (upstream openclaw#201615) with the fork's agent 44 (continuation's recipient-authority step; upstream's agent ladder is still at 43). - plugin-sdk-surface-report budgets: upstream's +2 (openclaw#203044) plus the fork's unchanged +11 / +4. - subagent-registry-queries: upstream openclaw#203102 folded excludeSuspendedDelivery into excludeSettledDelivery; T1's unconditional suspended-unbound skip stays. - subagent-registry-suspended-delivery: upstream openclaw#202732 restructured the discard into discardExpiredSubagentDelivery with the expiry notice in a finally block; T1's suspended-unbound outcome still notifies no session. - agent-runner-result-accounting, update-command-service-command, session-reset-service, assistant-answer-text, state-port.postgres.test, vitest.database-worker-core-paths: both sides kept (imports, openclaw#201615 permission checks beside the reset retention, openclaw#203174's Responses-only signed selection with the fork's per-item answers, both port fixtures, both worker-path lists). - update-cli tests (openclaw#200578 deleted the in-place Git runner): upstream's deletions win; the fork's compiler-flag argv matchers are carried onto upstream's rewritten checks. Refs openclaw#129388 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…n its own part (openclaw#203174) Root cause: src/shared/assistant-answer-text.ts:24 picks only text blocks that carry a signature as the answer, which is meant for OpenAI Responses item ids. Since openclaw#170534 (first shipped in 2026.11.5) it also picks empty signed blocks. Gemini 3 sends its thought signature on a separate empty part after the answer, so the selected answer is `""`, the turn is marked empty rather than silent, and the `NO_REPLY` text is delivered. Fixes openclaw#203131 Thanks @Avi711 for the clear report and trace. ## What Problem This Solves With Gemini 3 on a `google-generative-ai` provider, a reply of exactly `NO_REPLY` reaches the chat as the text "NO_REPLY" instead of ending the turn silently. It happens in direct chats and in automations that announce their result. 2026.8.2 stayed silent. ## User Impact Gemini 3 replies of exactly `NO_REPLY` end the turn silently again, in direct chats and in announced automations. Normal Gemini answers are delivered as before. ## Why This Change Was Made Signed-block selection now applies only to OpenAI Responses messages, where a text signature is an output item id. A Gemini thought signature is not an item id, so Gemini answers use all of their text blocks. The Google stream reader still keeps the signature-only part as its own block. That keeps the next request byte-identical: the signature is replayed as its own empty part, as Gemini sent it. Attaching the signature to the previous text block would change those replayed bytes. Responses answer selection is unchanged. ## Evidence Real Gateway (`ocx src`, isolated profile state) with the QA channel recording deliveries and a local `google-generative-ai` fixture that streams `{"text":"NO_REPLY"}` and then `{"text":"","thoughtSignature":"..."}`. Base is the merge base 86d4751. | Check | Base | This PR | |---|---|---| | Direct chat, exact `NO_REPLY` | "NO_REPLY" delivered | nothing delivered | | Announced automation, exact `NO_REPLY` | "NO_REPLY" delivered (`deliveryStatus: delivered`) | nothing delivered (`not-delivered`) | | Normal answer with trailing signature part, 2 turns | delivered once per turn | delivered once per turn | | Next request replays the signature | `[{"text":"Here is…"},{"text":"","thoughtSignature":"Q2lN…Sw=="}]` | identical bytes | The new regression test fails on base (`disposition: 'empty'`, expected `'silent'`) and passes here; its OpenAI Responses row (signed empty item still wins) passes on both. Observed proof lines: openclaw#203174 (comment) Merge danger: two-way door. No stored state, config or published contract changes; a revert fully restores the old behavior. Blast radius: answer text selection for non-Responses messages that carry text signatures (Google Gemini), which now use all of their text blocks. Co-authored-by: Ayaan Zaidi <[email protected]>
…n its own part (#203174) Root cause: src/shared/assistant-answer-text.ts:24 picks only text blocks that carry a signature as the answer, which is meant for OpenAI Responses item ids. Since #170534 (first shipped in 2026.11.5) it also picks empty signed blocks. Gemini 3 sends its thought signature on a separate empty part after the answer, so the selected answer is `""`, the turn is marked empty rather than silent, and the `NO_REPLY` text is delivered. Fixes #203131 Thanks @Avi711 for the clear report and trace. ## What Problem This Solves With Gemini 3 on a `google-generative-ai` provider, a reply of exactly `NO_REPLY` reaches the chat as the text "NO_REPLY" instead of ending the turn silently. It happens in direct chats and in automations that announce their result. 2026.8.2 stayed silent. ## User Impact Gemini 3 replies of exactly `NO_REPLY` end the turn silently again, in direct chats and in announced automations. Normal Gemini answers are delivered as before. ## Why This Change Was Made Signed-block selection now applies only to OpenAI Responses messages, where a text signature is an output item id. A Gemini thought signature is not an item id, so Gemini answers use all of their text blocks. The Google stream reader still keeps the signature-only part as its own block. That keeps the next request byte-identical: the signature is replayed as its own empty part, as Gemini sent it. Attaching the signature to the previous text block would change those replayed bytes. Responses answer selection is unchanged. ## Evidence Real Gateway (`ocx src`, isolated profile state) with the QA channel recording deliveries and a local `google-generative-ai` fixture that streams `{"text":"NO_REPLY"}` and then `{"text":"","thoughtSignature":"..."}`. Base is the merge base 423ae09. | Check | Base | This PR | |---|---|---| | Direct chat, exact `NO_REPLY` | "NO_REPLY" delivered | nothing delivered | | Announced automation, exact `NO_REPLY` | "NO_REPLY" delivered (`deliveryStatus: delivered`) | nothing delivered (`not-delivered`) | | Normal answer with trailing signature part, 2 turns | delivered once per turn | delivered once per turn | | Next request replays the signature | `[{"text":"Here is…"},{"text":"","thoughtSignature":"Q2lN…Sw=="}]` | identical bytes | The new regression test fails on base (`disposition: 'empty'`, expected `'silent'`) and passes here; its OpenAI Responses row (signed empty item still wins) passes on both. Observed proof lines: #203174 (comment) Merge danger: two-way door. No stored state, config or published contract changes; a revert fully restores the old behavior. Blast radius: answer text selection for non-Responses messages that carry text signatures (Google Gemini), which now use all of their text blocks. Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit fcfb114) Follow-ups: e58ca10 fix: preserve runtime custody, inference history, and recovery (#203901) [not selected for this narrow backport]; 44f7c52 fix: keep automations silent when the model closes its reasoning before NO_REPLY (#203432) [not selected for this narrow backport]; 6c2ff33 fix(cron): optional-silent cron run fails after the agent collects its collector child's result (#164949) [not selected for this narrow backport]; a9c1dd8 fix(agents): answer Control UI users once after a child finishes (#204098) [separately ordered lane row] Co-authored-by: RomneyDa <[email protected]>
Root cause: src/shared/assistant-answer-text.ts:24 picks only text blocks that carry a signature as the answer, which is meant for OpenAI Responses item ids. Since #170534 (first shipped in 2026.11.5) it also picks empty signed blocks. Gemini 3 sends its thought signature on a separate empty part after the answer, so the selected answer is
"", the turn is marked empty rather than silent, and theNO_REPLYtext is delivered.Fixes #203131
Thanks @Avi711 for the clear report and trace.
What Problem This Solves
With Gemini 3 on a
google-generative-aiprovider, a reply of exactlyNO_REPLYreaches the chat as the text "NO_REPLY" instead of ending the turn silently. It happens in direct chats and in automations that announce their result. 2026.8.2 stayed silent.User Impact
Gemini 3 replies of exactly
NO_REPLYend the turn silently again, in direct chats and in announced automations. Normal Gemini answers are delivered as before.Why This Change Was Made
Signed-block selection now applies only to OpenAI Responses messages, where a text signature is an output item id. A Gemini thought signature is not an item id, so Gemini answers use all of their text blocks.
The Google stream reader still keeps the signature-only part as its own block. That keeps the next request byte-identical: the signature is replayed as its own empty part, as Gemini sent it. Attaching the signature to the previous text block would change those replayed bytes. Responses answer selection is unchanged.
Evidence
Real Gateway (
ocx src, isolated profile state) with the QA channel recording deliveries and a localgoogle-generative-aifixture that streams{"text":"NO_REPLY"}and then{"text":"","thoughtSignature":"..."}. Base is the merge base 423ae09.NO_REPLYNO_REPLYdeliveryStatus: delivered)not-delivered)[{"text":"Here is…"},{"text":"","thoughtSignature":"Q2lN…Sw=="}]The new regression test fails on base (
disposition: 'empty', expected'silent') and passes here; its OpenAI Responses row (signed empty item still wins) passes on both.Observed proof lines: #203174 (comment)
Merge danger: two-way door. No stored state, config or published contract changes; a revert fully restores the old behavior. Blast radius: answer text selection for non-Responses messages that carry text signatures (Google Gemini), which now use all of their text blocks.