Skip to content

[Bug]: openclaw logs --follow keeps disconnecting, making live log monitoring unusable #74583

Description

@holgergruenhagen

Summary

Hi OpenClaw team 👋

Since one of the last 1-2 updates, openclaw logs --follow no longer works reliably for watching the gateway log over a longer period of time.

It now disconnects repeatedly with a gateway error. Because of that, it is currently not really possible to keep the log open and monitor what is happening live. I have to restart the command again and again.

What happens

When I run:

openclaw logs --follow

it often exits with:

gateway connect failed: Error: gateway closed (1000):
Gateway not reachable. Is it running and accessible?
Gateway target: ws://127.0.0.1:18789
Source: local loopback
Config: /root/.openclaw/openclaw.json
Bind: loopback
Hint: run `openclaw doctor`.

Sometimes before that I also see:

Log tail truncated (increase --max-bytes).

Why this is confusing

Right after openclaw logs --follow says the gateway is not reachable, openclaw gateway status says the gateway is actually running and reachable:

Runtime: running
Connectivity probe: ok
Listening: 127.0.0.1:18789
Capability: admin-capable

So it looks like the gateway itself is still alive, but the logs --follow command loses the connection or gives up too easily.

Expected behavior

openclaw logs --follow should keep running and continue following the log, so it can be used for live monitoring.

If the log grows too quickly or the websocket has a short hiccup, it would be helpful if the command could recover or retry instead of exiting completely.

Actual behavior

openclaw logs --follow exits repeatedly. This makes it impossible to keep the log open for continuous debugging or monitoring.

Environment

  • OpenClaw: 2026.4.26 (be8c246)
  • OS: Ubuntu / Linux
  • Install method: npm
  • Gateway bind: loopback
  • Gateway target: ws://127.0.0.1:18789
  • Gateway port: 18789
  • Service: systemd user service

Additional notes

openclaw version currently cannot be used on this setup because the version CLI plugin is excluded by plugins.allow:

The `openclaw version` command is unavailable because `plugins.allow` excludes "version".

That may be unrelated, but I wanted to include it in case the CLI plugin loading / allowlist behavior is relevant.

Related issues / PRs

This seems related to, but not fully covered by:

Thanks for looking into this 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions