Skip to content

Missing deviceToken #81

@andyeskridge

Description

@andyeskridge

Apologies for creating a PR before creating an issue. This issue is resolved by #80. I was getting everything working on my machine and ended up with code changes that got everything working before I put up an issue.

Summary

After approving a Windows WS node, the gateway accepts the node connection and the node works normally, but hello-ok does not include auth.deviceToken.

This appears inconsistent with the documented pairing/token flow, where an approved device is expected to receive a device token in the handshake response so the client can persist it locally.

Expected behavior

After a previously unpaired device is approved, the next successful connect / hello-ok response should include:

auth.deviceToken

so the client can store the device token for future reconnects.

Actual behavior

After approval:

  • the node reconnects successfully
  • hello-ok is returned
  • node commands work normally
  • but auth.deviceToken is absent

This leaves the client without a local persisted device token even though the gateway considers the node approved and connected.

Evidence

With the current tray build, the gateway returns hello-ok and the node reaches Connected, but the tray still marks the node as pending approval only because no local deviceToken is present:

[2026-03-20 12:50:51.839] [DEBUG] [NODE RX] {"type":"res","id":"b36136ab-3f27-43a5-b3b6-3a88d39a2a29","ok":true,"payload":{"type":"hello-ok", ... }}
[2026-03-20 12:50:51.840] [INFO] Node registered successfully! ID: 52be65c247513a6a
[2026-03-20 12:50:51.841] [INFO] Not yet paired - check 'openclaw devices list' for pending approval
[2026-03-20 12:50:51.841] [INFO] To approve, run: openclaw devices approve 52be65c247513a6a1f173f6538534971e531fa10bad593648a8192b2dcd736d0
[2026-03-20 12:50:51.842] [INFO] Pairing status changed: Pending (device: 52be65c247513a6a...)
[2026-03-20 12:50:51.842] [INFO] Pairing status: Pending
[2026-03-20 12:50:51.842] [INFO] [ActivityStream] Item added: [node] Node pairing pending
[2026-03-20 12:50:51.870] [INFO] Node status changed: Connected
[2026-03-20 12:50:51.870] [INFO] Node status: Connected
[2026-03-20 12:50:51.871] [INFO] [ActivityStream] Item added: [node] Node mode Connected

This is the incorrect behavior:

  • the gateway accepted the connection
  • the node became connected
  • but the tray still treated the node as pending approval

Local device state still has no stored token:

{
  "DeviceToken": null
}

File:
C:\Users\andye\AppData\Local\OpenClawTray\device-key-ed25519.json

Why this matters

This creates ambiguity for node clients:

  • the gateway treats the device as approved and usable
  • the client never receives a durable device token
  • clients that assume deviceToken is required for pairing state end up in a false broken/unknown state

In our testing, node functionality still works after approval, including node requests such as system.notify, so this looks like either:

  • the docs are stale and deviceToken is now optional for approved WS node flows, or
  • the gateway is no longer returning a token that it still nominally promises to clients

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions