Skip to content

fix: stop GPT Live caption repeats and honor spoken confirmations - #146370

Merged
steipete merged 4 commits into
mainfrom
codex/gpt-live-desktop-repair
Sep 12, 2026
Merged

steipete merged 4 commits into
mainfrom
codex/gpt-live-desktop-repair

Conversation

@steipete

@steipete steipete commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Related: #145382

What Problem This Solves

Fixes an issue where users speaking with GPT Live in the Control UI or desktop app could see duplicated captions and could not complete an action after spoken confirmation. A blocked action could also be described as completed.

Why This Change Was Made

Codex transcript fragments append literally; complete final snapshots replace the active caption. This preserves repeated words, corrected final text, and interleaved speakers without guessing from whitespace.

Native delegation now resolves confirmation through the Gateway. Browser and relay calls share readiness handling for delegation that arrives before speech transcripts or their writes. Speech retains its original challenge and utterance context through persistence and retries, so stale speech cannot approve a replacement action. A saved refusal cancels its own pending action even when a later affirmation is queued.

The backing agent receives retry context for the actual blocked invocation after confirmation binds. Speakable results come from observed vetoes, so generated success text cannot conceal a blocked action. Function-tool calls retain their explicit confirmation-reference contract; exact final arguments, current ownership, expiry, supersession, and one-use checks remain enforced.

Existing run-control and fingerprint policy code moves into focused modules. Relay error presentation stays with its error owner; the obsolete export and redundant helper-only tests are removed.

User Impact

GPT Live captions finish with one copy of the provider's transcript. After a confirmation prompt, a clear yes can execute the pending action; no cancels that confirmation. Ambiguous, stale, or expired confirmations produce a retry request. Each distinct action still needs its own confirmation.

Storage compatibility

This change does not alter SQLite schemas, voice-session record fields, transcript message serialization, event IDs, or the public RPC payload. Confirmation readiness lives in a closure; utterance contexts and append receipts live in process-local maps and a weak map. The relay passes the context only to the internal transcript owner. appendVoiceTranscript still builds the same persisted message from role, text, timestamp, and provider; it consumes the existing append result separately to update in-memory confirmation authority. Existing records need no migration, and pending voice confirmations remain transient across restart. The live Gateway proof exercised the real transcript writer and confirmed that an identical replay cannot grant another action.

Evidence

  • Full live flow: real gpt-live-1-codex speech, real openai/gpt-5.6-sol backing inference, one authenticated Gateway connection, and actual sessions_spawn. Three calls with identical arguments produced blocked → accepted after saved spoken “Yes” → blocked on unconfirmed replay. Exactly one child completed with the expected nonce and zero tool calls. The 70-second scenario had no errors; its Gateway, state, and staged credentials were cleaned up. Only microphone input was synthetic.
  • Six additional real-provider spoken turns through production RealtimeTalkSession, WebRTC, conversation state, and rendering: 87 fragments, 12 exact final captions, and 12 once-only transcript requests; no provider/browser errors. Consult answers and Gateway bookkeeping were fixtures in this caption-focused proof.
  • Regression coverage includes queued writes, callbacks before the first transcript, superseded challenges, idempotent replay, queued refusal, empty finals, failed persistence, cancellation, and close. The original caption, handoff, ordering, supersession, and refusal defects failed before their repairs. Final owner/producer, composed Gateway, and relay confirmation suites passed 43, 30, and 11 tests respectively; 52 caption/WebRTC tests and broader Gateway/Code Mode suites also passed.
  • Independent managed review is clean through P2. All selected changed-check gates passed; after equivalent deferred-type cleanup, the failing lint lane and all remaining gates were completed explicitly.

The before/after images use synthetic events through the production transcript renderer. No private conversation or desktop capture is included. Corrected final snapshots have deterministic regression coverage; the live caption run did not produce a correction.

Before: repeated GPT Live captions

After: one copy of each GPT Live caption

CI follow-up

Existing transcript callback tests now expect their internal confirmation context. A separate catalog test now waits for provider acquisition and independent CLI-agent discovery before asserting final status; its original failure, usable-model, and thinking-control assertions and deadlines are unchanged. Native Chromium reproduced the CLI timing race and verified the wait. Local real-Gateway testing stopped before UI while provider acquisition remained pending; Linux CI subsequently passed all 56 real-Gateway tests across 28 files, including this test (job).

An unchanged WebSocket request-lifetime test timed out once in CI. Its original four cases passed on Node 24 and Node 26 locally, and its Linux shard passed on the next head. The cause is unconfirmed; no production change, timeout increase, or weakened assertion was made for it.

Refreshing onto main also exposed an integration error between #146267 and #146275: TLS renewal still passed an array to the now-variadic sidecar registration owner. The one-line correction registers the actual stoppable handle. The failing compiler contract, all eight TLS/sidecar tests, changed checks, and independent review validate the correction.

Runtime boundary

The host steering callback stays internal. realtime-voice is already listed in scripts/lib/plugin-sdk-private-local-only-subpaths.json. The canonical export builder in scripts/lib/plugin-sdk-entries.mts excludes it from the typed public SDK and gives it only a JavaScript runtime export for official plugins; package.json excludes its declarations. This is the documented private-runtime boundary in docs/plugins/sdk-overview/imports.md, not a new supported third-party SDK contract.

Only the Gateway consult owner supplies getSteeringContext. It reads retry context prepared by the existing validated tool-authority callback; control classification still uses the original spoken text, and the exact run is checked before guarded queue admission. Existing callers omit the optional callback and preserve their behavior. No SDK entrypoint, export inventory, public declaration, or compatibility window changes.

@clawsweeper

clawsweeper Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling size: XL maintainer Maintainer-authored PR labels Sep 12, 2026
@steipete
steipete marked this pull request as ready for review September 12, 2026 19:42
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 12, 2026
@clawsweeper

clawsweeper Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 12, 2026, 5:25 PM ET / 21:25 UTC (Revision 4).

ClawSweeper review

What this changes

Repairs GPT Live captions and spoken action confirmations, adds regression coverage and documentation, and corrects TLS cleanup registration and catalog-test synchronization.

Merge readiness

⛔ Blocked before merge - 1 item remains

This PR remains useful: current main lacks the caption and native-confirmation repairs. No blocking defect was found, and the documented private runtime boundary resolves the previous SDK concern.

Priority: P2
Reviewed head: 80e53062d60ef6086f9a30d258b16f87379f1932

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A coherent repair with strong recorded runtime evidence, meaningful regressions, and no remaining actionable review finding.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The captured live Gateway/provider observations exercise saved speech through the confirmation owner to actual session creation, including rejection before confirmation and rejection of replay. Separate real WebRTC observations cover final captions and once-only transcript requests; inspected synthetic screenshots corroborate the visible repair.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The captured live Gateway/provider observations exercise saved speech through the confirmation owner to actual session creation, including rejection before confirmation and rejection of replay. Separate real WebRTC observations cover final captions and once-only transcript requests; inspected synthetic screenshots corroborate the visible repair.
Evidence reviewed 10 items Repairs remain absent from current main: Fetched main still forwards subscription transcript fragments and final snapshots without the explicit text modes added by this PR; its confirmation owner also lacks the new observed-speech handoff.
Previous SDK concern resolved: The export builder excludes private entries from the typed public SDK and supplies JavaScript-only runtime exports for official plugins. The private inventory includes realtime-voice, package.json excludes its declarations, and only the Gateway consult owner supplies getSteeringContext. This supports the PR body's disposition of the previous rank-up request.
Confirmation authority and storage boundary: Speech captures its original challenge before queue admission; successful transcript append supplies its receipt. Binding rechecks the current challenge and affirmation, while final execution consumes the exact argument fingerprint. The added contexts remain in process-local maps and a weak map; persisted transcript construction and record fields remain unchanged.
Findings None None.
Security None None.

How this fits together

Talk connects realtime speech providers to OpenClaw’s conversation display and backing agent. The Gateway saves speech, binds confirmation to a pending action, and checks that approval before tool execution.

flowchart TD
  A[Realtime speech provider] --> B[Caption fragments and final snapshots]
  B --> C[Conversation display]
  A --> D[Gateway transcript writer]
  D --> E[Current spoken confirmation]
  E --> F[Backing agent and final tool gate]
  F --> G[Execute once or report blocked]
Loading

Before merge

  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source +607, Tests +1456, Docs +8, Other 0. Total +2071 across 44 files.

View PR surface stats
Area Files Added Removed Net
Source 23 853 246 +607
Tests 18 1501 45 +1456
Docs 2 9 1 +8
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 1 0
Total 44 2364 293 +2071

Review metrics

Metric Value Why it matters
Production versus regression coverage Production net +607 lines; tests/support net +1456 lines Production growth implements speech readiness, challenge-bound receipts, and truthful blocked-action results, with most added coverage exercising ordering and authority failures.

Stored data model

Persistent data-model change detected: serialized state: src/gateway/talk-realtime-relay-voice.ts, serialized state: src/talk/client-voice-confirmation-readiness.ts, unknown-data-model-change: src/talk/client-voice-confirmation-readiness.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep caption assembly faithful to the provider protocol and let the Gateway authorize one exact action from saved, current speech without changing public SDK or storage contracts.

Do we have a high-confidence way to reproduce the issue?

Yes, source establishes the caption failure path and missing native confirmation handoff on current main; the PR supplies focused regressions and recorded live results. This review did not execute a reproduction.

Is this the best way to solve the issue?

Yes, the patch extends the existing transcript and confirmation owners, preserves final-argument checks, and keeps the steering callback within the documented private runtime boundary.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 9b59fe4ef7da.

Labels

Label justifications:

  • P2: Repairs bounded Talk caption and spoken-confirmation failures without evidence of a wider runtime outage.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The captured live Gateway/provider observations exercise saved speech through the confirmation owner to actual session creation, including rejection before confirmation and rejection of replay. Separate real WebRTC observations cover final captions and once-only transcript requests; inspected synthetic screenshots corroborate the visible repair.
  • proof: sufficient: Contributor real behavior proof is sufficient. The captured live Gateway/provider observations exercise saved speech through the confirmation owner to actual session creation, including rejection before confirmation and rejection of replay. Separate real WebRTC observations cover final captions and once-only transcript requests; inspected synthetic screenshots corroborate the visible repair.

Evidence

What I checked:

  • Repairs remain absent from current main: Fetched main still forwards subscription transcript fragments and final snapshots without the explicit text modes added by this PR; its confirmation owner also lacks the new observed-speech handoff. (ui/src/pages/chat/realtime-talk-webrtc.ts:322, 9b59fe4ef7da)
  • Previous SDK concern resolved: The export builder excludes private entries from the typed public SDK and supplies JavaScript-only runtime exports for official plugins. The private inventory includes realtime-voice, package.json excludes its declarations, and only the Gateway consult owner supplies getSteeringContext. This supports the PR body's disposition of the previous rank-up request. (scripts/lib/plugin-sdk-entries.mts:34, 80e53062d60e)
  • Confirmation authority and storage boundary: Speech captures its original challenge before queue admission; successful transcript append supplies its receipt. Binding rechecks the current challenge and affirmation, while final execution consumes the exact argument fingerprint. The added contexts remain in process-local maps and a weak map; persisted transcript construction and record fields remain unchanged. (src/talk/client-voice-confirmation.ts:613, 80e53062d60e)
  • Final-effect regression coverage: The composed Gateway tests exercise real admission, transcript persistence, voice binding, and tool gating with synthetic inference and final effects. They assert no session creation for generated confirmation text, changed arguments, superseded speech, disconnected ownership, failed persistence, and cancellation; saved confirmation permits one matching action. (src/gateway/talk-client-spoken-confirmation.test.ts:311, 80e53062d60e)
  • Recorded real behavior and inspected visual evidence: The captured PR body at sourceRevision a3139f8ac2a8d0ae2d07e3fa26bd10098d5379335f39d2c28fa3f436e6abbebc records a real authenticated Gateway/provider flow with identical session-spawn calls blocked, accepted after saved speech, then blocked on replay, producing exactly one completed child. A separate real WebRTC caption run records 87 fragments, 12 exact finals, and 12 once-only transcript requests. Both downloaded before/after images were inspected and visibly demonstrate removal of repeated captions; those images explicitly use synthetic provider events.
  • Affirmative Codex dependency signal: The changed WebRTC adapter interprets input_transcript.added, output_transcript.added, and turn.done, and the PR explicitly claims compatibility with the subscription transcript protocol. This makes direct Codex protocol inspection applicable; the OpenClaw Code Mode test filename alone does not. (ui/src/pages/chat/realtime-talk-webrtc.ts:322, 80e53062d60e)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (3 earlier review cycles)
  • reviewed 2026-09-12T19:49:43.643Z sha 6b9a03b26bfbcb05a6c01cf270c567f189b40de8 :: blocked before merge. :: none
  • reviewed 2026-09-12T20:13:46.367Z sha 4bd10fbbe697a54faed94c44dfb3243f83bffab4 :: blocked before merge. :: none
  • reviewed 2026-09-12T20:54:56.626Z sha 2ce00b28bb0ff3b0bb4ae473bae40c9a0be9bb5b :: blocked before merge. :: none

Replace Codex final caption snapshots and bind native voice approval to saved,
host-observed speech for the exact pending action. Preserve refusal, expiry,
retry, and single-use checks across browser and relay paths, and report blocked
actions truthfully.

Live GPT Live and GPT-5.6-Sol testing produced blocked, accepted, and blocked
identical session-spawn calls, with one real child after spoken confirmation.
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. label Sep 12, 2026
@steipete
steipete force-pushed the codex/gpt-live-desktop-repair branch from 2ce00b2 to 80e5306 Compare September 12, 2026 21:06
@steipete steipete removed the merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. label Sep 12, 2026
@steipete
steipete merged commit 4c9bde5 into main Sep 12, 2026
202 of 203 checks passed
@steipete
steipete deleted the codex/gpt-live-desktop-repair branch September 12, 2026 21:34
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 13, 2026
…enclaw#146370)

* fix: stop GPT Live caption repeats and honor spoken confirmations

Replace Codex final caption snapshots and bind native voice approval to saved,
host-observed speech for the exact pending action. Preserve refusal, expiry,
retry, and single-use checks across browser and relay paths, and report blocked
actions truthfully.

Live GPT Live and GPT-5.6-Sol testing produced blocked, accepted, and blocked
identical session-spawn calls, with one real child after spoken confirmation.

* test: expect voice confirmation context in transcript callbacks

* test: wait for independent catalog discovery to settle

* fix(gateway): register TLS renewal with its sidecar owner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant