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
- Local gateway has token
52e886... in config
- Remote gateway (e.g.
ws://100.70.68.20:18789) has token 10821f...
- Call:
cron(action='wake', text='...', mode='now', gatewayUrl='ws://100.70.68.20:18789', gatewayToken='10821f...')
- 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.
Bug
When using the
cron waketool (or other gateway-targeting tools) with explicitgatewayUrlandgatewayTokenparameters to target a remote gateway, the local gateway's token from~/.openclaw/openclaw.jsonis sent instead of the providedgatewayToken.Reproduction
52e886...in configws://100.70.68.20:18789) has token10821f...cron(action='wake', text='...', mode='now', gatewayUrl='ws://100.70.68.20:18789', gatewayToken='10821f...')gateway closed (1008): unauthorized: gateway token mismatchExpected
The explicitly provided
gatewayTokenparameter 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_sendworks correctly with the token param, butcron wakedoes not.Environment
Workaround
SSH into remote machine and run commands locally, or use
sessions_send(which correctly respects the token param) as primary dispatch.