Repository navigation
Conversation
… answered The realtime instructions tell the agent to give the caller a five-second window to answer the opening consent question and then apologise and end the call, but nothing in the bridge ever wakes the model on silence, so the call simply holds the line until the maximum call duration (300 s in a live report). Arm a bounded watchdog when an assistant turn asks a question (a transcript containing "?") and cancel it on any caller speech or transcript. On expiry, inject a user message telling the agent the window closed and to apologise briefly and call the end-call tool. The watchdog fires at most once per call and is cleared on session close.
|
🦞👀 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 October 5, 2026, 1:15 PM ET / 17:15 UTC (Revision 24). ClawSweeper reviewWhat this changesThe Voice Call plugin adds an optional recording-consent question and automatically ends calls when the caller leaves that question unanswered. Merge readiness⛔ Blocked before merge - 4 items remain This remains useful work that current main does not provide. Earlier code findings are resolved, and the real-call evidence remains relevant; maintainer acceptance of the consent-only policy and its bounded playback exceptions is still unresolved. Priority: P2 Review scores
Verification
How this fits togetherVoice Call bridges telephony carrier audio to a realtime voice provider. The new watchdog observes question playback and caller responses, then prompts a goodbye and requests carrier hangup when its answer window expires. flowchart TD
A[Opt-in consent setting] --> B[Realtime voice bridge]
B --> C[Consent question audio]
C --> D[Carrier playback acknowledgment]
D --> E[Bounded answer window]
F[Caller speech] --> E
E --> G[Goodbye prompt]
G --> H[Carrier hangup]
Decision needed
Why: The implementation chooses new call-ending policy and configuration surface; live proof demonstrates operation but cannot establish product acceptance. Before merge
Agent review detailsSecurityNone. PR surfaceSource +418, Tests +498, Docs +25, Generated 0. Total +941 across 17 files. View PR surface stats
Review metrics
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: Keep existing calls default-off and ship an explicitly approved consent-only policy whose documentation states the playback exceptions and narrower scope. Do we have a high-confidence way to reproduce the issue? Yes, the linked report supplies a concrete silent-caller scenario, and current-main source lacks a consent timer while carrier media can continue. This reviewer did not execute a current-main call. Is this the best way to solve the issue? Unclear pending product acceptance: the default-off consent-specific watchdog is bounded and preserves existing defaults, but it does not implement generic unanswered-question handling. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 516c2a3497f2. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (23 earlier review cycles; latest 8 shown)
|
Two problems with the silence watchdog: it re-armed on any question the agent asked, so a later question could silently end a live call; and when native agent delegation is active the end-call tool is not exposed to the provider, so the injected 'call openclaw_end_call' instruction was unsatisfiable and the line was held open anyway. Move the watchdog into its own module (realtime-consent-window.ts) so it no longer redeclares the shared per-call locals and stops conflicting with the sibling voice-call fixes. It now arms only for the first assistant question seen before any caller response, permanently disarms once the caller speaks, records a response that lands after the window already fired, and the handler ends the call directly when the end-call tool is unavailable instead of trusting the model to do it.
|
@clawsweeper re-review The findings from the last review have been addressed on the current head; the PR body now carries a "Review response" section with the reworked behaviour and the after-fix regression tests (names + exact command + observed result). passes on the branch. |
|
🦞👀 Re-review progress:
|
The consent watchdog's assistant-turn check used a regex literal (/\?/.test(text)); oxlint's prefer-string-includes rule flags this and fails the changed-extensions lint lane. Replace with String.includes.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
The watchdog previously armed whenever the first assistant turn contained a
"?", so any opening question could silently end a live call. Gate arming on
the explicit realtime consent flow instead: add an opt-in
`realtime.consentWindow` config ({enabled, windowMs}), arm the timer only
when it is enabled, and drive the greeting/consent prompt from the same flag.
Also surface the consent question as a shared constant, cover the new flows
in config, agent-context, consent-window, handler, and delegation tests, and
document the consent window in the realtime/streaming guide.
|
@clawsweeper re-review Rebased head |
|
🦞👀 Re-review progress:
|
|
🦞👀 Re-review progress:
|
|
Ready for a maintainer look. 🛎️ ClawSweeper's latest pass on head
@steipete @galiniliev @vincentkoc @obviyus @Patrick-Erichsen — you're the folks with recent |
Resolve conflicts onto main's refactored realtime handler and test helpers: - realtime-handler.ts: keep main's inlined transcript state and unified call.speech/call.assistant-speech event path; re-apply the consent-window hooks. - realtime-handler.test.ts: keep main's createRealtimeConfig/makeCallHarness structure; port the consent-window tests onto it. - realtime-handler.delegation.test.ts: stays deleted; the native-delegation consent-timeout test moves to realtime-handler.lifecycle.test.ts. - realtime-agent-context.test.ts: replace the removed createConfig helper.
The host validates plugin config against the manifest configSchema before the plugin loads, and realtime is additionalProperties: false, so the runtime-only consentWindow schema could not be configured. Declare it in the manifest and cover admission through the manifest schema.
…t-window-watchdog
The voice-call manifest now declares realtime.consentWindow (enabled,
windowMs), raising the plugin config-surface count 4490 -> 4493.
Regenerate docs/.generated/config-baseline.{counts,sha256} so the
config:docs check and the baseline-ratchet job agree with the new
surface.
…t-window-watchdog # Conflicts: # docs/.generated/config-baseline.counts.json # docs/.generated/config-baseline.sha256
Re-generate docs/.generated/config-baseline.{counts,sha256} on the
merged tree so the config:docs check reflects the plugin surface
(4490 -> 4493) on top of current main.
Outbound realtime calls now use the existing speech-idle lifecycle with a 30-second default. Explicit idleHangupMs values override the default; inbound defaults are unchanged. Calls end on speech inactivity even when the carrier continues sending silent media. Reuses provider-session and carrier teardown. Removes the obsolete timer-start log, for a net reduction of three production lines. Adds 50 regression-test lines and their dedicated allocation for continuous silence, clicks/echo, teardown, inbound defaults, and explicit timeout overrides. Supersedes #159146, thanks @mnowrot. Validated red on main, then 103 focused tests green on Blacksmith Testbox; touched-file lint/format passed and autoreview was clean through P2. Co-authored-by: mnowrot <[email protected]>
Outbound realtime calls now use the existing speech-idle lifecycle with a 30-second default. Explicit idleHangupMs values override the default; inbound defaults are unchanged. Calls end on speech inactivity even when the carrier continues sending silent media. Reuses provider-session and carrier teardown. Removes the obsolete timer-start log, for a net reduction of three production lines. Adds 50 regression-test lines and their dedicated allocation for continuous silence, clicks/echo, teardown, inbound defaults, and explicit timeout overrides. Supersedes openclaw#159146, thanks @mnowrot. Validated red on main, then 103 focused tests green on Blacksmith Testbox; touched-file lint/format passed and autoreview was clean through P2. Co-authored-by: mnowrot <[email protected]>
Outbound realtime calls now use the existing speech-idle lifecycle with a 30-second default. Explicit idleHangupMs values override the default; inbound defaults are unchanged. Calls end on speech inactivity even when the carrier continues sending silent media. Reuses provider-session and carrier teardown. Removes the obsolete timer-start log, for a net reduction of three production lines. Adds 50 regression-test lines and their dedicated allocation for continuous silence, clicks/echo, teardown, inbound defaults, and explicit timeout overrides. Supersedes openclaw#159146, thanks @mnowrot. Validated red on main, then 103 focused tests green on Blacksmith Testbox; touched-file lint/format passed and autoreview was clean through P2. Co-authored-by: mnowrot <[email protected]> Source: fc6d8c6 Release adaptation: Ported only playback default, obsolete timer log removal, manifest help and focused call-control regressions. Existing speech/media owner and explicit override unchanged. Companion audit has no later PR mentions; later shared docs/config and unrelated voice changes excluded. No schema changes. timeout 60 node scripts/run-vitest.mjs extensions/voice-call/src/webhook/realtime-call-control.test.ts stopped compiled subprocess preparation with SIGTERM/143; no product verdict. Target lint blocked by external shared-install declaration path; exact logs 1-test.log and 1-lint.log. Runtime/typecheck proof remains unverified. Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 3d4d79b4d8cd287caf6072507bf35ca6f040e323)
Closes #159141
What Problem This Solves
Fixes: a realtime voice call is held open indefinitely when the caller does not answer the agent's question, because nothing ever prompts the model to close the call on silence.
User Impact
User impact: the agent now says a short apology and ends the call itself after the caller has been given the intended window to answer, instead of the line being held until an external limit tears it down.
Why This Change Was Made
The model was instructed to allow a short answer window and then apologise and hang up, but silence produced no event to wake it. A bounded watchdog now arms when an assistant turn asks a question (a transcript containing
?), cancels permanently on any caller speech or transcript, and on expiry injects a user message via the same path the forced-consult flow uses, telling the agent the window closed and to apologise and call the end-call tool. It fires at most once per call and is cleared on session close.Evidence
Live call
75e21e4a-1f30-483c-b7f5-72a8b2f0ccb1: the caller stayed silent after the consent question and the agent apologised and hung up within ~5 s (single firing).pnpm tsgo:extensionspasses on the branch.Review response
Reworked on head
6679c3f4in response to the review:manager.endCall, reasontimeout) after a grace period so the line is never held.src/webhook/realtime-consent-window.ts) so this branch no longer redeclares the shared per-call locals (lastAssistantAudioSentAt,ASSISTANT_SPEECH_TAIL_MS, the per-call maps) that the sibling voice-call fixes also touch. That removes the textual conflict this branch previously created.Tests added (green,
src/webhook/realtime-consent-window.test.ts):disposeCommand:
node --import ./scripts/tsx.mjs scripts/run-vitest.mjs run extensions/voice-call/src/webhook/realtime-consent-window.test.ts— observed7 passed.pnpm tsgo:extensionspasses on the branch.Review response
CI
check-lint-core-2failed on the consent-watchdog change: oxlintprefer-string-includesflagged the regex literal/\?/.test(text).Fixed in
2666fa65— replaced withtext.includes("?")(identical semantics, no regex).node scripts/run-oxlint.mjs --tsconfig extensions/tsconfig.json extensions/voice-call/src/webhook/realtime-handler.ts→Found 0 warnings and 0 errors.pnpm tsgo:extensions→ exit 0Review response
Addressed on head
4b1fb29760bin response to Revision 6:isConsentQuestionUtterance(), matching the fixed question text or aconsent+recordphrasing insrc/realtime-consent.ts). A provider that opens with any other turn can no longer have a live call ended on silence.tellCallerToHangUp()via the same user-message path the forced-consult flow uses) instead of only logging and leaving the line open.Tests (green):
node scripts/run-vitest.mjs run extensions/voice-call/src/webhook/realtime-handler.test.ts extensions/voice-call/src/webhook/realtime-consent-window.test.ts extensions/voice-call/src/webhook/realtime-audio-pacer.test.ts extensions/voice-call/src/webhook/realtime-handler.lifecycle.test.ts extensions/voice-call/src/realtime-agent-context.test.ts— observed 5 files, 154 passed. Coverage added: watchdog stays disarmed when the opening turn is not the consent question; the close waits for the goodbye and respects the cap; a rejected hangup surfaces to the provider.Outstanding (needs a maintainer / real-call evidence): a redacted after-fix real-call trace showing the question → silence → completed goodbye → carrier hangup result, and maintainer direction on the opt-in setting. No fabricated proof is included.
Review response
CI
check-docsandchecks-fast-baseline-ratchetsfailed on the merged head because the voice-call manifest now declaresrealtime.consentWindow(enabled,windowMs), which raises the plugin config-surface count4490 -> 4493past the tracked budget.This is an intentional, minimal config addition required by the consent-window watchdog, and no unrelated config was removed, so the budget is consciously raised in
docs/.generated/config-baseline.counts.json(plugin4490 -> 4493) anddocs/.generated/config-baseline.sha256is regenerated.pnpm config:docs:gen→plugin: 4493pnpm config:docs:check→OK docs/.generated/config-baseline.sha256 and docs/.generated/config-baseline.counts.json(The line-cap warnings for
realtime-handler.ts/realtime-handler.test.tsemitted by the same ratchet job are advisory on GitHub Actions and are unchanged from the prior head.)