Repository navigation
fix(discord): support continuous GPT Live conversations - #146289
Conversation
Reuse the Gateway-owned GPT Live bridge for Discord voice, preserve speaker-bound agent delegation, and let Live own interruption while microphone input remains admitted during playback. Pace input continuously, play short replies, and preserve queued speech pauses. Document model-specific voice routes and unsupported host turn policies.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 12, 2026, 3:52 PM ET / 19:52 UTC (Revision 6). ClawSweeper reviewWhat this changesDiscord voice reuses the shared GPT-Live bridges, preserves continuous speech and microphone input during playback, and carries each speaker’s permissions and cancellation into delegated agent work. Merge readiness⛔ Blocked before merge - 2 items remain The PR remains useful: current main lacks the Discord bridge wiring and continuous-playback repairs. All three prior findings are addressed, and the latest test-only change preserves the regression assertions. No new blocking defect was found. Priority: P2 Review scores
Verification
How this fits togetherDiscord voice admits microphone audio from authorized participants into separate realtime provider connections. Provider audio shares the room’s playback queue, while delegated tasks enter the routed OpenClaw agent conversation with the originating speaker’s permissions. flowchart LR
A[Discord microphone audio] --> B[Speaker admission]
B --> C[Per-speaker voice bridge]
C --> D[Continuous room playback]
C --> E[Fresh permission check]
E --> F[Routed agent and tools]
F --> C
Before merge
Agent review detailsSecurityNone. PR surfaceSource +275, Tests +960, Docs +119. Total +1354 across 44 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the shared bridge and capability-based playback design, preserving unpinned defaults and the explicitly accepted, documented recovery for unsupported Live policies. Do we have a high-confidence way to reproduce the issue? Yes, source inspection identifies the missing Discord relay wiring and response-based playback assumptions; the supplied regression and live results support those paths. This read-only review did not execute tests. Is this the best way to solve the issue? Yes, reusing the existing Gateway bridges and expressing continuous audio through optional provider capabilities avoids a competing transport owner while preserving response-based defaults. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a1e5797a4268. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
Keep unpinned realtime configurations on their provider default, ignore silent RTP for speaker retention, and retain live-policy freshness through roster enrichment and agent dispatch. Cover policy revocation during the real participant lookup path, fresh and existing model defaults, and idle speaker reclamation.
Keep the unchanged native delegation admission cases in a focused suite so the voice receive tests remain within the repository file-size limit.
|
@clawsweeper re-review The three findings on
The follow-up suites passed 207 tests. After extracting the unchanged regression, both receive/admission files passed all 52 tests, extension test typechecking, targeted lint, and a fresh independent review. The original continuous-audio live API evidence remains valid; no real Discord meeting is claimed. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
* feat(voice): unify Live sessions across calls and meetings Resolve provider capabilities and interruption policy through the shared realtime voice owner. Keep meeting input isolated from virtual-microphone output, reuse native delegation for meetings and Voice Call, and preserve explicit Stop across browser and Apple relay clients.\n\nValidated with real Live API and synthetic Chromium/WebRTC proof, focused regressions, changed-file checks, and independent review. Related to #146289. * test(voice): align capture fixtures and validation gates Model browser audio capture in the shared meeting RPC fixtures so startup failure tests reach the provider and verify capture cleanup. Preserve the same relay startup behavior while simplifying duplicate lifecycle branches. Rebalance the pre-existing 702-root platform test graph by moving security tests beside sandbox/tool tests; keep coverage, graph counts, and limits. * fix(meetings): preserve configured input commands Keep explicitly configured capture/filter/mixer output as provider input on local Chrome and paired nodes, preserving the v2026.9.4 contract. Generated input and output-only overrides continue to use managed browser capture. Retain Live's isolation guard and explain how to remove an input override when selecting Live. Prove the actual PCM paths through both meeting engines and transports, and document the preserved configuration behavior.
) * fix(discord): support continuous GPT Live conversations Reuse the Gateway-owned GPT Live bridge for Discord voice, preserve speaker-bound agent delegation, and let Live own interruption while microphone input remains admitted during playback. Pace input continuously, play short replies, and preserve queued speech pauses. Document model-specific voice routes and unsupported host turn policies. * fix(discord): preserve live voice admission and defaults Keep unpinned realtime configurations on their provider default, ignore silent RTP for speaker retention, and retain live-policy freshness through roster enrichment and agent dispatch. Cover policy revocation during the real participant lookup path, fresh and existing model defaults, and idle speaker reclamation. * test(discord): isolate delegation admission coverage Keep the unchanged native delegation admission cases in a focused suite so the voice receive tests remain within the repository file-size limit. * test(voice): prove delegated agent authority and cancellation * test(discord): await continuous playback completion
* feat(voice): unify Live sessions across calls and meetings Resolve provider capabilities and interruption policy through the shared realtime voice owner. Keep meeting input isolated from virtual-microphone output, reuse native delegation for meetings and Voice Call, and preserve explicit Stop across browser and Apple relay clients.\n\nValidated with real Live API and synthetic Chromium/WebRTC proof, focused regressions, changed-file checks, and independent review. Related to openclaw#146289. * test(voice): align capture fixtures and validation gates Model browser audio capture in the shared meeting RPC fixtures so startup failure tests reach the provider and verify capture cleanup. Preserve the same relay startup behavior while simplifying duplicate lifecycle branches. Rebalance the pre-existing 702-root platform test graph by moving security tests beside sandbox/tool tests; keep coverage, graph counts, and limits. * fix(meetings): preserve configured input commands Keep explicitly configured capture/filter/mixer output as provider input on local Chrome and paired nodes, preserving the v2026.9.4 contract. Generated input and output-only overrides continue to use managed browser capture. Retain Live's isolation guard and explain how to remove an input override when selecting Live. Prove the actual PCM paths through both meeting engines and transports, and document the preserved configuration behavior.
What Problem This Solves
Fixes an issue where Discord users could not use the intended GPT Live voice route and could lose speech after interruption, miss short replies, or have pauses removed from queued replies. Disabling Discord's local interruption also incorrectly stopped microphone admission during playback, preventing Live from hearing spoken interruptions.
Why This Change Was Made
Discord now uses the shared Gateway-owned GPT Live bridge with the originating speaker's agent identity, tool policy, and cancellation signal. Continuous audio has its own playback lifecycle, preserves buffered pauses, and releases idle transport silence. WebSocket and WebRTC share a paced input clock. Live owns interruption; microphone admission remains open while Discord avoids local cancellation. Existing response-based providers retain their turn and wake-name policies. Unpinned Discord configurations retain the selected provider default. Live-policy freshness remains attached to admitted context through asynchronous roster enrichment and is checked before agent dispatch; transport-only RTP events do not extend speaker retention.
User Impact
Discord can use the Codex GPT Live/Cove route through ChatGPT OAuth, or the public GPT Live API with its supported voices and a Platform key. Short replies play promptly and subsequent speech remains audible after provider clears. Explicit host wake-name or forced-consult settings that Live cannot honor receive a clear startup error. Each speaker retains a separate realtime connection and shares the routed OpenClaw agent conversation.
Evidence
gpt-live-1API test passed: sustained non-silent output continued more than one second after finite microphone input ended. The probe received 28,800 bytes of qualifying reply audio and closed cleanly.runtime.agent.runCommandFromIngressthrough the actual agent loop and tools with a synthetic local Responses endpoint. All four cells pass: owner session-label mutation plus workspace write, guest rejection of the owner-only mutation with ordinary write retained, toolsAllow-restricted owner rejection, and cancellation of both the agent and HTTP request within five seconds with no tool effects. The existing Discord admission proof covers the upstream real policy and roster boundary, including revocation during suspended lookup. No production test seam was added.Related: #138441, which independently addresses overlapping OAuth routing and a separate cold-start auto-join issue. The auto-join change is outside this PR.