openclaw - ✅(Solved) Fix [Bug]: openclaw devices/* and gateway RPC fail locally with pairing/operator scope mismatch on healthy loopback gateway (2026.3.13) [1 pull requests, 1 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#51516Fetched 2026-04-08 01:10:10
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×2commented ×1cross-referenced ×1

Fix Action

Fix / Workaround

  • OpenClaw version: 2026.3.13
  • Install method: global npm
  • OS: Ubuntu 24.04.4 LTS
  • Node: 24.14.0
  • Gateway mode: local
  • Gateway bind: loopback
  • Gateway URL: ws://127.0.0.1:18789
  • Service manager: systemd user service
  • Control UI workaround currently enabled:
    • gateway.controlUi.dangerouslyDisableDeviceAuth=true

PR fix notes

PR #51801: fix(cli): use local device pairing fallback for loopback closures

Description (problem / solution / changelog)

Summary

  • broaden loopback device-pairing fallback to also cover pairing-related loopback closures that arrive without an explicit close reason
  • let devices clear --pending use the same local pairing fallback path instead of failing outright
  • add regression coverage for list/approve/clear on local loopback gateways

Testing

  • src/cli/devices-cli.test.ts

Fixes #51516

Changed files

  • skills/coding-agent/SKILL.md (modified, +157/-164)
  • src/cli/devices-cli.test.ts (modified, +524/-18)
  • src/cli/devices-cli.ts (modified, +153/-15)
  • src/infra/device-auth-store.ts (modified, +6/-0)
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Summary

Environment

  • OpenClaw version: 2026.3.13
  • Install method: global npm
  • OS: Ubuntu 24.04.4 LTS
  • Node: 24.14.0
  • Gateway mode: local
  • Gateway bind: loopback
  • Gateway URL: ws://127.0.0.1:18789
  • Service manager: systemd user service
  • Control UI workaround currently enabled:
    • gateway.controlUi.dangerouslyDisableDeviceAuth=true

Symptoms

The gateway service is running and listening correctly on loopback, but local operator/device RPC paths are broken.

openclaw status reports:

  • unreachable (missing scope: operator.read)

openclaw gateway status reports:

  • pairing required

openclaw devices list fails with:

  • gateway closed (1000 normal closure): no close reason

openclaw devices approve --latest fails the same way.

openclaw devices clear --yes --pending also fails the same way.

Important detail

This does not look like a gateway startup or port-binding failure.

The gateway is alive:

  • service is running
  • port 127.0.0.1:18789 is listening
  • runtime state is active/running

The failure appears to be specifically in the local operator/device auth flow.

Current observed behavior

  • openclaw status -> missing scope: operator.read
  • openclaw gateway status -> runtime healthy, but RPC probe fails with pairing required
  • openclaw devices list -> close code 1000 normal closure
  • logs sometimes show:
    • pairing required
    • reason: not-paired
    • pending request id exists
  • but list/approve/clear device commands still cannot complete

What was tried

  • Updated OpenClaw to latest published npm version:
    • sudo npm i -g openclaw@latest
  • Ran:
    • openclaw doctor --fix
  • Reinstalled gateway service metadata:
    • openclaw gateway install --force
    • openclaw gateway restart
  • Removed unrelated extra service (email-alerts) from user systemd units
  • Verified only one process is listening on port 18789
  • Tried approving explicit request ID from logs
  • Tried:
    • openclaw devices clear --yes --pending
  • Manually reset local device/auth state:
    • removed ~/.openclaw/devices/paired.json
    • removed ~/.openclaw/devices/pending.json
    • removed ~/.openclaw/identity/device.json
    • removed ~/.openclaw/identity/device-auth.json
    • restarted gateway
  • Reverted VM back to pre-debug snapshot and reproduced the same issue again

Result

Even after reverting to snapshot / clean known-good state:

  • openclaw status still shows missing scope: operator.read
  • openclaw gateway status still shows pairing required
  • openclaw devices * commands still fail locally

Why this looks like a bug

  • loopback gateway is healthy
  • service is running
  • device/pairing request may appear to exist
  • but the local CLI cannot complete device management operations
  • issue survives manual state reset and also survives reverting to an earlier VM snapshot

This strongly suggests an internal auth/pairing mismatch or regression in local operator/device RPC handling on 2026.3.13.

Extra possibly relevant detail

A separate old service (openclaw-mission-control.service, currently inactive) previously logged gateway failures using:

  • Source: env OPENCLAW_GATEWAY_URL
  • Gateway target: http://127.0.0.1:18789

If relevant, that may indicate additional confusion between HTTP and WS gateway URL handling in some clients, although the main CLI issue reproduces even without that service running.

Local debugging notes

There is also a local summary file with previous investigation context:

  • ~/.openclaw/workspace/openclaw-device-auth-bug-2026-03-19.md

Steps to reproduce

  • OpenClaw version: 2026.3.13
  • Install method: global npm
  • OS: Ubuntu 24.04.4 LTS
  • Node: 24.14.0 Installing by npm or by script - the same result Proxmox virtualization

Expected behavior

NOT_ENOUGH_INFO

Actual behavior

NOT_ENOUGH_INFO

OpenClaw version

2026.3.13

Operating system

Ubuntu 24.04.4 LTS

Install method

npm global

Model

openai/gpt-5.4

Provider / routing chain

openclaw -> nginx_reverse_proxy

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

Fix Plan

To resolve the local operator/device auth flow issue, follow these steps:

  1. Disable the control UI workaround:

    • Set gateway.controlUi.dangerouslyDisableDeviceAuth to false in your configuration.
    • This will ensure that device authentication is properly enforced.
  2. Reset local device/auth state:

    • Remove the following files:
      • ~/.openclaw/devices/paired.json
      • ~/.openclaw/devices/pending.json
      • ~/.openclaw/identity/device.json
      • ~/.openclaw/identity/device-auth.json
    • Restart the gateway service.
  3. Verify gateway URL:

    • Ensure that the gateway URL is correctly set to use the WebSocket protocol (ws://).
    • Update any scripts or services using the HTTP protocol (http://) to use the WebSocket protocol instead.
  4. Update OpenClaw configuration:

    • Review the OpenClaw configuration for any incorrect or missing settings.
    • Update the configuration to ensure that the operator.read scope is properly configured.

Example configuration update:

// Update the OpenClaw configuration to include the operator.read scope
const openclawConfig = {
  // ... existing configuration ...
  scopes: ['operator.read'],
};

// Save the updated configuration

Verification

To verify that the fix worked:

  1. Run openclaw status to check if the missing scope: operator.read error is resolved.
  2. Run openclaw gateway status to check if the pairing required error is resolved.
  3. Run openclaw devices list to check if the device management operations are working correctly.

Extra Tips

  • Ensure that the OpenClaw version is up-to-date, as newer versions may include bug fixes for authentication issues.
  • Review the OpenClaw documentation for any specific configuration requirements for the operator.read scope.
  • If issues persist, try resetting the OpenClaw configuration to its default state and reconfiguring the settings.

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…

FAQ

Expected behavior

NOT_ENOUGH_INFO

Still need to ship something?

×6

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

Back to top recommendations

TRENDING