openclaw - 💡(How to fix) Fix Gateway pairing scope deadlock: CLI cannot approve/reject auto-reissued over-scoped repair requests [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#74484Fetched 2026-04-30 06:23:37
View on GitHub
Comments
2
Participants
2
Timeline
2
Reactions
2
Timeline (top)
commented ×2

The OpenClaw CLI is in a scope deadlock: the current paired CLI has only operator.read, the gateway keeps auto-reissuing a pending repair request for the full default operator bundle, and device.pair.approve / device.pair.reject both require scope the CLI does not have. There is no other paired device with admin-level scope available as a bootstrap path.

Error Message

  • openclaw devices reject <id> itself fails with the same pairing required error, because device.pair.reject requires operator.pairing scope per the gateway method-scope map.

Root Cause

  • Current paired CLI device is valid with scope operator.read only.
  • A pending repair request keeps appearing for the same CLI device, asking for the full default operator bundle: operator.admin, operator.read, operator.write, operator.approvals, operator.pairing, operator.talk.secrets.
  • The pending request auto-reissues every few minutes (TTL ≈ 5 min based on PENDING_TTL_MS), so request IDs rotate.
  • Any gateway control-plane call above operator.read fails with gateway closed (1008): pairing required. This includes cron management and ACP / sub-agent spawn.
  • openclaw devices reject <id> itself fails with the same pairing required error, because device.pair.reject requires operator.pairing scope per the gateway method-scope map.
RAW_BUFFERClick to expand / collapse

Summary

The OpenClaw CLI is in a scope deadlock: the current paired CLI has only operator.read, the gateway keeps auto-reissuing a pending repair request for the full default operator bundle, and device.pair.approve / device.pair.reject both require scope the CLI does not have. There is no other paired device with admin-level scope available as a bootstrap path.

Environment

  • Platform: darwin
  • Client: cli (mode probe for paired entry, mode cli for pending request)
  • Gateway: ws://127.0.0.1:18789, loopback bind
  • Config: /Users/<redacted>/.openclaw/openclaw.json

What happened

  • Current paired CLI device is valid with scope operator.read only.
  • A pending repair request keeps appearing for the same CLI device, asking for the full default operator bundle: operator.admin, operator.read, operator.write, operator.approvals, operator.pairing, operator.talk.secrets.
  • The pending request auto-reissues every few minutes (TTL ≈ 5 min based on PENDING_TTL_MS), so request IDs rotate.
  • Any gateway control-plane call above operator.read fails with gateway closed (1008): pairing required. This includes cron management and ACP / sub-agent spawn.
  • openclaw devices reject <id> itself fails with the same pairing required error, because device.pair.reject requires operator.pairing scope per the gateway method-scope map.

What I expected

One of:

  • A way to reject or downgrade the repair request from the current paired CLI without already having operator.pairing.
  • A supported bootstrap flow to request only the minimal scopes actually needed (e.g. operator.read + operator.admin for cron).
  • A documented recovery path for this situation that does not require the very scope needed to approve or reject the repair.

What I verified

  • Current paired CLI has only operator.read (confirmed in openclaw devices list --json and locally in ~/.openclaw/devices/paired.json).
  • Pending request asks for the full bundle (confirmed in openclaw devices list --json and in ~/.openclaw/devices/pending.json).
  • No other paired devices with admin-level scope exist.
  • I did not edit local JSON manually to avoid corrupting paired state.
  • I did not restart the gateway, since the deadlock is at the scope layer, not at the gateway lifecycle.

What is blocked

  • cron management through the gateway.
  • ACP / sub-agent spawn through the gateway.
  • Any other gateway control-plane action requiring scope above operator.read.

Likely root cause (from reading the codebase)

The CLI default scope set appears to be hardcoded as CLI_DEFAULT_OPERATOR_SCOPES = [admin, read, write, approvals, pairing, talk.secrets]. Combined with the fact that approve/reject themselves require operator.pairing, a CLI that ends up in operator.read cannot self-service its way out without an external bootstrap path.

Questions

  1. Is there a supported way to create a minimal-scope CLI repair / pairing request (for example only operator.read + operator.admin)?
  2. If not, what is the intended bootstrap or recovery flow for a CLI stuck at operator.read with an auto-reissued over-scoped repair request?
  3. Is there a way to override CLI_DEFAULT_OPERATOR_SCOPES in config for repair requests?

I can provide full CLI outputs and local JSON dumps on request, with secrets / device IDs redacted.

Thanks.

extent analysis

TL;DR

The most likely fix involves finding an external bootstrap path to obtain the required operator.pairing scope or modifying the gateway's behavior to allow for a minimal-scope repair request.

Guidance

  • Investigate if there's a configuration option or a command-line flag to override CLI_DEFAULT_OPERATOR_SCOPES for repair requests, which could potentially allow for a minimal-scope pairing.
  • Check the gateway's documentation and codebase for any supported bootstrap or recovery flows that don't require the operator.pairing scope to approve or reject repair requests.
  • Consider reaching out to the OpenClaw developers or community for guidance on how to handle this scope deadlock situation, as it may be a known issue or a use case they can provide specific advice on.
  • Review the openclaw.json configuration file for any settings that might influence the scope of repair requests or the pairing process.

Notes

The provided information suggests a design or configuration issue rather than a straightforward bug, making it challenging to provide a simple fix without deeper knowledge of the OpenClaw system's intended behavior and configuration options.

Recommendation

Apply a workaround by seeking an external bootstrap path or modifying the gateway's configuration, if possible, to temporarily bypass the scope requirement for approving or rejecting the repair request, as there's no clear indication of an available fix through version upgrades.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Gateway pairing scope deadlock: CLI cannot approve/reject auto-reissued over-scoped repair requests [2 comments, 2 participants]