Repository navigation
fix(computer-use): macOS live-proof rig deadlocks on operator device approval - #124536
Conversation
The rig ran its operator CLI and its proof runner from one state dir, so both shared one device identity. A paired operator device is pinned to the scopes of its first connect, and `nodes list` connects first for `node.pair.list` (operator.pairing); the proof runner then needs operator.write, which is a scope upgrade the gateway never approves silently and which no rig client can approve for itself. The proof runner is a GATEWAY_CLIENT/BACKEND client, so on a loopback auth-none gateway it is admitted unpaired with the scopes it asks for: giving the CLI its own `cli-state` identity is enough, and `agent-state` now never accumulates a pairing row. `nodes list` also read `node.list` through the plain CLI client while `nodes status`/`describe` used the diagnostics ladder. On any gateway where the CLI must pair, the unfiltered list silently dropped connected/commands/ computerUse and `--connected` failed outright, so the documented rig gate could not confirm the node. Both call sites now use `callNodeDiagnosticsGatewayCli`. Docs drop the `devices approve <requestId>` instruction, which was circular: that invocation is its own new device identity.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 16, 2026, 7:16 AM ET / 11:16 UTC. ClawSweeper reviewWhat this changesThe PR separates the computer-use rig’s CLI and proof-client state directories and makes both Merge readinessKeep open: the change follows the existing diagnostics-auth path used by sibling node commands and targets a source-supported failure, but the maintainer-labeled PR still needs exact-head CI and auth-matrix review. Priority: P2 Review scores
Verification
How this fits togetherThe macOS computer-use rig launches an isolated Gateway, app node, CLI, and proof runner. The CLI reads pairing and connected-node state, while the proof runner invokes the selected computer-use node through the Gateway. flowchart LR
A[Computer-use rig command] --> B[CLI state directory]
A --> C[Proof client state directory]
B --> D[Gateway pairing and diagnostics]
C --> D
D --> E[Connected node details]
D --> F[Computer-use proof result]
Before merge
Agent review detailsSecurityNone. PR surfaceSource 0, Tests +82, Docs +2, Other +5. Total +89 across 5 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one diagnostics ladder for both list flows, preserve the separate CLI and proof-client identities, and validate the current head across the local and remote authentication paths before merge. Do we have a high-confidence way to reproduce the issue? Yes, from source and the submitted isolated-gateway trace: current main bypasses the diagnostics ladder for both list reads, while sibling commands use it. This read-only review did not run the signed-app rig. Is this the best way to solve the issue? Yes, provisionally: reusing the existing diagnostics ladder is cleaner than adding a rig-only authorization exception or a second fallback path. Exact-head auth-matrix validation remains necessary. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0c546979b2ac. LabelsLabel 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
|
The extracted diagnostics-auth file stringified captured log arguments directly, which the type-aware core lint stripe rejects (no-base-to-string). Move the existing formatter into the shared node test helpers instead of duplicating it.
|
Merged via squash.
|
…approval (openclaw#124536) * fix(computer-use): unblock the macOS live-rig proof flow The rig ran its operator CLI and its proof runner from one state dir, so both shared one device identity. A paired operator device is pinned to the scopes of its first connect, and `nodes list` connects first for `node.pair.list` (operator.pairing); the proof runner then needs operator.write, which is a scope upgrade the gateway never approves silently and which no rig client can approve for itself. The proof runner is a GATEWAY_CLIENT/BACKEND client, so on a loopback auth-none gateway it is admitted unpaired with the scopes it asks for: giving the CLI its own `cli-state` identity is enough, and `agent-state` now never accumulates a pairing row. `nodes list` also read `node.list` through the plain CLI client while `nodes status`/`describe` used the diagnostics ladder. On any gateway where the CLI must pair, the unfiltered list silently dropped connected/commands/ computerUse and `--connected` failed outright, so the documented rig gate could not confirm the node. Both call sites now use `callNodeDiagnosticsGatewayCli`. Docs drop the `devices approve <requestId>` instruction, which was circular: that invocation is its own new device identity. * test(cli): share the runtime-log formatter across nodes CLI e2e files The extracted diagnostics-auth file stringified captured log arguments directly, which the type-aware core lint stripe rejects (no-base-to-string). Move the existing formatter into the shared node test helpers instead of duplicating it.
What Problem This Solves
Fixes an issue where maintainers following the documented macOS computer-use live-proof rig in
docs/nodes/computer-use.mdcould not complete it headlessly. Theproofstep failed withNOT_PAIRED/scope upgrade pending approval, and the documented escape hatch (openclaw --profile <profile> devices approve <requestId>) was circular: that CLI invocation is its own new device identity, so it needed an approval of its own. Only the isolated app heldoperator.admin, and its approval surface is a settings UI, so the flow was not headless as documented.The same change fixes a second, wider problem:
openclaw nodes listsilently lost the connected view. On any gateway where the CLI must pair a device, the unfiltered list droppedconnected,commands, andcomputerUsewithout saying why, andnodes list --connectedfailed outright — so the rig's documented "rerunnodesuntil the node is connected and advertises acomputerUsedescriptor" gate could not be satisfied.Why This Change Was Made
A paired operator device is pinned to the scopes of its first connect, and widening them later is a scope upgrade the gateway never approves silently. The rig ran its operator CLI and its proof runner from one
OPENCLAW_STATE_DIR, so they shared one device identity:nodes listconnected first fornode.pair.list(operator.pairing) and pinned it, after which the proof runner'soperator.writerequest was an unapprovable upgrade.No wider scope grant is needed to fix it. The proof runner and
nodes approveconnect asGATEWAY_CLIENT/BACKENDclients, andshouldSkipLocalBackendSelfPairingadmits an unpaired loopback backend onauth.mode: "none"with exactly the scopes it declares, creating no pairing row at all. So the rig now gives the CLI its owncli-stateidentity and leavesagent-stateto the backend clients — an ownership split, not a privilege increase.Separately,
nodes listreadnode.listthrough the plain CLI client whilenodes statusandnodes describealready used the diagnostics ladder (callNodeDiagnosticsGatewayCli, which falls back to a device-less local-backend read). Bothnodes listcall sites now use the same ladder, so one command no longer degrades where its siblings work.Non-goal: this does not change gateway connect authorization. A related asymmetry — a narrowly paired device also caps a local backend client that would otherwise skip pairing, which can affect the gateway's own agent tool path on an
auth.mode: "none"install — is left for a separate owner decision.User Impact
Maintainers can run the macOS computer-use live rig end to end without any device-approval detour or UI interaction.
openclaw nodes listnow reports connected nodes, their commands, and theircomputerUsedescriptor on gateways where the CLI must pair, instead of quietly returning pairing-only data, andnodes list --connectedno longer fails there.Evidence
Live, against an isolated gateway (
auth.mode: "none", loopback, ownOPENCLAW_STATE_DIR, never the operator's:18789), driving the real rig script:Reproduction of the reported failure — the CLI pairs the shared identity narrowly, then every wider client is locked out:
After the split, with a real node connected, the rig completes headlessly:
rig nodesreturns the merged view withconnected: true, the node's commands, and.pending[0].requestId.rig approve <id>succeeds unattended (it needsoperator.pairing+operator.admin).rig proofnow reaches its own assertion —expected exactly one connected computer node, found 0on this headless host — instead of failing at the gateway.node.invokeprobe fromagent-statereturns a params-validation error, provingoperator.writewas granted.agent-statereintroducesscope upgrade pending approvalat the proof step, confirming the causal link.Tests: new
src/cli/program.nodes-diagnostics-auth.e2e.test.tscovers bothnodes listvariants reading through the diagnostics ladder. Verified failing before the fix (unfiltered lost the node;--connectedexited 1) and passing after. 31 tests green acrossprogram.nodes-basic.e2e.test.ts+ the new file; oxlint and thecore.test.config-clitsgo shard clean.Production LOC: +2/-2 in
src/cli/nodes-cli/register.status.ts, +11/-2 in the dev rig script (mostly an invariant comment). Tests: +277/-195, almost entirely a move — the diagnostics-auth group was extracted into its own file because the basic file was at itsmax-linescap.Not verified here: the full signed-app rig run for both
peekabooandcuaneeds a desktop session with Accessibility/Screen Recording grants and input injection into a fixture window; the maintainer is running that separately.