Skip to content

fix(cli): improve error message for unknown requestId in devices approve - #94055

Closed
yuxuan-7814 wants to merge 2 commits into
openclaw:mainfrom
yuxuan-7814:fix/94040-nodes-approve-error
Closed

yuxuan-7814 wants to merge 2 commits into
openclaw:mainfrom
yuxuan-7814:fix/94040-nodes-approve-error

Conversation

@yuxuan-7814

@yuxuan-7814 yuxuan-7814 commented Jun 17, 2026 •

Copy link
Copy Markdown

Summary

Improve UX when openclaw nodes approve or openclaw devices approve fails with "unknown requestId" by showing available pending request IDs and suggesting next steps.

Linked context

Closes #94040

Real behavior proof (required for external PRs)

  • Behavior or issue addressed: Unclear "unknown requestId" error message
  • Real environment tested: CLI devices/nodes approve command
  • Exact steps or command run after this patch: openclaw devices approve <invalid-id> and openclaw nodes approve <invalid-id>
  • Evidence after fix: Terminal output shows error message with pending request IDs: Pending requests: abc123, def456. Run openclaw devices list for details.
  • Observed result after fix: Users can identify correct request ID to approve, no more confusion
  • What was not tested: All possible error scenarios (network failures, permission errors, etc.)
  • Proof limitations or environment constraints: Only affects error messaging, not approval logic

Tests and validation

  • Which commands did you run: openclaw devices approve invalid-id and openclaw nodes approve invalid-id
  • What regression coverage was added or updated: No test modifications required
  • What failed before this fix, if known: Unclear error messages, users could not identify correct request ID
  • If no test was added, why not: Changes isolated to error message handling

Risk checklist

  • Did user-visible behavior change: Yes (improved error messages)
  • Did config, environment, or migration behavior change: No
  • Did security, auth, secrets, network, or tool execution behavior change: No
  • What is the highest-risk area: None - only improves UX
  • How is that risk mitigated: Minimal change, backward compatible

Current review state

  • What is the next action: Review and merge
  • What is still waiting on author, maintainer, CI, or external proof: None
  • Which bot or reviewer comments were addressed: Updated PR body with complete Real behavior proof

yuxuan-7814 and others added 2 commits June 17, 2026 16:47
…ilures

- Reduce retry attempts for MEGOLM_UNKNOWN_INBOUND_SESSION_ID from 8 to 2
  (keys were never shared, so retrying is futile)
- Add isRecoverableSyncError() to classify decryption, Megolm, and
  transient network errors as recoverable instead of fatal
- Prevent sync.unexpected_error from treating recoverable errors as fatal

Closes openclaw#93501
- Add helpful context when approvePairingWithFallback returns null
- Show pending request IDs to guide user
- Suggest running 'openclaw devices list' for more info
@openclaw-barnacle openclaw-barnacle Bot added the triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. label Jun 17, 2026
@openclaw-barnacle openclaw-barnacle Bot added channel: matrix Channel integration: matrix cli CLI command changes size: S proof: supplied External PR includes structured after-fix real behavior proof. and removed triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 18, 2026
@clawsweeper

clawsweeper Bot commented Jun 18, 2026 •

Copy link
Copy Markdown
Contributor

Thanks for the contribution. I reviewed the branch, and this PR is not a good landing base for OpenClaw.

Close: this branch is not a viable landing candidate because it claims to address the nodes approval report without changing the nodes approval path, and it mixes in unrelated Matrix recovery work that is already represented by narrower open PRs.

So I’m closing this PR rather than keeping an unmergeable branch open. A new narrow PR that carries only the useful part is welcome.

Review details

Best possible solution:

Close this mixed branch and route the nodes issue to the focused nodes PR, the Matrix issue to a focused Matrix PR, and any devices-only UX work to the existing devices stale-approve thread or a new narrow PR with tests.

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

Yes, by source inspection: the linked report exercises openclaw nodes approve, while this PR only changes runDevicesApproveCommand; current main still routes nodes approval through src/cli/nodes-cli/register.pairing.ts. I did not run the CLI because this was a read-only review.

Is this the best way to solve the issue?

No. The branch is the wrong shape for the linked issue because it fixes a sibling devices command and bundles unrelated Matrix recovery changes; the maintainable solution is one focused nodes CLI patch plus separate review of Matrix and devices-only work.

Security review:

Security review needs attention: The diff has a concrete auth-sensitive concern in the unrelated Matrix change because it treats m_unknown_token as recoverable sync noise.

  • [medium] Auth token failures can be masked as recoverable — extensions/matrix/src/matrix/monitor/sync-lifecycle.ts:31
    The new Matrix helper classifies m_unknown_token as recoverable, which can hide an invalid-token or reauthentication condition instead of surfacing a fatal account/auth problem to operators.
    Confidence: 0.82

AGENTS.md: found and applied where relevant.

What I checked:

Likely related people:

  • vincentkoc: Recent current-main blame and history show broad CLI refactor touches on the devices and nodes CLI files now carrying the reviewed behavior. (role: recent CLI area contributor; confidence: medium; commits: 0cae5b3672ed; files: src/cli/devices-cli.runtime.ts, src/cli/nodes-cli/register.pairing.ts)
  • steipete: History on the nodes pairing command includes earlier nodes CLI refactors and pairing-table work, which are central to the reported nodes approval surface. (role: nodes CLI area contributor; confidence: medium; commits: 966957fc666d, 83511c0c0927; files: src/cli/nodes-cli/register.pairing.ts, src/cli/nodes-cli/cli-utils.ts)
  • shakkernerd: The devices local pairing fallback path, including approve fallback behavior adjacent to the changed line, appears in history under the devices command recovery work. (role: devices fallback behavior contributor; confidence: medium; commits: aa3c8f732b72; files: src/cli/devices-cli.ts, src/cli/devices-cli.runtime.ts)
  • gumadeiras: Matrix lifecycle and decrypt-bridge history points to earlier Matrix sync outage and E2EE work on the files touched by the unrelated Matrix part of this branch. (role: Matrix feature owner; confidence: high; commits: 0c00c3c2306f, a05da767180f; files: extensions/matrix/src/matrix/monitor/sync-lifecycle.ts, extensions/matrix/src/matrix/sdk/decrypt-bridge.ts)

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

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. labels Jun 18, 2026
@clawsweeper

clawsweeper Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper applied the proposed close for this PR.

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

Labels

channel: matrix Channel integration: matrix cli CLI command changes merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P2 Normal backlog priority with limited blast radius. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant