Skip to content

[Bug]: nodes approve failed: GatewayClientRequestError: unknown requestId #94040

Closed

Description

@xrow

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

I want to connect the companion app for windows. It told me to run openclaw nodes approve 57511973-c922-444a-b5a6-d689fc6ea364 on the gateway. When running it on the gateway I got this error. This error doesn`t mean anything to me. It looks like a defekt, but it might be not.

[openclaw ~ ]# openclaw nodes approve 57511973-c922-444a-b5a6-d689fc6ea364
│
◇  

OpenClaw 2026.6.5 (5181e4f) — Gateway online—please keep hands, feet, and appendages inside the shell at all times.

│
◇  
│
◇  
nodes approve failed: GatewayClientRequestError: unknown requestId

Steps to reproduce

  • Connect Windows Companion App
  • Run node approval on Gateway

Expected behavior

Unclear: Bugfix or better error message.

Actual behavior

Error: nodes approve failed: GatewayClientRequestError: unknown requestId

OpenClaw version

2026.6.5 (5181e4f)

Operating system

UBI10 https://gitlab.com/xrow-public/helm-openclaw/-/blob/main/container/openclaw/Containerfile?ref_type=heads

Install method

corepack pnpm

Model

n.a.

Provider / routing chain

companion app -> kubectl port forward (kubectl port-forward --address 127.0.0.1 -n openclaw deployment/openclaw 18790:18789) > gateway

Additional provider/model setup details

n.a.

Logs, screenshots, and evidence

Impact and severity

Affected users
Severity blocks workflow
Frequency always
Consequence failed onboarding

Additional information

No response

Activity

  1. added
    bugSomething isn't working
    on Jun 17, 2026
  2. changed the title [-][Bug]:[/-] [+][Bug]: nodes approve failed: GatewayClientRequestError: unknown requestId[/+] on Jun 17, 2026
  3. ibcorreaai-oss commented on Jun 17, 2026

    @ibcorreaai-oss

    The pairing store in 2026.6.5 is disk-backed per state dir, not shared in-memory. requestNodePairing() writes the request to <stateDir>/nodes/pending.json, and node.pair.approve → approveNodePairing(requestId) reloads that same file and returns "unknown requestId" when the key is missing (see node-pairing-*.js / pairing-token-*.js; resolveStateDir keys off OPENCLAW_STATE_DIR / $HOME).

    With kubectl port-forward in front of the gateway, the most likely cause is that the Companion App's pairing connect landed on a different gateway replica/process (or a different container filesystem / $HOME) than the one your openclaw nodes approve reached, so that process's pending.json genuinely has no such requestId. There is also a 5-minute TTL (PENDING_TTL_MS = 300000) that loadState() prunes on every read, so approving more than 5 minutes after the id is shown produces the same error even on a single instance.

    Workaround:

    • Run a single gateway replica, or mount a shared ReadWriteMany volume at the state dir on every replica and set OPENCLAW_STATE_DIR identically on all pods and wherever the CLI runs.
    • kubectl exec into the same pod that received the pairing connect (not a sibling replica) and run the approve there.
    • Confirm the id is listed by openclaw nodes pending immediately before approving, and approve within 5 minutes.

    Product nit: the approve error could distinguish "expired" vs "not found on this instance" so operators can tell a stale id from a routing/state-dir mismatch.

  4. xrow commented on Jun 17, 2026

    @xrow
    Author

    @ibcorreaai-oss TY, but I have a single replica and I see the pending node. Your workaround is not valid for my case.

  5. clawsweeper commented on Jun 17, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 21, 2026, 8:20 PM ET / 00:20 UTC.

    Summary
    Keep open: current main and the latest release still expose the raw nodes approve failed: GatewayClientRequestError: unknown requestId path, and the focused open fix candidate at #94452 uses closing syntax for this issue.

    Reproducibility: yes. at source level: current main returns unknown requestId from node.pair.approve when the pending ID is missing, and the nodes CLI wrapper can render that raw gateway error. I did not live-run the full Windows Companion plus Kubernetes port-forward setup.

    Root-cause cluster
    Relationship: canonical
    Canonical: #94040
    Summary: This issue is the canonical report for the nodes approval unknown requestId onboarding failure; the focused CLI translation PR is the strongest current fix candidate, while broader gateway idempotency remains adjacent.

    Members:

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

    Next step
    No new repair job should be queued because open linked PRs already use closing syntax; maintainers should review or close the existing candidates first.

    Review details

    Best possible solution:

    Review and land or reject #94452 as the focused nodes CLI recovery fix, and keep any gateway idempotency semantics as separate maintainer-reviewed work.

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

    Yes, at source level: current main returns unknown requestId from node.pair.approve when the pending ID is missing, and the nodes CLI wrapper can render that raw gateway error. I did not live-run the full Windows Companion plus Kubernetes port-forward setup.

    Is this the best way to solve the issue?

    Yes for the immediate operator-facing bug: translating the exact gateway stale-request response in the nodes CLI is narrower than changing gateway approval or token semantics. The broader idempotency idea should stay separate unless maintainers explicitly choose that contract.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

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

    Label changes

    Label justifications:

    • P2: The issue blocks a node/companion onboarding approval path but is limited to the nodes CLI and gateway pairing surface.
    • impact:auth-provider: The failure is in node pairing approval, which controls whether the companion node is authorized.
    Evidence reviewed

    What I checked:

    Likely related people:

    • Shakker: Current-main blame for the nodes CLI approve path, nodes error wrapper, gateway approve handler, and approveNodePairing helper maps to commit c6386178973d05008eadc3923596b40fe1a5581f. (role: recent area contributor; confidence: medium; commits: c6386178973d; files: src/cli/nodes-cli/register.pairing.ts, src/cli/nodes-cli/cli-utils.ts, src/gateway/server-methods/nodes.ts)
    • steipete: History shows Peter Steinberger introduced the gateway node-pairing bridge and later carried approval-scope hardening in the node pairing docs and helpers. (role: historical feature owner; confidence: high; commits: eace21dcaece, ca2fdcc45f36; files: src/infra/node-pairing.ts, src/gateway/server-methods/nodes.ts, docs/gateway/pairing.md)
    • jacobtomlinson: Commit history shows Jacob Tomlinson restricted node pairing approvals and added authz coverage around the same gateway approval path. (role: adjacent approval/auth contributor; confidence: medium; commits: 4d7cc6bb4fac; files: src/gateway/server-methods/nodes.ts, src/infra/node-pairing.ts, src/gateway/server.node-pairing-authz.test.ts)
    • fuller-stack-dev: Recent reapproval diagnostics work touched the gateway nodes method, node-pairing helper, and nodes CLI E2E coverage around stale pairing state. (role: recent node pairing diagnostics contributor; confidence: high; commits: 65b460f2345a; files: src/cli/program.nodes-basic.e2e.test.ts, src/gateway/server-methods/nodes.ts, src/infra/node-pairing.ts)
    How this review workflow works
    • 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.
  6. added
    P2Normal backlog priority with limited blast radius.
    impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    on Jun 18, 2026
  7. added a commit that references this issue on Jun 26, 2026
    deb0ffd
  8. steipete commented on Jun 26, 2026

    @steipete
    Contributor

    Fixed on main by #94452 in deb0ffdcdf92.

    Verification covered stale IDs, approval-time races, unavailable list fallback, remote connection guidance, and 47 focused tests, followed by green exact-head hosted CI.

  9. added a commit that references this issue on Jun 27, 2026
    356ba11
  10. added a commit that references this issue on Jun 27, 2026
    522d53e
  11. added a commit that references this issue on Jun 28, 2026
    2e759db
  12. locked as resolved and limited conversation to collaborators on Jul 15, 2026
  13. added a commit that references this issue on Jul 15, 2026
    45f9429
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.bugSomething isn't workingbug:behaviorIncorrect behavior without a crashclawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions