Skip to content

Gateway token mismatch unauthorized error even when auth/remote tokens match #27246

@wcx0209

Description

@wcx0209

I’m seeing repeated unauthorized errors when running local cron commands (for example openclaw cron list --json), even after setting matching tokens in config.

Observed error

  • unauthorized: gateway token mismatch
  • Message suggests setting gateway.remote.token to match gateway.auth.token

Config state

In ~/.openclaw/openclaw.json, both values are identical:

  • gateway.auth.token = "4426"
  • gateway.remote.token = "4426"

Despite this, runtime still intermittently behaves as if an old token is in use.

Repro steps

  1. Configure gateway token auth.
  2. Ensure gateway.auth.token and gateway.remote.token are the same.
  3. Run openclaw cron list --json.
  4. Receive unauthorized token mismatch.

Expected

Local loopback gateway should accept cron command when tokens match in config.

Actual

Unauthorized token mismatch can persist until repeated restart/reconfigure cycles.

Notes

This looks like a config/runtime token desync (possibly stale process/session state after token changes).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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