Skip to content

Gateway token from local config overrides gatewayToken param in cron wake tool #15718

@0xPotatoofdoom

Description

@0xPotatoofdoom

Bug

When using the cron wake tool (or other gateway-targeting tools) with explicit gatewayUrl and gatewayToken parameters to target a remote gateway, the local gateway's token from ~/.openclaw/openclaw.json is sent instead of the provided gatewayToken.

Reproduction

  1. Local gateway has token 52e886... in config
  2. Remote gateway (e.g. ws://100.70.68.20:18789) has token 10821f...
  3. Call: cron(action='wake', text='...', mode='now', gatewayUrl='ws://100.70.68.20:18789', gatewayToken='10821f...')
  4. Remote gateway rejects with: gateway closed (1008): unauthorized: gateway token mismatch

Expected

The explicitly provided gatewayToken parameter should be used for authentication with the remote gateway, overriding any local config token.

Actual

The local config token is sent instead, causing auth failure on the remote gateway.

Context

This affects fleet management where a hub bot (Leo) needs to wake remote bots via their gateways. sessions_send works correctly with the token param, but cron wake does not.

Environment

  • OpenClaw 2026.2.12 (f9e444d)
  • macOS arm64, Node v24.5.0
  • Local gateway bound to loopback, remotes on Tailscale

Workaround

SSH into remote machine and run commands locally, or use sessions_send (which correctly respects the token param) as primary dispatch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleMarked as stale due to inactivity

    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