Skip to content

fix(nodes): show paired-device launch approvals in the requesting browser - #130573

Merged
steipete merged 1 commit into
mainfrom
codex/node-launch-approval-inbox
Aug 27, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/node-launch-approval-inbox

Conversation

@steipete

@steipete steipete commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Closes #130556

What Problem This Solves

Fixes an issue where users starting Codex work on a paired device from Control UI would wait for a node-launch approval that was never delivered to their browser. A separate authorized reviewer could see it, but the initiating browser showed neither the approval event nor its attention badge.

Why This Change Was Made

The internal duplex invocation retains the browser connection ID as requester provenance. The node-policy adapter incorrectly also used that ID to exclude the transport requester from approval delivery. Internal calls now retain their identity binding without excluding the operator's connection; ordinary transport requesters remain excluded.

Pairing, command allowlisting, approval visibility/scopes, live authority checks, and one-time decision consumption are unchanged. This does not waive Codex's separate node-wide per-attempt launch approval in Full Access.

The fix stays at the node-policy approval owner. Clearing the inherited connection ID globally would discard valid requester ownership; changing shared approval visibility would unnecessarily broaden the repair. No config, protocol, schema, or dependency changes.

Production LOC: +3/-1 (net +2, entirely the explanatory comment; executable LOC neutral). Tests: +13/-12 (net +1). The existing ownership regression is table-driven for ordinary versus internal callers, with unrelated-device exclusion and requester metadata retained.

User Impact

The requesting Control UI receives the required launch approval in its inbox, can approve it without reloading, and continues remote native execution. Full Access still suppresses native-command approvals; the documented separate node-launch approval remains required.

Provenance: the interaction was made visible by duplex support in #126961, authored and merged by @steipete on August 21, 2026 (d17bbfc31a8f). The requester-exclusion path predates that change.

Evidence

  • The new internal-caller regression failed on the pre-fix source because the requesting connection was absent from recipients. The ordinary-caller case passed.
  • 77 tests across node-policy, node decision receipts, and shared approval routing pass after the fix.
  • The full changed-file gate passes for both files, including production/test typing, lint, and boundary guards. Final Codex autoreview reports no accepted/actionable findings.
  • Rebuilt candidate, real development Gateway, paired node CLI, pinned native Codex CLI 0.149.1, and Chromium: three complete browser/stress cycles passed. Each includes browser model/node/Full Access selection, inbox approval, native file/HTTP execution, ten fresh-process burst turns, cancellation, immediate replacement, and process cleanup. Total: 39 Full Access native executions, 30 burst turns, three cancel/replacements, 39 node-launch approvals, zero native-command approval events. Baseline deny, credential-canary scrubbing, disconnect termination, and fresh recovery also pass in each cycle.
  • The separate OpenClaw harness baseline at 64f30c70d797e29beb4f081a4b873643aa457924 passed three Docker-network rounds and three browser rounds: 300 container creates/starts/exits/removals, zero approval events or leftover containers, plus the paired-node lifecycle suite.
  • Blacksmith Testbox: https://github.com/openclaw/openclaw/actions/runs/33026136183 — owned environment stopped after artifact collection. The candidate build used a Testbox synthetic sync commit over the pinned baseline; production file hashes matched the local patch. No claim that this environment is a live model-provider reliability test.
  • Personally checked pinned upstream Codex stdio lifecycle semantics in transport.rs. This defect is OpenClaw approval delivery before native launch, not Codex's process protocol.

The provider is a deterministic HTTP Responses fixture. Its unsupported WebSocket upgrade produces the visible HTTP-fallback diagnostic in the recording; that is not an approval or a live-provider failure.

Before: initiating browser waits, without an approval badge.

Before: missing approval

After: the same requesting browser receives and displays the required approval.

After: visible launch approval

After approving: native execution finishes in the remote session.

After: completed native execution

Real browser flow, including the inbox approval around eight seconds:

codex-approval-browser-proof.mp4

AI-assisted; focused source, dependency-contract inspection, runtime proof, and Codex autoreview performed. Temporary stress drivers and recordings are not committed.

Final review and landing evidence

ClawSweeper found no actionable correctness or security findings and agreed with the owner-bound fix. Its pending-CI item is now satisfied: CI run 33030537821 and CodeQL passed on c9d208a1f84cc0ba53efe57717572e04c2ece205. No additional Rank-up moves were listed. This is a maintainer-directed native landing, not an automatic ClawSweeper merge; approval authority and the separate launch policy remain unchanged.

Maintainer-tooling follow-up: after successfully merging and removing its worktree, the native landing wrapper's exit cleanup encountered a deleted-current-directory error and retained its operation lock. The exact stale lock was safely recovered after verifying no PR tools remained. This did not affect the landed code or checks.

@steipete steipete self-assigned this Aug 27, 2026
@clawsweeper

clawsweeper Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS maintainer Maintainer-authored PR labels Aug 27, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. 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 Aug 27, 2026
@clawsweeper

clawsweeper Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 9:40 PM ET / August 27, 2026, 01:40 UTC.

ClawSweeper review

What this changes

The PR lets a synthetic paired-device node invocation send its required plugin approval to the initiating Control UI browser while retaining ordinary requester exclusion.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open. The patch directly repairs the approval-recipient exclusion at the Gateway owner, preserves approval visibility and decision authorization, and remains subject to explicit maintainer review and exact-head CI.

Priority: P1
Reviewed head: c9d208a1f84cc0ba53efe57717572e04c2ece205
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-proven repair with appropriate regression coverage and no blocking correctness finding.
Proof confidence 🌊 off-meta tidepool Not applicable: Not applicable: repository state identifies the author as a MEMBER; the PR body nonetheless provides linked before/after Control UI evidence and a recording.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Not applicable: repository state identifies the author as a MEMBER; the PR body nonetheless provides linked before/after Control UI evidence and a recording.
Evidence reviewed 6 items Current-main defect: Current main unconditionally passes the invoking connection as the recipient exclusion, which omits the browser connection retained by synthetic invocation.
Patch and regression coverage: The branch omits that exclusion only for synthetic clients; its table-driven regression retains requester metadata, preserves ordinary exclusion, and excludes the unrelated approval device.
Recipient authorization remains intact: Recipient lookup first requires a connected client that can render plugin approvals and then applies per-record visibility; requester-device and reviewer-device bindings are unchanged.
Findings None None.
Security None None.

Live Verification

Command: pnpm openclaw --help

Result: PASS (completed)

$ node scripts/run-node.mjs --help
[openclaw] Building TypeScript (dist is stale: missing_build_stamp - build stamp missing).
[openclaw] Building bundled plugin assets.
[canvas] build: node scripts/bundle-a2ui.mjs
[log] ‹DIR›/a2ui.bundle.js  chunk │ size: 399.96 kB
[log] ‹DIR›/a2ui-v0.9.bundle.js  chunk │ size: 615.66 kB
[log]
[success] rolldown v1.2.0 Finished in 119.98 ms
[diffs] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts curated
[diffs-language-pack] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts full
[discord] build: node --import tsx ../../scripts/build-discord-activity-sdk.mts
[tsdown-build] invocation 1/2 finished in 0.7s
node_modules/playwright-core/lib/coreBundle.js (65821:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65821:29 ]
       │
 65821 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

node_modules/playwright-core/lib/coreBundle.js (65828:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65828:29 ]
       │
 65828 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

node_modules/web-tree-sitter/web-tree-sitter.js (2343:30) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2343:31 ]
      │
 2343 │           ASM_CONSTS[start] = eval(func);
      │                               ──┬─
      │                                 ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

node_modules/web-tree-sitter/web-tree-sitter.js (2366:32) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2366:33 ]
      │
 2366 │           moduleExports[name] = eval(func);
      │                                 ──┬─
      │                                   ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

[tsdown-build] invocation 2/2 finished in 14.2s
[plugin-control-plane-loads] verified 36 built modules with native require and checked doctor closures
runtime-postbuild: 11 phases completed in 3920ms (slowest: built plugin control-plane loads 3212ms)

OpenClaw 2026.8.1 (c9d208a) — All your chats, one OpenClaw.

Usage: openclaw [options] [command]

Options:
  --container ‹name›   Run the CLI inside a running Podman/Docker container named ‹name› (default: env OPENCLAW_CONTAINER)
  --dev                Dev profile: isolate state under ~/.openclaw-dev, default gateway port 19001, and shift derived ports (browser/canvas)
  -h, --help           Display help for command
  --log-level ‹level›  Global log level override for file + console (silent|fatal|error|warn|info|debug|trace)
  --no-color           Disable ANSI colors
  --profile ‹name›     Use a named profile (iso
… output truncated …

Assertions:

  • PASS expect_output: Usage: openclaw

How this fits together

Control UI starts paired-node work through the Gateway’s plugin node-invocation policy. The policy records requester metadata, finds authorized approval clients, sends the approval event, and waits before node dispatch continues.

flowchart LR
  A[Control UI browser] --> B[Internal node invocation]
  B --> C[Gateway node policy]
  C --> D[Approval recipient filter]
  D --> E[Browser approval inbox]
  E --> F[Paired node dispatch]
Loading

Decision needed

Question Recommendation
Should this maintainer-labelled Gateway approval-routing repair be accepted once exact-head CI is green? Accept after CI: Accept the owner-bound repair after the current head’s required checks complete successfully.

Why: The patch changes delivery of an authorization-relevant approval event, and the protected maintainer label requires explicit human handling despite the preserved visibility gate.

Before merge

  • Resolve merge risk (P1) - Exact-head CI is still running; merge eligibility should wait for its completion.
  • Complete next step (P2) - The protected maintainer label and pending exact-head checks require human merge handling; no separate repair lane is needed.
Agent review details

Security

None.

PR surface

Source +2, Tests +1. Total +3 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 3 1 +2
Tests 1 13 12 +1
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 16 13 +3

Review metrics

Metric Value Why it matters
Executable production delta 0 net executable lines; 2 explanatory comment lines; tests +1 net The behavioral change replaces one recipient-selection expression and is covered by an ordinary-versus-synthetic routing table.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #130556
Summary: This PR is the focused candidate fix for the linked paired-device approval-delivery bug.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain the shared visibility filter and requester metadata, while passing no transport-recipient exclusion only for the server-constructed synthetic caller path.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain the shared visibility filter and requester metadata, while passing no transport-recipient exclusion only for the server-constructed synthetic caller path.

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

Yes: source establishes the omission on current main and the focused table test reproduces the ordinary versus synthetic recipient difference; the PR body also supplies linked browser evidence.

Is this the best way to solve the issue?

Yes: the repair changes the node-policy approval owner while leaving shared authorization, approval resolution, requester provenance, and node dispatch checks intact.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against c6fa27aea68b.

Labels

Label changes:

  • add P1: The normal requesting browser can wait indefinitely for an approval that is visible only to another reviewer.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Not applicable: repository state identifies the author as a MEMBER; the PR body nonetheless provides linked before/after Control UI evidence and a recording.

Label justifications:

  • P1: The normal requesting browser can wait indefinitely for an approval that is visible only to another reviewer.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Not applicable: repository state identifies the author as a MEMBER; the PR body nonetheless provides linked before/after Control UI evidence and a recording.

Evidence

What I checked:

Likely related people:

  • steipete: Authored the merged duplex and paired-device execution work that established the synthetic caller path, and has maintained this approval-routing area. (role: feature owner and recent area contributor; confidence: high; commits: d17bbfc31a8f, 1353ce0995c6, def37da9f943; files: src/gateway/server-plugins.ts, src/gateway/node-invoke-plugin-policy.ts)
  • Vito Cappello: Current-main blame attributes the unconditional exclusion line to commit 8587020; the imported-history shape makes deeper original-intent attribution uncertain. (role: current-main line contributor; confidence: low; commits: 8587020f5a8b; files: src/gateway/node-invoke-plugin-policy.ts)

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.

@steipete
steipete merged commit 96ea1e3 into main Aug 27, 2026
220 checks passed
@steipete
steipete deleted the codex/node-launch-approval-inbox branch August 27, 2026 01:58
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime maintainer Maintainer-authored PR P1 High-priority user-facing bug, regression, or broken workflow. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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.

[Bug]: Codex paired-device approval is hidden from the requesting browser

1 participant