Repository navigation
fix(xai): preserve terminal realtime voice outcomes - #117600
Conversation
* origin/main: (325 commits) fix(skills): preserve profile in ClawHub command hints (#117555) fix(cli): explain filtered plugin policy without unsafe recovery (#117556) fix(irc): strip markdown from outbound text (#112961) refactor(plugins): consolidate registry snapshots (#117561) fix(plugins): fail blocked enable commands (#117536) test(secrets): dedupe runtime state fixtures (#117563) feat(gateway): advertise chat attachment limits on hello-ok (#116188) fix(ui): preserve full graphemes in session owner initials (#117350) refactor(tui): consolidate runtime ownership (#117368) fix(update): return failure when dirty checkout blocks update (#117452) fix(auto-reply): apply mixed chat directives in one session transaction (#117542) refactor(ui): unify channel status and setup controls (#117499) fix(doctor): preserve surviving lint selections (#117543) fix(media): keep an unquoted MEDIA path with spaces as one media item (#112464) refactor(channels): consolidate lightweight plugin discovery (#117541) fix(imessage): prevent duplicate messages after delayed sends (#110853) refactor(memory): unify authoritative dreaming state and presentation (#117538) refactor(agents): consolidate main-session recovery ownership (#117383) fix(proxy-capture): make path-based session cleanup atomic (#98852) refactor(agents): consolidate compaction and context-engine ownership (#117482) ... # Conflicts: # extensions/xai/realtime-voice-bridge.ts
* origin/main: (22 commits) refactor(ui): consolidate cron form control rendering (#117576) fix(memory): recover restored session freshness (#117548) fix(whatsapp): normalize future-proof QA poll and video note ingress (#117579) fix(perf): separate warm and first-device health probes (#117525) fix(ci): repair plugin prerelease validation (#117562) fix(tasks): sanitize every human task and flow detail (#117568) fix(feishu): cancel unread streaming-card error bodies before release (#117312) fix(status): honor explicit local RPC fallback timeouts (#117519) fix(ui): preserve Talk transcript surrogate bounds fix(tasks): validate notification policy before persistence (#117554) refactor: consolidate full release child workflows (#117385) refactor(policy): centralize doctor health-check descriptors (#117578) perf(gateway): mark recovery before model preparation (#117544) fix(ui): harden Talk transcript marker bounds test(openai): parse realtime websocket frames safely fix(openai): keep embedding identity stable across upgrades (#117557) fix(googlechat): drop invalid thread resource names before send (#108324) test(ui): cover bounded realtime Talk entries fix(ui): bound realtime Talk conversation text test(ui): cover reentrant Talk meter cleanup ...
|
Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 4:07 PM ET / 20:07 UTC. ClawSweeper reviewWhat this changesThe PR updates xAI realtime voice so terminal provider responses supply final assistant transcripts, failed or incomplete outcomes, and completed tool calls without retaining output-item payloads. Merge readinessThis maintainer-authored PR remains necessary: current Priority: P1 Review scores
Verification
How this fits togetherThe xAI realtime-voice plugin receives provider WebSocket events and turns them into voice-session transcripts, errors, audio, and tool calls. A terminal flowchart LR
A[xAI realtime WebSocket] --> B[Voice event adapter]
B --> C[Immediate function-call completion]
B --> D[Terminal response outcome]
C --> E[Deduplicated tool dispatch]
D --> F[Final transcript and error handling]
E --> G[Voice session]
F --> G
Decision needed
Why: The implementation and supplied live-provider proof support the change, but the PR is maintainer-authored and carries the protected Before merge
Agent review detailsSecurityNone. PR surfaceSource +32, Tests +234. Total +266 across 4 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the provider-local terminal-outcome repair after refreshing the exact merge result and its required checks; retain immediate streamed function-call dispatch and use terminal output only as authoritative recovery plus deduplication. Do we have a high-confidence way to reproduce the issue? Yes—source-reproducible with high confidence: current main ignores Is this the best way to solve the issue? Yes—the terminal event owner is the narrowest maintainable fix because it records the provider’s authoritative end-of-turn facts where they occur while preserving the existing immediate function-call completion path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ebb301c32d9e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
* commit '81e392b7ff43bcdb7a3be50a99adf65c3b0141b5': fix(channels): preserve filters in offline status diagnostics (#117570) perf(gateway): separate startup maintenance timing (#117577) refactor(tests): deduplicate database-first guard fixtures (#117594) fix(cli): align sessions cleanup label summary by visible width (#117459) perf(gateway): skip empty session reconciliation (#117589)
|
Merged via squash.
|
* commit '78abe81a0bbae44d5d41fbb2913f3a1c03b17e51': test(xai): bound realtime outcome harness payloads fix(xai): bound terminal tool outcome state fix(xai): preserve canonical realtime terminal outcomes
|
History preservation follow-up: The repository merge helper used the enabled squash path for this PR. Because this PR was explicitly required to preserve its signed commit series, Parents:
The follow-up merge is tree-identical to its first parent and makes the full PR head and original contributor commit |
* fix(xai): preserve canonical realtime terminal outcomes * fix(xai): bound terminal tool outcome state * test(xai): bound realtime outcome harness payloads --------- Co-authored-by: Peter Steinberger <[email protected]>
* commit '7a7c74aae06b78b0f3d3db86cf27d678ae92e954': test(xai): bound realtime outcome harness payloads fix(xai): bound terminal tool outcome state fix(xai): preserve canonical realtime terminal outcomes
Related: #116201
Supersedes the uneditable contributor branch in #117186 while preserving its commit and authorship in this PR's ancestry.
AI-assisted maintainer preparation; the implementation, provider contract, and live proof were reviewed directly.
What Problem This Solves
Fixes an issue where users using xAI realtime voice could lose assistant transcripts present only in the terminal response, receive no actionable explanation for failed or incomplete turns, or silently miss a completed tool call carried by the terminal response.
Why This Change Was Made
The xAI event owner now consumes terminal response status and output as the authoritative outcome, reports failed and incomplete responses, and recovers completed terminal tool calls exactly once. Documented
response.function_call_arguments.doneexecution remains immediate so tool results can continue the response.The original PR cannot be amended because
maintainerCanModify=false. ItscompletedResponseToolItemsfallback also retained every fullresponse.output_item.donetool item, including arbitrary argument bytes, until terminal/reset; if the terminal event never arrived, retained count and bytes were unbounded. This maintainer branch preserves the contributor commit as an ancestor, removes that cache, ignores non-authoritative output-item completion, and relies onresponse.done.output, which the provider contract and live xAI trace confirm contains the completed function call.User Impact
Evidence
81e392b7ff43bcdb7a3be50a99adf65c3b0141b5.78abe81a0bbae44d5d41fbb2913f3a1c03b17e51.186f2df134677d5e9e1dabaf4d39e7faf5ac3326, currentmain81e392b7ff43bcdb7a3be50a99adf65c3b0141b5.a02cc5c8495316bc1b05df9d24d836edbca74917is an ancestor.mainchanged none of the four xAI paths since frozen base1e9a1405206d31a68c40c5517f1974eb3bef93cb.main; the new test is absent from both.186f2df134677d5e9e1dabaf4d39e7faf5ac3326and final head78abe81a0bbae44d5d41fbb2913f3a1c03b17e51.7ee4aef6a1d572d7fea0bd580eddf23b019b4049.9f4908ad4a1519fdcfe3ca83852cee240e0a8a88584e431223b5c7da153f65be.tbx_01kyzcv16b9ympk3g5qgmy0h3t; run: https://github.com/openclaw/openclaw/actions/runs/30714867959.grok-voice-latesttool-call test passed: valid{token: "bluebird"}arguments, submitted tool result, and assistant continuation.function_callwith item id, call id, name, and arguments inresponse.done.output.extensions/xai/realtime-voice-terminal-outcomes.test.ts: 15/15 passed.extensions/xai/realtime-voice-provider.test.ts: 56/56 passed.git diff --checkpassed.ClawSweeper Disposition
Confirmed the deployed xAI terminal event shape with the sanitized live trace: completed function calls are present in
response.done.output.Preserved the documented immediate
response.function_call_arguments.donepath for response continuation; terminal output is recovery plus deduplication, not delayed primary dispatch.Accepted the provider-local terminal owner as the narrow fix. The unbounded output-item cache from the source PR remains removed.
Hosted Opengrep flagged the local WebSocket test harness without
maxPayload; the repaired signed head adds a 1 MiB cap. Its 15/15 terminal-outcome assertions and formatting/diff checks pass.