Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
After upgrading OpenClaw from 2026.3.x to 2026.5.4, the @tencent-weixin/openclaw-weixin plugin (v2.4.1) fails to start with Weixin runtime initialization timeout and enters an auto-restart crash loop (10 attempts). The root cause is that api.runtime is now undefined in the plugin register() callback, so setWeixinRuntime() is never called.
Steps to reproduce
- Install OpenClaw 2026.5.4 (
pnpm on Linux)
- Install
@tencent-weixin/openclaw-weixin v2.4.1 via openclaw plugins install
- Configure and enable the WeChat channel
- Run
openclaw gateway restart
- Observe the gateway logs showing repeated
Weixin runtime initialization timeout errors
Expected behavior
The WeChat plugin should start successfully, connect to https://ilinkai.weixin.qq.com, and begin long-polling for messages. This worked correctly on OpenClaw 2026.3.x with the same plugin version 2.4.1.
Actual behavior
The plugin enters a crash loop:
[starting weixin provider (https://ilinkai.weixin.qq.com)]
[waiting for Weixin runtime...]
[waitForWeixinRuntime() failed: Error: Weixin runtime initialization timeout]
[channel exited: Weixin runtime initialization timeout]
[auto-restart attempt N/10 in Xs]
Also observed during login attempt:
Failed to start login: TypeError: fetch failed
Channel login failed: Error: Failed to start login: TypeError: fetch failed
Network connectivity to ilinkai.weixin.qq.com is confirmed working (curl and Node.js fetch from CLI both succeed).
Root cause analysis
In the plugin entry point (index.js):
register(api) {
assertHostCompatibility(api.runtime?.version);
if (api.runtime) { // ← api.runtime is undefined in 2026.5.4
setWeixinRuntime(api.runtime); // ← never called
}
api.registerChannel({ plugin: weixinPlugin });
}
The monitor then calls waitForWeixinRuntime() which polls for the global pluginRuntime variable — but since setWeixinRuntime() was never called, it always times out after 10 seconds.
In 2026.3.x, api.runtime was populated during register(). In 2026.5.4, it appears to be undefined — likely a breaking change in the plugin SDK.
OpenClaw version
2026.5.4 (325df3e)
Operating system
Linux 6.17.0-22-generic (x64), Node.js v24.15.0
Install method
pnpm (global)
Model
N/A (channel-level issue, not model-specific)
Provider / routing chain
N/A (WeChat channel plugin, not model routing)
Logs, screenshots, and evidence
Gateway log excerpt (repeated ~6 times before giving up):
2026-05-05T17:06:28.465+08:00 [openclaw-weixin] [04ec3e0661b8-im-bot] starting weixin provider (https://ilinkai.weixin.qq.com)
2026-05-05T17:06:28.816+08:00 [openclaw-weixin] [04ec3e0661b8-im-bot] notifyStart failed during startup (ignored): TypeError: fetch failed
2026-05-05T17:06:38.479+08:00 [openclaw-weixin] [04ec3e0661b8-im-bot] channel exited: Weixin runtime initialization timeout
2026-05-05T17:06:38.483+08:00 [openclaw-weixin] [04ec3e0661b8-im-bot] auto-restart attempt 1/10 in 5s
openclaw status --deep output shows channel state as ON | OK despite the crash loop, which may also be worth investigating.
Impact and severity
Affected: All users of @tencent-weixin/openclaw-weixin plugin on OpenClaw 2026.5.4
Severity: High — WeChat channel is completely non-functional, cannot send or receive messages
Frequency: 100% reproducible (every startup attempt fails)
Consequence: WeChat bot is offline; users relying on WeChat channel for communication are affected
Additional information
- Last known good version: OpenClaw 2026.3.x (exact version varied, plugin 2.4.1 worked)
- First known bad version: OpenClaw 2026.5.4
- Plugin version:
@tencent-weixin/openclaw-weixin v2.4.1 (latest on npm)
- The
compatibility table in the plugin README lists >=2026.3.22 as compatible, but 2026.5.4 appears to have a breaking change in the plugin SDK that was not accounted for
- This may also affect other channel plugins that rely on
api.runtime in their register() callback
Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
After upgrading OpenClaw from 2026.3.x to 2026.5.4, the
@tencent-weixin/openclaw-weixinplugin (v2.4.1) fails to start withWeixin runtime initialization timeoutand enters an auto-restart crash loop (10 attempts). The root cause is thatapi.runtimeis nowundefinedin the pluginregister()callback, sosetWeixinRuntime()is never called.Steps to reproduce
pnpmon Linux)@tencent-weixin/openclaw-weixinv2.4.1 viaopenclaw plugins installopenclaw gateway restartWeixin runtime initialization timeouterrorsExpected behavior
The WeChat plugin should start successfully, connect to
https://ilinkai.weixin.qq.com, and begin long-polling for messages. This worked correctly on OpenClaw 2026.3.x with the same plugin version 2.4.1.Actual behavior
The plugin enters a crash loop:
Also observed during login attempt:
Network connectivity to
ilinkai.weixin.qq.comis confirmed working (curl and Node.js fetch from CLI both succeed).Root cause analysis
In the plugin entry point (
index.js):The monitor then calls
waitForWeixinRuntime()which polls for the globalpluginRuntimevariable — but sincesetWeixinRuntime()was never called, it always times out after 10 seconds.In 2026.3.x,
api.runtimewas populated duringregister(). In 2026.5.4, it appears to beundefined— likely a breaking change in the plugin SDK.OpenClaw version
2026.5.4 (325df3e)
Operating system
Linux 6.17.0-22-generic (x64), Node.js v24.15.0
Install method
pnpm (global)
Model
N/A (channel-level issue, not model-specific)
Provider / routing chain
N/A (WeChat channel plugin, not model routing)
Logs, screenshots, and evidence
Gateway log excerpt (repeated ~6 times before giving up):
openclaw status --deepoutput shows channel state asON | OKdespite the crash loop, which may also be worth investigating.Impact and severity
Affected: All users of
@tencent-weixin/openclaw-weixinplugin on OpenClaw 2026.5.4Severity: High — WeChat channel is completely non-functional, cannot send or receive messages
Frequency: 100% reproducible (every startup attempt fails)
Consequence: WeChat bot is offline; users relying on WeChat channel for communication are affected
Additional information
@tencent-weixin/openclaw-weixinv2.4.1 (latest on npm)compatibilitytable in the plugin README lists>=2026.3.22as compatible, but 2026.5.4 appears to have a breaking change in the plugin SDK that was not accounted forapi.runtimein theirregister()callback