Repository navigation
fix(voice): answer phone, meeting and FaceTime consults on Claude CLI agents - #202209
Conversation
|
🦞👀 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. |
✅ Maintainer security changes approvedA maintainer approved this revision with an explicit security approval comment.
A later push requires a fresh approval comment for an external contributor's PR. |
|
Codex review: blocked before merge. What this changesRoutes phone, meeting, and FaceTime consultations through normal agent turns so they honor the configured runtime and fallbacks. Example: A realtime phone caller asks a Claude CLI agent, “What is 17 times 23?”
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this PR fixes an active voice-routing bug that the merged browser Talk fix leaves untouched; no new blocking code defect was found. Reviewed head: Before merge
FindingsNone. Agent review detailsHow this fits togetherVoice bridges pass spoken requests, session context, sender identity, and tool limits into the shared consultation runtime, which returns speakable agent output. flowchart LR
A[Phone meeting or FaceTime] --> B[Shared consult runtime]
B --> C[Plugin ingress admission]
C --> D[Agent command owner]
D --> E[Configured agent runtime]
E --> F[Policy scoped MCP tools]
E --> G[Speakable result]
G --> A
Technical reviewBest possible solution: Use the existing command owner for these bridges while retaining the public embedded default and leaving callback admission to its separately tracked repair. Do we have a high-confidence way to reproduce the issue? Current-main source confirms that these bridges bypass configured runtime selection, and supplied Gateway captures demonstrate the failing embedded route; no target code was executed during this read-only review. Is this the best way to solve the issue? Reusing normal agent command execution addresses runtime selection at its existing owner, with explicit compatibility for embedded SDK callers and preserved sender and tool restrictions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 636a3a653a90. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +193, Tests +515, Docs +13, Other +2. Total +723 across 39 files. Added test files: 2. 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. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. 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 HistoryReview history (8 earlier review cycles)
Reviewed November 27, 2026, 8:05 AM ET / 13:05 UTC (Revision 9). |
Voice Call, meeting-bot and FaceTime consults ran through runEmbeddedAgent with an explicit provider/model, so agents whose model runs on Claude CLI failed with "No API key found for provider anthropic". consultRealtimeVoiceAgent now accepts runner: "agent-turn", which runs the consult as a turn of the prepared consult session through runCommandFromIngress, the path typed messages and Discord voice use. The three callers opt in; Talk keeps the embedded runner. Plugin ingress admits channel-less turns (owner only for bundled or trusted official plugins) and tool bindings only for the plugin's declared tools. The Claude CLI loopback grant carries tool bindings, so voice_call stays bound to the live call.
… agent-turn consults
Review fixes for the agent-turn consult runner:
- A Gateway-launched CLI run's MCP grant resolves requester policy like the embedded run, so a senderless caller gets the toolsBySender "*" entry even when a capped tool set drops node exec. Voice Call also passes the remote party's number as the consult's sender.
- The CLI MCP grant keeps a tool-policy surface that is not a delivery channel ("voice"), so the voice tool filter (tts) still applies.
- Consults suppress verbose output with a new one-run verboseOnce instead of the persistent verbose override, which saved "off" to a shared session.
- The agent turn gets the consult's resolved workspace and the delivery account, destination and thread, still with deliver false.
A consult's thinking level is a one-run choice the bridge makes for every
model: FaceTime always asks for "off", and Voice Call passes
realtime.consultThinkingLevel. The embedded runner clamps a level the model
lacks to its closest one; the agent-turn route instead failed the turn
("Thinking level "off" is not supported for anthropic/claude-opus-5-5"), so
every FaceTime consult on Claude Opus 5.5 failed.
New command option thinkingOnceClosest lets a one-run level fall through to
the attempt's clamp, as subagent spawns already do. Consults set it. A
persistent /think override and other callers still get the error.
Adds a test-lines allocation of 13 lines for the PR's regression tests.
1fd6919 to
8711c7b
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@omarshahine thanks for merging main into the branch. I've pushed a fix for the remaining red test ( ClawSweeper re-reviewed head |
omarshahine
left a comment
There was a problem hiding this comment.
The Beam shard passed at 4a83427. The test-line budget check reports 505 new test lines. The default allowance is 400 and the current allocation is 81, so the check needs 24 more lines of credit.
Please update config/test-lines-allocations/202209-voice-consult-agent-turn.txt with this change.
-81
+# Native source module eviction prevents stale Beam state between non-isolated test files.
+105Please also add this reason to the PR description. The allocation covers the regression test that verifies native repository modules are evicted between test files while dependencies stay cached.
|
@omarshahine thanks for approving the runs. I've pushed |
/allow-security-sensitive-change |
|
/allow-security-sensitive-change |
|
Merged via squash.
|
|
@omarshahine thank you for merging this, and for all the help getting it there: the live FaceTime test, the SDK/security decision, reconciling with main, approving the CI runs and pointing out the exact test-line allocation fix. Phone, meeting and FaceTime consults on Claude CLI agents should now just work. Much appreciated! |
… agents (openclaw#202209) * fix(voice): run phone, meeting and FaceTime consults as agent turns Voice Call, meeting-bot and FaceTime consults ran through runEmbeddedAgent with an explicit provider/model, so agents whose model runs on Claude CLI failed with "No API key found for provider anthropic". consultRealtimeVoiceAgent now accepts runner: "agent-turn", which runs the consult as a turn of the prepared consult session through runCommandFromIngress, the path typed messages and Discord voice use. The three callers opt in; Talk keeps the embedded runner. Plugin ingress admits channel-less turns (owner only for bundled or trusted official plugins) and tool bindings only for the plugin's declared tools. The Claude CLI loopback grant carries tool bindings, so voice_call stays bound to the live call. * fix(voice): keep sender policy, voice surface and session settings on agent-turn consults Review fixes for the agent-turn consult runner: - A Gateway-launched CLI run's MCP grant resolves requester policy like the embedded run, so a senderless caller gets the toolsBySender "*" entry even when a capped tool set drops node exec. Voice Call also passes the remote party's number as the consult's sender. - The CLI MCP grant keeps a tool-policy surface that is not a delivery channel ("voice"), so the voice tool filter (tts) still applies. - Consults suppress verbose output with a new one-run verboseOnce instead of the persistent verbose override, which saved "off" to a shared session. - The agent turn gets the consult's resolved workspace and the delivery account, destination and thread, still with deliver false. * fix(voice): run an unsupported consult thinking level at the closest one A consult's thinking level is a one-run choice the bridge makes for every model: FaceTime always asks for "off", and Voice Call passes realtime.consultThinkingLevel. The embedded runner clamps a level the model lacks to its closest one; the agent-turn route instead failed the turn ("Thinking level "off" is not supported for anthropic/claude-opus-5-5"), so every FaceTime consult on Claude Opus 5.5 failed. New command option thinkingOnceClosest lets a one-run level fall through to the attempt's clamp, as subagent spawns already do. Consults set it. A persistent /think override and other callers still get the error. Adds a test-lines allocation of 13 lines for the PR's regression tests. * fix(voice): let a plugin ingress turn outlive the request that started it Plugin runEmbeddedAgent runs its turn as a detached work continuation ("plugin turns can outlive both the triggering request root and its async work scope"); plugin runCommandFromIngress, which realtime consults now use, did not. A Google Meet bridge is opened inside the googlemeet.join request, so a consult that reached the command queue after that request had ended failed with "Gateway is temporarily unavailable. Please try again shortly." instead of running, unlike the embedded route. runCommandFromIngress now runs its turn as a detached work continuation, the same way runEmbeddedAgent does. Raises the PR's test-lines allocation to 69 for the new regression test. * Merge branch 'main' into fix/voice-consult-ingress * test(beam): expose synthetic adoption failure in CI * Revert "test(beam): expose synthetic adoption failure in CI" This reverts commit b11bbbf. * chore: reconcile voice consult ingress with main * fix(voice): reconcile consult checks with main * fix(test): evict native source modules between non-isolated test files Natively required repository sources live outside the Vitest module graph, so a later file in a shared worker reused copies bound to the previous file's retired state lifecycle (Beam owned-view failed with PLUGIN_STATE_OPEN_FAILED whenever it ran after another gateway file). * test: allocate test lines for native source module eviction Co-authored-by: Han Liu <[email protected]> Co-authored-by: Omar Shahine <[email protected]>
Root cause: src/agents/cli-runner/execute-plugin.ts:481 marks CLI input as host-generated only from the run's input provenance, but the stranded-reply retry (src/auto-reply/reply/stranded-reply-recovery.ts:56-89) correctly keeps the human turn's provenance, so Claude Code saves the retry prompt as a plain user row and chat.history shows it as the operator's own message. Fixes #206304 Thanks @fray-ai for the report and the precise code trace, and @Tosko4 for the first fix in this PR. With a `claude-cli` agent and `messages.visibleReplies: "message_tool"`, a turn that ends with plain text queues the stranded-reply retry (`[System] Your previous reply was not delivered ...`). That retry reached Claude Code as ordinary user input, Claude stored it as a normal user row, and the Control UI drew it as a right-aligned operator bubble. The retry no longer appears as a message the operator wrote. The delivered reply still arrives. An operator who types the same `[System] ...` text still sees it as their own message, and existing history is not rewritten. Nothing changes for the embedded runtime or for permissions. - The CLI candidate sets `promptOrigin: "host"` from the existing `FollowupRun.strandedReplyRetry` flag (`agent-runner-cli-candidate.ts`). `RunCliAgentParams` carries that one optional field, with the same value type `CliBackendExecuteContext.promptOrigin` already uses. - The plugin CLI runner marks host input when that field is set or when the provenance is host-generated, as before (`execute-plugin.ts`). The Claude backend then sends `isSynthetic: true`, Claude saves an `isMeta` row, and the existing history import skips it. - The retry's `inputProvenance` is unchanged (`external_user`). The first version of this PR switched it to `internal_system`; that value feeds requester-profile, continuation, collaborative-steering and personal-MCP requester checks (`reply-tool-authority.ts:353`, `reply-tool-authority-inbound.ts:83/116/214`, `agent-bundle-mcp-webchat-requester.ts:42`), reply threading and model urgency. Those changes are reverted, together with the `missingReplyNoticeAllowed` change it needed. - No text classification: an operator who types the same `[System] ...` text still sees their own bubble. Existing history is not rewritten. Production: +9/-1 lines in 3 files. Tests: one regression at the CLI dispatch boundary (+18); the PR's other tests are dropped. Built Gateway + Control UI from `450c4b640ed6` (main) and this head in a secretless node:24.22.1 container. Agent `main` runs on `claude-cli` with a stand-in `claude` that writes a real Claude Code project JSONL (synthetic input -> `isMeta`) and calls the real OpenClaw MCP `message` tool; agent `embedded` runs on the OpenClaw runtime with a scripted model. Real Chromium (Playwright 1.64.1) drives WebChat sessions. Screenshots and the full table: #207128 (comment) | case | main | this PR | |---|---|---| | claude-cli stranded once: operator bubble with retry text (live / reload) | 1 / 1 | 0 / 0 | | same: delivered reply "Delivered answer P206304." | shown | shown | | same: chat.history retry row | `role: user`, no provenance, importedFrom claude-cli | absent (meta row skipped) | | Claude stdin for retry | `isSynthetic` absent | `isSynthetic: true` | | control: operator types the identical `[System] ...` text | own bubble, `external_user` | own bubble, `external_user` | | control: retry also ends with plain text (second miss) | retry shown as operator bubble; retry final shown; no "No answer" notice | no operator bubble; retry final shown; no "No answer" notice (same as main) | | control: embedded (non-CLI) agent, stranded once | no retry bubble, delivered | identical | Regression test `agent-runner-execution-cli-sessions.test.ts` "sends a stranded-reply retry as host input without changing its provenance (#206304)": fails with the candidate line removed (`- "promptOrigin": "host"`), passes at head. Two-way door: no stored state, schema, config or protocol change; a revert fully restores the old behavior. Blast radius: only stranded-reply retries on plugin CLI backends (Claude CLI) change their native input marker. Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit 0edb7c5) Follow-ups: 7cb8975 fix: keep forked Claude chats separate after a Gateway crash (#208048) [separately ordered lane row]; a736683 fix: show context usage during Claude CLI turns (#207036) [not selected for this narrow backport]; 75ad0b7 fix(voice): answer phone, meeting and FaceTime consults on Claude CLI agents (#202209) [not selected for this narrow backport]; b9ddb61 fix: keep saved system-event automations running after an upgrade (#207275) [not selected for this narrow backport] Release adaptation: Propagate host prompt origin at the stable CLI backend input owner while preserving original human provenance. Co-authored-by: RomneyDa <[email protected]>
Closes #202208
Related: #188440, #161885, #164229, #199379, #199378; supersedes closed #191683.
What Problem This Solves
On an agent whose model runs on Claude CLI (or another CLI runtime), a phone call (Voice Call realtime), a meeting bot (Google Meet, Teams, Zoom, Slack huddles) or a FaceTime call cannot get an answer from the agent: every consult fails with
No API key found for provider "anthropic"or a sign-in error, and the caller hears an error. Typed messages and Discord voice to the same agent work.User Impact
User impact: phone, meeting and FaceTime voice consults run on the agent's own runtime, including Claude CLI and its configured fallbacks, like a typed message. Embedded-runtime agents keep working. Tool policy is unchanged: callers and meeting participants are guests, FaceTime owners stay owners, and a phone consult's
voice_callcan still only end the current call.Why This Change Was Made
The shared helper
consultRealtimeVoiceAgentalways ended inrunEmbeddedAgentwith an explicit provider/model, which calls the provider API directly and never selects the agent's runtime. Discord voice works because it runs a normal agent turn throughrunCommandFromIngress.consultRealtimeVoiceAgentgainsrunner: "agent-turn": after the helper prepares the consult session (fork from the requester, lineage, delivery fields, lifecycle admission), the consult runs as a turn of that session throughrunCommandFromIngresswithdeliver: false. Prompt building, timeout, cancellation,onRunStarted, speakable-text extraction and yield acknowledgements are unchanged. The default staysembedded, so Talk (which adapts embedded tool context and is being reworked in fix(talk): honor CLI model routing in browser calls #164229 / fix(talk): voice consults fail when the chat runs on Claude CLI or a locked native harness #199379) and third-party SDK callers are untouched.responseModelis configured and a thinking override only whenrealtime.consultThinkingLevelis set; otherwise the session's own selection applies. Meeting consults no longer force thinkinghigh; they use the session default. A level a bridge does pass (FaceTime always asks foroff, Voice Call passesrealtime.consultThinkingLevel) is a one-run choice: a model without that level runs at its closest one, as on the embedded runner (8711c7b5a, below).runCommandFromIngresswrapper): a plugin may omitmessageChannelfor a turn on its own surface. Owner authority still needs a bundled or trusted official plugin, and a named channel must still be the plugin's own.toolBindingsare accepted only for tools the plugin declares incontracts.tools. This widens the plugin ingress capability (previously only channel plugins could admit turns); it stays narrower thanrunEmbeddedAgent, which any plugin can already call with an owner bit. Flagging for SDK/security owner review.toolBindingsfrom the command attempt into the MCP loopback grant, as the embedded runner already does, sovoice_callstays bound to the live call.sessions_sendwork from webhook handlers.Not changed: the Voice Call classic (non-realtime) responder (#188440), Talk's Gateway consult path (#164229 / #199379), Discord voice.
Review fixes (ClawSweeper review of
1fd6919)Rebased onto
maind7d546f29(first commit now1698a745c, unchanged content). Second commit503beb2ae, one focused test per finding, each red on the first commit and green after:senderPolicyMode: "always", owner WebChat still exempt), also when a capped tool list drops node exec, which is what switched it towhen-sender-idbefore (src/gateway/tool-resolution.ts,tool-resolution-authority.ts; keyed on the grant's existingnodeExecAllowed, which only Gateway-launched CLI grants carry). HTTP/tools/invokekeepswhen-sender-id. Voice Call also passes the remote party's number (frominbound,tooutbound, the identity inbound admission checks) as the consult'ssenderId, sotoolsBySenderentries apply to the caller. Tests:src/gateway/mcp-http.voice-consult-grant.test.ts(real MCP loopback, grant built bybuildCliMcpGrantContext:tools/listwithoutsessions_send,tools/call sessions_sendrefused, control case with an identified caller),tool-resolution.exclude.test.ts, Voice Callruntime.test.ts.verboseOncecommand option (likethinkingOnce): it sets the run's verbose level and is never written toSessionEntry.verboseLevel. Consults use it instead ofverbose: "off". Test:session-preparation.test.ts(one-shot runs at off and the row keepsfull; the persistent override still saves).workspaceDir(restoredspawnedWorkspaceDir).currentChannelId) and thread (currentThreadTs), withdeliver: falseunchanged. Tests for both:agent-consult-runtime.test.ts.voice,discord-voice,node) when it is not a delivery channel, so the voice filter still dropstts. The same surface also hidesask_user(no question input on a phone line), as on the embedded route. Other non-channel providers stay unset as before. Test:mcp-grant-context.test.ts.attempt-execution.cli-mcp.test.tsis removed; the loopback test above covers the grant at the MCP boundary.Follow-up fix found by the meeting/FaceTime e2e (
8711c7b5a)The first FaceTime e2e (a stand-in plugin with FaceTime's consult parameters,
evidence-e2e-surfaces-red-503beb2ae.log) failed on503beb2ae: FaceTime passesthinkLevel: "off", and on the agent-turn route the command's model selection rejects an explicit level the model lacks, so every FaceTime consult onanthropic/claude-opus-5-5failed withThinking level "off" is not supported for anthropic/claude-opus-5-5. Use one of: low, medium, high, xhigh, max, ultra.The embedded runner clamps such a level to the closest supported one, so this was a regression for any FaceTime agent on such a model, embedded or CLI. New command optionthinkingOnceClosestlets a one-run level fall through to the attempt's existing clamp, as subagent spawns already do; consults set it. A persistent/thinkoverride and other callers still get the error. Test: a new row inmodel-selection.configured.test.ts("prefers observed max support"), red with503beb2ae'smodel-selection.ts, green after; the helper and Voice Call tests assert the flag. After the fix the FaceTime consult runs at--effort lowand the Gateway logsThinking level clamped to low for anthropic/claude-opus-5-5 (requested off; preference retained).Follow-up fix found while tracing a Google Meet e2e failure (
7f72cb5c7)Plugin
runEmbeddedAgentruns its turn as a detached work continuation ("plugin turns can outlive both the triggering request root and its async work scope"); pluginrunCommandFromIngress, which this PR's agent-turn route uses, did not. A meeting's realtime bridge is opened inside thegooglemeet.joinrequest, so a consult that reaches the command queue after the request that started it has ended lost its admission withGateway is temporarily unavailable. Please try again shortly., where the embedded route kept going.runCommandFromIngressnow runs its turn as a detached continuation, the same way (src/plugins/runtime/runtime-agent.ts, one wrap). Test:src/plugins/runtime/runtime-agent.ingress-continuation.test.ts(an ingress turn that starts after its parent root and async scope ended), red on8711c7b5awithGatewayDrainingErroratenqueueCommandInLane←runtime-agent.ts, green after (evidence-unit-ingress-continuation-7f72cb5c7.md); the PR's test-lines allocation goes from 13 to 69 for it. A consult whose tool call itself arrives after that request ended still fails one step earlier, atbeginSessionEffect, onmaintoo; see "Pre-existing" under Evidence.Evidence
Proof status: meeting callback path is blocked by a known bug on
mainOn this PR alone, as on
main, a meeting consult that arrives through the normal provider callback cannot complete, because of a known bug onmainthat this PR does not touch: a realtime voice consult issued from a callback runs under the already-released root of the request that opened the call (googlemeet.join/googlemeet.create), andconsultRealtimeVoiceAgent→beginSessionEffectrefuses it withGatewayDrainingError("Gateway is temporarily unavailable" / "Gateway is draining") before any runner is chosen. It fails the same way on the embedded route onmain.consultRealtimeVoiceAgent, covers every voice bridge) and, for meetings only, fix(meeting): own a fresh root admission for agent consults #142692. Both are open and waiting on maintainers.7f72cb5c7(throwaway local branch, never pushed, not part of this PR), a meeting consult delivered through the normal provider callback aftergooglemeet.joinreturned was answered by the real Claude CLI; the same run on7f72cb5c7alone is refused atbeginSessionEffect("Meeting through the normal provider callback").The proof below is sufficient for the change this PR makes: real Claude CLI answers on the phone route with sender-policy refusal; bundled Google Meet and FaceTime plugins running their own code into the agent-turn route with real Claude CLI answers; a live FaceTime call on the exact head by the FaceTime plugin author; and an upgrade from the latest stable release with existing sessions and saved preferences intact. The meeting callback entry is shown too, with the separate fix applied temporarily; without that fix it stays blocked by the bug above, not by this change.
Real model (Claude CLI 2.1.325, operator's own login,
8711c7b5a)Same isolated QA Gateway as the stub runs (private state, own log file,
env -i), with the realclaudebinary behind a small logging wrapper that gives only the CLI process the operator'sHOMEso its login works, and logs argv, the CLI'ssystem/inittool list,tool_usenames and the final result (no credentials). Twilio and the realtime peer stay simulated; the fixture's consult question is replaced. Theanthropicprovider base URL points at an unreachable local port, so any embedded fallback could not reach the API. Files:evidence-e2e-real-answer-8711c7b5a.log,evidence-e2e-real-policy-8711c7b5a.log(same runs on503beb2ae:*-503beb2ae.log).safe-read-only, caller asks "what is 17 times 23?":ownerpolicy,tools.toolsBySender["*"].deny: ["sessions_send"],ttsallowed; the caller asks the agent to relay a message withsessions_send. The requester's own chat turn (first CLI process) hassessions_send,ttsandask_user; the phone consult (last CLI process) has none of them, the model says so, and a direct call on the consult's own loopback grant is refused:(
session_statusinside the consult showsRuntime: Claude CLIandAuth: api-key (qa-mock-anthropic ...): the QA harness seeds a placeholder Anthropic profile; the CLI itself reportsapiKeySource: "none", i.e. its own login.)Meeting and FaceTime through the bundled plugins (Claude CLI 2.1.325, operator's own login,
7f72cb5c7)Same isolated QA Gateway and Claude CLI wrapper as the phone run, on a dist built from
095c1ce7e(the same tree as7f72cb5c7, whose commit message was reworded afterwards). Only theclaudeprocess gets the operator'sHOME, and theanthropicAPI base URL is a dead local path (0 requests reached it). This time the bundled plugins run their own code; a test plugin (.artifacts/vci-e2e/surface-real-plugin) stands in only for what has no local equivalent. Three real consults in total (meeting ×2, FaceTime ×1; the meeting log is the second run, which also lists the consult's session row; the first gave the same answer). Files:evidence-e2e-real-meeting-7f72cb5c7.log,evidence-e2e-real-facetime-7f72cb5c7.log, commands incommands-e2e-real-surfaces-7f72cb5c7.md.Google Meet.
googlemeet.join {transport: "chrome", mode: "bidi"}on the bundledgoogle-meetplugin: its Chrome transport, realtime engine andcreateMeetingRealtimeEngineBindings(...).handleToolCall→consultMeetingAgent→consultRealtimeVoiceAgent(runner: "agent-turn") → google-meet's ownapi.runtime.agent.runCommandFromIngress(nomessageChannel, guest). Faked:browser.request(the Chrome tab, in call with mic on and audio routed),pactl/parec/pacatonPATH(the meeting audio device), and the realtime voice peer, which emitsopenclaw_agent_consultand records the tool results.FaceTime (owner). The bundled
facetimeplugin is loaded and registered withownerHandlesand a realtime config. A test-side Gateway preload (surface-real-preload.mjs, a Node load hook, in memory, no file edited) records the plugin's ownregister(api)argument and exports its bundled, otherwise unexportedstartFaceTimeTalkDriver. The test plugin then starts that talk driver for the owner handle with facetime's ownapi.runtime, config and logger, from its service context (where thefacetime-runtimeservice would create its helper RPC server). Everything after that is the plugin's code: talk driver →createFaceTimeConsultController→handleToolCall→consultRealtimeVoiceAgent {senderIsOwner: true, runner: "agent-turn", thinkLevel: "off"}→ facetime'srunCommandFromIngress(bundled-plugin owner admission). Faked: the native helper and carrier (no FaceTime.app, no injected helper, no call events), the capture helper (facetime-audio-captureprinting its two readiness lines) andsoxonPATH, and the realtime peer. The platform check is not faked: it only gates thefacetime-runtimeservice (native helper supervisor), which stays off on Linux; the talk driver and controller do not readprocess.platform.Owner admission: a non-owner turn gets
gateway needs the owner's authority, and this turn was not started by the ownerbefore the tool runs (phone run above); the FaceTime consult's call reaches the tool. The earlier stand-in run (evidence-e2e-surfaces-8711c7b5a.log) showed the other side: the same owner consult from a non-bundled plugin is refused withPlugin "vci-surface-consult" cannot admit authenticated owner authority for channel "unknown".Pre-existing, not changed here. When the peer delivers its tool call from a timer created in its
connect()(the async context a provider WebSocket opened bygooglemeet.joinhas) aftergooglemeet.joinhas returned, the consult fails before any runner is chosen:consultRealtimeVoiceAgent→beginSessionEffectthrowsGatewayDrainingErrorbecause that request's root is already released.beginSessionEffectsits at the same place in the helper onmain(src/talk/agent-consult-runtime.ts:352atd7d546f29), so this hits the embedded route the same way; the runs above deliver the peer's events from the test plugin's service context instead. File:evidence-e2e-meeting-released-root-7f72cb5c7.log(stubclaude, no model turn):This is the known
mainbug described under "Proof status" above (#142610, #202915), with open fixes in #202979 and #142692; this PR leaves it to those.Meeting through the normal provider callback, with #202979 applied temporarily (Claude CLI,
7f72cb5c7+ #202979)Same isolated Gateway as the runs above (
env -i, private home, state dir, config and log file). Agentmainis onanthropic/claude-opus-5-5withagentRuntime: claude-cli, and theanthropicAPI base URL is a dead local path, so an answer can only come from the CLI. In the real-model run only theclaudeprocess gets the operator'sHOME, through a logging wrapper on the Gateway'sPATH. The bundledgoogle-meetplugin runs its own code:googlemeet.join {transport: "chrome", mode: "bidi"}, its Chrome transport and PipeWire-Pulse backend check, the realtime engine, thenhandleToolCall→consultMeetingAgent→consultRealtimeVoiceAgent(runner: "agent-turn") →runCommandFromIngress. Faked, because there is no local equivalent:browser.request(a test plugin loaded throughplugins.load.paths, with the browser plugin disabled, acts as a Chrome tab that is in the call with the mic on and audio routed),pactl/parec/pacatstubs onPATH, and the realtime voice provider and peer. What changed from the meeting run above: the peer now sendsopenclaw_agent_consultthrough the normal provider callback. The call comes from a timer created in the bridge'sconnect(), which runs in the async context of thegooglemeet.joinrequest, and the timer fires only after the driver has recorded thatgooglemeet.joinreturned. It no longer comes from the test plugin's service context. A test-only Gateway preload (an in-memory Node load hook; no file is edited) logs where anyGatewayDrainingErroris constructed.#202979 is not part of this PR. It was applied only for these runs: its single commit (
8fbc75de3) was cherry-picked onto a throwaway local branch on top of7f72cb5c7, built withOPENCLAW_BUILD_PRIVATE_QA=1 pnpm build, run, and then deleted. The branch was never pushed. This PR's head is still7f72cb5c7(local and fork). The cherry-pick had no textual conflicts. Its production change (consultRealtimeVoiceAgentwrapped intryBeginGatewayRootWorkAdmission("realtime-voice-agent-consult")) is byte-for-byte #202979. I made one test-only change: on this branch FaceTime consults run as an agent turn, so #202979's new FaceTime test also needs arunCommandFromIngressmock, and it asserts that mock instead ofrunEmbeddedAgent. Temporary patch versus7f72cb5c7:Tests on the temporary branch:
src/talk/agent-consult-runtime.test.ts,extensions/facetime/tests/talk-driver.consult.test.ts): 39 passed.src/talk src/meeting-bot --maxWorkers=1: 70 files passed and 1 skipped. The one failure in the full run,src/meeting-bot/node-host.audio.test.ts, fails only because the fixture "requires --expose-gc". It passes withNODE_OPTIONS=--expose-gc, and fix(talk): run realtime voice consults under a fresh root admission #202979 does not touch that file.There was one real Claude CLI consult. Files:
evidence-run-a-control-7f72cb5c7.log,evidence-run-b-real-cli-7f72cb5c7+202979.log,evidence-run-c-stub-7f72cb5c7+202979.log(the same path as b with the stubclaude), andtemp-patch.diff.a. Control, this PR alone (
7f72cb5c7, stubclaude). Same driver and same callback. The consult is refused atbeginSessionEffectbefore any runner is chosen. The event-loop line shows that the consult runs under thegooglemeet.joinRPC context after that RPC has already responded:b.
7f72cb5c7+ #202979, real Claude CLI 2.1.325 (operator's own login). Same driver and same callback, firing 600 ms aftergooglemeet.joinreturned:Run c (stub
claude, same temporary build) takes the same path deterministically. The tool call fires 587 ms after join returned,cli live session start: provider=claude-cli, the consult session row hasagentRuntime claude-cli,FINAL TOOL RESULT: {"text":"CLAUDE-CLI-VOICE-OK turn 1"}, and noGatewayDrainingErroris constructed.With this PR alone, a meeting consult delivered through the normal provider callback after
googlemeet.joinhas returned is still refused atbeginSessionEffect. That refusal is the knownmainadmission bug (#142610 / #202915), not something this PR changes. With #202979's fresh root admission applied on top, the same callback consult reaches this PR's agent-turn route. Claude CLI answers it on the operator's login (apiKeySource: "none", aclaude-cliconsult session, no API-key error, nothing sent to the Anthropic API URL) with the actual answer, and service context is never substituted. Nothing in this PR needs to change for the meeting callback path to work once #202979 (or #142692) lands.Live FaceTime call (run by @omarshahine,
7f72cb5c7)@omarshahine (FaceTime plugin author) ran the live owner call this PR asked for: an isolated Gateway from the exact
7f72cb5c7checkout on an Apple Silicon Mac, aclaude-cli/claude-opus-5-5agent, one outbound FaceTime Audio call to the configured owner through the real helper, carrier and FaceTime.app. Reported results (comment):off→ closest supported level) and no Anthropic API-key error.This covers the FaceTime entry path that the run above could not: real helper, owner handle check and call events, real audio and realtime provider. Not covered, as he notes: inbound calls, FaceTime video and repeated-call reliability. A later retry on November 21 ended before ringing with a native carrier error (
account unsupported/ empty destination set) on both the isolated and the installed Gateway, so it is not specific to this branch.Upgrade from 2026.11.7 (latest stable, stub
claude)npm view openclaw dist-tags→latest: 2026.11.7;npm install [email protected]into a temp prefix and a fresh isolated home (env -i, fakeHOME, ownOPENCLAW_HOME,OPENCLAW_STATE_DIR,OPENCLAW_CONFIG_PATHand log file); agentmainonanthropic/claude-opus-5-5withagentRuntime: claude-cli; a stubclaudefirst onPATHthat answers every turnCLAUDE-CLI-VOICE-OK turn N(no model, no login); theanthropicAPI base URL is a dead local port (http://127.0.0.1:9/anthropic-unreachable), so an embedded-route attempt shows up as a failed fetch. Voice Call (@openclaw/[email protected]from ClawHub, then replaced by this branch's packed build) runs on the mock carrier with realtime andsessionScope: "main", so consults run in the sharedagent:main:mainsession; a fake realtime peer emitsopenclaw_agent_consult. On 2026.11.7 the main session getsverboseLevel: "full", a chat turn and a phone consult; then the Gateway is stopped and the same home is switched to this branch. File:evidence-upgrade-2026.11.7-to-7f72cb5c7.log.Existing stored data still loads and works after the upgrade. The session row written by 2026.11.7 keeps its key, its id and its saved preferences (
verboseLevel: "full",agentRuntime: claude-cli) through the switch, Doctor, a Gateway restart, a phone consult and a new chat turn on the shared session. Its transcript, including the failed 2026.11.7 consult, reads back on the branch. Doctor migrates the 2026.11.7 databases forward (state v36 → v40, agent v38 → v43) and saves a backup of each first. This branch's base is newer than the 2026.11.7 release branch, so this is an upgrade, not a downgrade, even though the checkout reports 2026.11.5. On 2026.11.7 the same consult went to the embeddedanthropicrunner and failed after 70 s with 7 refused requests. On a real install without an API key, that error isNo API key found. This is the bug this PR fixes. On the branch the consult is answered byclaude-cliin 4.5 s, and no request goes to the API.Notes: the branch build reports 2026.11.5, so Doctor and the branch Gateway skip the installed
@openclaw/[email protected](pluginApi >=2026.11.7). Installing the branch's packed build saved the install but exited 1 withPlugin "voice-call" has no authoritative package-owner metadata(an install-record check in a source checkout). In this checkout the bundleddist/extensions/voice-callof the same commit takes precedence over any installed copy (duplicate plugin id detected; global plugin will be overridden by bundled plugin), so the consult ran the branch's Voice Call code either way. The fake peer issues the Twilio stream session with the internal call id on 2026.11.7 and with the provider call id on the branch, because the stream identity check differs between the two (see the QA fixture note under Gaps).Stub e2e (phone)
Isolated Gateway (QA gateway child, private state, mock voice provider, mock realtime bridge that calls
openclaw_agent_consult), stubclaudeonPATHspeaking stream-json and calling the real MCP loopback. No real model or provider credential.abd4b4fc6anthropic401 / "Couldn't sign in to the AI service"; stubclaudenever got a turnclaude-cliin 2.0–4.2 s; 0 "No API key"safe-read-onlytools on the CLI routememory_get, memory_search, read, voice_call, web_fetch;write→ "Tool not available";voice_call initiate_call→ "This realtime consult may only end_call."ownertool policy, guest callersessions_sendto another session accepted; owner-onlygatewayrefused ("not started by the owner");voice_callstill end_call-onlyownerpolicy +toolsBySender["*"].deny: [sessions_send],ttsallowed1698a745c): MCPtools/listincludessessions_sendandtts;sessions_send→acceptedsessions_sendandttsnot listed;sessions_send→ "Tool not available: sessions_send";voice_callstill end_call-onlycaller_signal_aborted),claudegot SIGTERMLatency (gap called out in the task): the consult now goes through typed-turn preparation (session, model and runtime selection, workspace bootstrap) instead of a direct embedded run. On quiet runs with an embedded (mock) agent, base answered in 2.0 / 2.4 s and this branch in 2.4 / 3.2 s from media start to the final tool result, so expect up to roughly half a second more. Runs on this shared host that hit I/O stalls ranged 5.8–15.9 s on base and 6.6–8.2 s on the branch, so treat the numbers as indicative. Queueing: the turn queues only behind other turns of the same consult session (per call, per meeting, per FaceTime call), not behind the requester's chat, because the consult session is its own key.
Captured output (redacted)
Base
abd4b4fc6, Claude CLI agent,toolPolicy: "safe-read-only":(The QA harness seeds a placeholder Anthropic profile, so base gets a 401 instead of
No API key found; same embedded path either way.)This branch, same setup:
toolPolicy: "owner", with an existing requester session:ownerpolicy withtools.toolsBySender["*"].deny: ["sessions_send"]andttsinalsoAllow(stub callstools/list, thensessions_send):Hangup while the Claude CLI turn is running:
Tests: every new test fails against the base production files and passes on this branch (helper: agent-turn dispatch, hangup cancellation, refusal of embedded tool context; plugin ingress: channel-less turns and tool-binding ownership; CLI attempt and MCP grant carry tool bindings; Voice Call, meeting-bot and FaceTime callers opt in; the meeting shutdown fixture now drives the agent turn). Broader run on this branch:
pnpm test src/talk src/gateway/talk src/meeting-bot src/plugins/registry-runtime.channel-ingress.test.ts src/plugins/runtime src/agents/cli-runner src/agents/command/attempt-execution*.test.ts src/gateway/mcp-http.test.ts src/gateway/tool-resolution.test.ts→ 239 files, 2,722 tests passed (gateway project incl. all Talk tests: 691);pnpm test extensions/voice-call extensions/facetime→ 91 files passed.pnpm tsgo:core:testandpnpm tsgo:extensions:testpass. Changed-file wall times with--maxWorkers=1on a loaded host, mostly transform: helper 17.3 s, plugin ingress 21.8 s, CLI attempt 17.1 s, MCP grant / tool authority 13.7 s, meeting consult 11.2 s, Voice Call runtime 34.0 s, FaceTime consult 7.5 s. Review-fix batch (503beb2ae): the 11 new or changed test cases fail with the first commit's production files and pass after (.artifactsevidence: helper agent-turn shape and reply target, one-shot verbose, capped-grant sender policy, Voice Call remote party, MCP loopback tools/list, grant policy surface); touched suitessrc/talk,src/agents/cli-runner,src/agents/command,src/gateway/mcp-http*,src/gateway/tool-resolution*,src/meeting-bot, plugin ingress → 211 files, 2,262 tests passed; new loopback test 1.2 s wall in-test (141 s with cold transform). Net test lines againstmain+469 after7f72cb5c7: over the 400-line allowance by 69, so the PR addsconfig/test-lines-allocations/202209-voice-consult-agent-turn.txt(69) for the regression tests of three bridges, the review fixes, the thinking clamp and the ingress continuation.pnpm check:test-lines-ratchet: "Test lines OK. Net test lines: +469; allowance: 400; allocation credit: 69."Checks for
7f72cb5c7:pnpm tsgo:core,pnpm tsgo:core:test, oxlint and format on the two touched files,check-test-mock-exports,check:test-lines-ratchet,git diff --check;pnpm test src/plugins/runtime src/plugins/registry-runtime.channel-ingress.test.ts src/talk src/meeting-bot extensions/facetime extensions/google-meet/src/realtime.process.test.ts --maxWorkers=1→ 138 files, 1,289 tests passed, 3 skipped. Earlier checks (rerun on503beb2ae; for8711c7b5a:tsgo:core,tsgo:core:test,tsgo:extensions:test, oxlint and format on the touched files;pnpm test src/agents/command src/talk extensions/facetime src/meeting-bot→ 122 files, 1,300 tests passed, 3 skipped;extensions/voice-call/src/runtime.test.ts29 passed):pnpm tsgo:core,pnpm tsgo:core:test,pnpm tsgo:extensions,pnpm tsgo:extensions:test,check-test-mock-exports, oxlint on touched core files andextensions/voice-call,extensions/facetime, format check,git diff --check.Gaps:
browser.request), the PipeWire-Pulse device (pactl/parec/pacat) and the realtime peer are test fakes. The normal provider-callback path is now shown end to end with real Claude CLI, but only with fix(talk): run realtime voice consults under a fresh root admission #202979 applied temporarily on top of7f72cb5c7("Meeting through the normal provider callback" above; fix(talk): run realtime voice consults under a fresh root admission #202979 is not part of this PR). On this PR alone, that path is still refused atbeginSessionEffectby the knownmainbug (Meeting voice consult always fails with "Gateway is draining": inherits released root-work admission context #142610 / [Bug]: FaceTime realtime calls: openclaw_agent_consult is always refused with "Gateway is temporarily unavailable" (consult runs under a released root) #202915), and the fix belongs to fix(talk): run realtime voice consults under a fresh root admission #202979 / fix(meeting): own a fresh root admission for agent consults #142692. Teams and Zoom sharecreateMeetingRealtimeEngineBindingsbut were not run.7f72cb5c7("Live FaceTime call" above). Still not covered: inbound calls, video, repeated-call reliability. The run on this host had no Mac, FaceTime.app, injected helper, carrier or real call. The helper's call events and its owner-handle check are not exercised: the test plugin starts the bundled talk driver for the configured owner handle directly, with the plugin's own runtime captured by a test-side load hook (no file edited). Audio (facetime-audio-capture,sox) and the realtime peer are fakes. The platform check is not faked; thefacetime-runtimeservice stays off on Linux. A live FaceTime call needs a dedicated Apple Silicon Mac with SIP debugging protections reduced for the helper injection, which this setup does not have.8711c7b5a), meeting ×2 and FaceTime ×1 (7f72cb5c7), all on one operator login with simulated transports; plus one live FaceTime call by @omarshahine on7f72cb5c7with real transport. The phone runs predate7f72cb5c7; the stub phone answer and hangup e2e were rerun on7f72cb5c7(evidence-e2e-{answer,hangup}-7f72cb5c7.log: answered byclaude-cli; hangup →Realtime native consult owner was cancelled.,caller_signal_aborted,claudegot SIGTERM).claudeand ran on the exact head7f72cb5c7. The branch build reports version 2026.11.5, so the installed@openclaw/[email protected]is skipped until replaced with the branch's packed build; in this checkout the bundleddist/extensions/voice-callof the same commit takes precedence over the installed copy, so the branch code ran either way.503beb2ae; later commits change only the thinking-level handling and plugin ingress admission forrunCommandFromIngress, which the embedded route does not use.test/e2e/qa-lab/runtime/voice-call-gateway.tsfails on currentmainbefore this change: its fixture issues the Twilio stream session with the internal call id, which the realtime handler now rejects ("Call identity does not match stream session"). The e2e above patched its copy of the fixture to issue with the provider call id. Not fixed here.Simplify pass: the plugin ingress gate stays inline in its existing owner (an earlier draft moved it to a new module). Delta against the merge base (
7f72cb5c7): production +299 / −132, tests +505 / −36, docs +19 / −5, config +2. Therunneroption is kept rather than switching every caller, because Talk adapts embedded tool context and has its own pending rework, and third-party SDK callers keep today's default.Maintainer validation at
a5e3371(2026-11-24)The branch merged
mainatcc79ae6in15a238d. Commita5e3371reverses a temporary, synthetic-fixture-only CI probe; its source tree is identical to15a238d. The PR still changes the same 36 files. The exact-head CI run completed with two failed test shards, both traced to behavior reproducible onmain:src/gateway/server.beam-owned-view.test.tsat line 591 withUNAVAILABLE. The temporary probe on the preceding head exposed a stale published state database lifecycle during plugin-state lookup. On trusted localmainat7071b82, the Beam file passes alone but fails with the same assertion when run afterserver.private-completion.test.tsandserver.visible-spawn-fallback.product-proof.test.ts, the preceding files in the CI shard. Command:pnpm test src/gateway/server.private-completion.test.ts src/gateway/server.visible-spawn-fallback.product-proof.test.ts src/gateway/server.beam-owned-view.test.ts --maxWorkers=1. The Beam test, handler, state lifecycle, and test runner files are unchanged between scheduledmainrevisione80be914and the PR CI tested base79e42e0. This is a test module lifecycle failure exposed by file order; the production lifecycle guard remains in place.profile-revokedassertion at line 144 because the archive completed. The scheduled main CI run 45553662953, job 139000942605, one80be914, failed the same test with the same successful archive response.e80be914is an ancestor of the PR CI tested base79e42e0; the test, MCP runtime, grant store, tool resolution, and in-process authority files are unchanged between those revisions. The test passes alone on localmain, so the failure is sensitive to its run context.The PR CI report calls both jobs
unknownbecause the latest scheduledmainrun had no matching job names, so it did not compare test signatures. The evidence above identifies the matching failures without claiming the PR CI passed. The required maintainer security approval for this revision is still pending.Maintainer conflict resolution at
c23749e(2026-11-26)The prepared branch fast forwarded from
a5e3371to signed merge commitc23749e, incorporatingmainat1c59502. The eight resolved conflicts preserve sender-derived ownership for named plugin channels, the trusted owner claim for channel-less bridges, main's host-only thinking normalization, the consult's one-run thinking choice, and session-runtime workspace preparation for embedded consults. The PR still changes 36 files relative to the incorporated main tip.Local preparation passed
prepare-validate-commit,git diff --check, formatting on the 11 conflict-touched files, and scoped local review with no P0/P1 finding. The nativeprepare-gatesrecordedgithub_pendingforc23749e; contributor code was not executed locally. The branch was published by a normal fast forward push, and nativeprepare-pushverified the remote head and wrote its publication receipt without a second push. Exact-head CI and security review are pending. The prior-head failures above remain attributed tomain; the current-head CI result will be assessed separately.Exact-head CI correction at
bbc1221(2026-11-26)CI on
c23749efailed three PR checks and repeated the same inherited Beam assertion documented above. Signed follow-upbbc1221repairs the three branch failures together:senderIsOwnerfield under its original name through ingress admission. This preserves the existing trusted bridge claim and satisfies main's owner-producer boundary rule. Focused boundary lint passed locally.senderIsOwner: true. The same test already asserts that the plugin omits the field so the host decides owner from the admitted sender.The normal signed commit hook passed with frozen root dependencies installed in the isolated prep worktree and package scripts disabled. The correction fast forwarded the contributor branch without force. Fresh exact-head CI is pending. The native review refresh on the mounted worktree was stopped after its full transition verification and a slow clean-tree scan; its exact operation lock was recovered, and the transition journal and earlier preparation receipts remain intact. No merge request has been submitted. Required human security-sensitive review remains pending.
Beam test-runner fix at
4a83427and test-line allocation at7789990(2026-11-28)4a83427fixes the inheritedserver.beam-owned-viewfailure documented above. Non-isolated test workers now evict natively required repository sources (outsidenode_modules) after each file, so a later file no longer reaches a copy bound to the previous file's retired state lifecycle. The change is insrc/plugins/native-module-require.ts(clearNativeRepositorySourceModulesForTest) andtest/non-isolated-runner.ts. Cause, local before/after runs and checks: fix(voice): answer phone, meeting and FaceTime consults on Claude CLI agents #202209 (comment). The Beam shard passed at4a83427.7789990raises the justified test-line allocation from 81 to 105. CI measured 505 new test lines against the 400-line allowance. The extra 24 lines cover the regression test that verifies native repository modules are evicted between test files while dependencies stay cached.