openclaw - 💡(How to fix) Fix Bug: openclaw gateway call times out for plugin gateway methods even when the method executes successfully [1 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#59470Fetched 2026-04-08 02:25:26
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants

In the currently installed OpenClaw build, plugin gateway methods can execute successfully, complete their real work, and still cause openclaw gateway call to fail with:

Gateway call failed: Error: gateway timeout after 10000ms

I reproduced this with a small isolated plugin, first on a Discord component send method and then on a lightweight status/log-reader method.

Error Message

Gateway call failed: Error: gateway timeout after 10000ms

Root Cause

This makes plugin gateway methods unreliable as an operational surface even when their underlying work succeeds, because operators cannot trust the CLI return status.

Fix Action

Workaround

A plugin can log side effects/results to a file, but that is only a workaround and not a substitute for a reliable gateway call response.

Code Example

Gateway call failed: Error: gateway timeout after 10000ms

---

openclaw gateway call discord-component-poc.send --params '{"text":"Gateway-owned Discord component PoC test after timeout fix.","allowedUsers":["560583965988225046"]}'

---

Gateway call failed: Error: gateway timeout after 10000ms
Gateway target: ws://127.0.0.1:18789
Source: local loopback
Config: /home/agent/.openclaw/openclaw.json
Bind: lan

---

{"ts":"2026-04-02T05:25:26.697Z","event":"dispatch.started","dispatchId":"1a92251c-ba73-4dff-a6c5-8d07132a40c0","to":"channel:1488981466003279982"}
{"ts":"2026-04-02T05:25:26.958Z","event":"dispatch.sent","dispatchId":"1a92251c-ba73-4dff-a6c5-8d07132a40c0","to":"channel:1488981466003279982","messageId":"1489133641438199858","channelId":"1488981466003279982"}

---

openclaw gateway call discord-component-poc.status --params '{"limit":10}'

---

Gateway call failed: Error: gateway timeout after 10000ms
Gateway target: ws://127.0.0.1:18789
Source: local loopback
Config: /home/agent/.openclaw/openclaw.json
Bind: lan
RAW_BUFFERClick to expand / collapse

Bug: openclaw gateway call times out for plugin gateway methods even when the method executes successfully

Summary

In the currently installed OpenClaw build, plugin gateway methods can execute successfully, complete their real work, and still cause openclaw gateway call to fail with:

Gateway call failed: Error: gateway timeout after 10000ms

I reproduced this with a small isolated plugin, first on a Discord component send method and then on a lightweight status/log-reader method.

Why this seems like a core/runtime issue

The issue is not limited to Discord delivery itself:

  • discord-component-poc.send timed out at the CLI level, but the Discord message was actually sent successfully and the interactive callback path worked live.
  • discord-component-poc.status also timed out, even though it only reads a local log file and returns recent entries.

That suggests the remaining problem is in the gateway-method RPC return/ack path for plugin methods in this build, not in the Discord sender path.

Environment

  • Installed build root:
    • /home/agent/.nvm/versions/node/v22.22.2/lib/node_modules/openclaw/dist
  • Config:
    • /home/agent/.openclaw/openclaw.json
  • Gateway target in error output:
    • ws://127.0.0.1:18789
  • Gateway bind:
    • lan
  • Plugin under test:
    • /home/agent/.openclaw/workspace/plugins/discord-component-poc

Reproduction

Method 1: Discord send method

Command:

openclaw gateway call discord-component-poc.send --params '{"text":"Gateway-owned Discord component PoC test after timeout fix.","allowedUsers":["560583965988225046"]}'

CLI result:

Gateway call failed: Error: gateway timeout after 10000ms
Gateway target: ws://127.0.0.1:18789
Source: local loopback
Config: /home/agent/.openclaw/openclaw.json
Bind: lan

But the plugin log shows the work completed successfully:

{"ts":"2026-04-02T05:25:26.697Z","event":"dispatch.started","dispatchId":"1a92251c-ba73-4dff-a6c5-8d07132a40c0","to":"channel:1488981466003279982"}
{"ts":"2026-04-02T05:25:26.958Z","event":"dispatch.sent","dispatchId":"1a92251c-ba73-4dff-a6c5-8d07132a40c0","to":"channel:1488981466003279982","messageId":"1489133641438199858","channelId":"1488981466003279982"}

Also, the live button callback path was verified via callback data poc:ack.

Method 2: Lightweight status method

Command:

openclaw gateway call discord-component-poc.status --params '{"limit":10}'

CLI result:

Gateway call failed: Error: gateway timeout after 10000ms
Gateway target: ws://127.0.0.1:18789
Source: local loopback
Config: /home/agent/.openclaw/openclaw.json
Bind: lan

This second method was intended only to read and return recent log entries, so it helps rule out Discord-send latency as the core cause.

Expected behavior

When a plugin gateway method executes and returns normally, openclaw gateway call should return the method result rather than timing out after 10 seconds.

Actual behavior

The plugin method appears to run, but the CLI call still times out waiting for the response.

Extra notes

During investigation, I confirmed locally that registerGatewayMethod in the installed build is just storing the handler in the registry:

  • loader-BrGpIitI.js:374
  • loader-BrGpIitI.js:857
  • loader-BrGpIitI.js:1006

So the likely issue seems to be in invocation/response handling rather than registration itself.

Impact

This makes plugin gateway methods unreliable as an operational surface even when their underlying work succeeds, because operators cannot trust the CLI return status.

Workaround

A plugin can log side effects/results to a file, but that is only a workaround and not a substitute for a reliable gateway call response.

extent analysis

TL;DR

Investigate and fix the invocation/response handling in the OpenClaw gateway to prevent timeouts when plugin methods execute successfully.

Guidance

  • Review the registerGatewayMethod function in the installed build to ensure it is correctly storing the handler in the registry and check for any potential issues in the invocation/response handling.
  • Verify that the plugin method is correctly returning a response and that the response is being properly handled by the OpenClaw gateway.
  • Check the OpenClaw gateway configuration to ensure that the timeout value is set to a reasonable amount of time for the plugin methods to complete.
  • Consider adding logging or debugging statements to the plugin method and the OpenClaw gateway to help identify where the issue is occurring.

Example

No code example is provided as the issue is more related to the configuration and invocation/response handling of the OpenClaw gateway.

Notes

The issue seems to be related to the invocation/response handling in the OpenClaw gateway, rather than the plugin method itself. The fact that the plugin method is executing successfully and the work is being completed, but the CLI call is still timing out, suggests that there is an issue with the way the response is being handled.

Recommendation

Apply a workaround by increasing the timeout value in the OpenClaw gateway configuration or by implementing a custom logging mechanism for plugin methods, until the root cause of the issue is identified and fixed.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

When a plugin gateway method executes and returns normally, openclaw gateway call should return the method result rather than timing out after 10 seconds.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING