openclaw - 💡(How to fix) Fix [BUG] (feishu) Cannot dispatch messages after upgrade to v2026.5.28 — TypeError: Cannot read properties of undefined (reading 'run')

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

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…

After upgrading from v2026.5.26 to v2026.5.28, the feishu channel (WebSocket mode) receives DM messages successfully but fails to dispatch them to the agent runtime. The same error originally reported in #87646 for v2026.5.27 also reproduces on v2026.5.28.

Rolling back to v2026.5.26 resolves the issue immediately with no config changes.

Error Message

feishu[default]: received message from ou_[redacted] in oc_[redacted] (p2p) feishu[default]: Feishu[default] DM from ou_[redacted]: <message> feishu[default]: dispatching to agent (session=agent:main:feishu:direct:ou_[redacted]) feishu[default]: failed to dispatch message: TypeError: Cannot read properties of undefined (reading 'run')

Root Cause

Root Cause (suspected)

Fix Action

Workaround

Rollback to v2026.5.26:

openclaw gateway stop
npm install -g [email protected]
openclaw gateway install --force
openclaw gateway start

Code Example

openclaw gateway stop
   npm install -g openclaw@2026.5.28
   openclaw gateway install --force
   openclaw gateway start

---

feishu[default]: received message from ou_[redacted] in oc_[redacted] (p2p)
feishu[default]: Feishu[default] DM from ou_[redacted]: <message>
feishu[default]: dispatching to agent (session=agent:main:feishu:direct:ou_[redacted])
feishu[default]: failed to dispatch message: TypeError: Cannot read properties of undefined (reading 'run')

---

feishu[default]: dispatching to agent (session=agent:main:feishu:direct:ou_[redacted])
feishu[default]: dispatched to agent (session=...)

---

openclaw gateway stop
npm install -g openclaw@2026.5.26
openclaw gateway install --force
openclaw gateway start
RAW_BUFFERClick to expand / collapse

[BUG] (feishu) Cannot dispatch messages after upgrade to v2026.5.28 — TypeError: Cannot read properties of undefined (reading 'run')

Summary

After upgrading from v2026.5.26 to v2026.5.28, the feishu channel (WebSocket mode) receives DM messages successfully but fails to dispatch them to the agent runtime. The same error originally reported in #87646 for v2026.5.27 also reproduces on v2026.5.28.

Rolling back to v2026.5.26 resolves the issue immediately with no config changes.

Environment

FieldValue
OpenClawv2026.5.28 (e932160)
OSLinux 7.0.0-15-generic (x64)
Node.jsv22.22.2
Channelfeishu (WebSocket mode)
Gateway modebind=lan
Agent modelMiniMax-M2.7 (thinking=medium)
Pluginsfeishu, memory-lancedb-pro, browser, canvas, device-pair, file-transfer, memory-wiki, minimax, phone-control, talk-voice (10 total)

Steps to Reproduce

  1. Start with v2026.5.26 — feishu DM dispatch works normally
  2. Upgrade to v2026.5.28:
    openclaw gateway stop
    npm install -g [email protected]
    openclaw gateway install --force
    openclaw gateway start
  3. Send a DM to the feishu bot
  4. Inspect Gateway logs (/tmp/openclaw/openclaw-YYYY-MM-DD.log)

Actual Behavior

feishu[default]: received message from ou_[redacted] in oc_[redacted] (p2p)
feishu[default]: Feishu[default] DM from ou_[redacted]: <message>
feishu[default]: dispatching to agent (session=agent:main:feishu:direct:ou_[redacted])
feishu[default]: failed to dispatch message: TypeError: Cannot read properties of undefined (reading 'run')

Expected Behavior

feishu[default]: dispatching to agent (session=agent:main:feishu:direct:ou_[redacted])
feishu[default]: dispatched to agent (session=...)

The message should be forwarded to the agent runtime and a response returned to the user.

Diagnosis

Startup phase — all successful:

  • Gateway loads config and all plugins
  • feishu channel initializes: starting feishu[default] (mode: websocket)
  • WebSocket client starts and connects: WebSocket client started / ws client ready
  • Bot identity resolves (via background retry on slow auth endpoint): bot open_id recovered via background retry: ou_[redacted]
  • Event dispatch reports ready: event-dispatch is ready

Dispatch phase — immediate failure:

  • feishu channel receives the WebSocket event
  • Session key resolved: agent:main:feishu:direct:ou_[redacted]
  • Calls agentRuntime.run() with the session → runtime is undefined

The agent runtime reference held by the feishu channel is either never properly initialized or becomes stale after channel startup completes.

Attempted Fixes (none resolved the issue)

  • Multiple openclaw gateway restart cycles
  • Session cache cleanup: delete .jsonl file and corresponding entry from sessions.json
  • Fresh install: openclaw gateway install --force to regenerate systemd unit

Root Cause (suspected)

This is not a network connectivity issue (the bot connects to the feishu WebSocket, receives events, and the auth endpoint is reachable). It is a regression in the channel-to-agent runtime binding layer introduced in v2026.5.27.

v2026.5.27 changelog includes these hot-path optimizations that may have altered how the feishu channel acquires or retains its agent runtime reference:

  • #86439 — propagate snapshots and eliminate ESM side-effects in auth env vars
  • #87044 — session reads and visible reply optimizations

These changes may have caused the runtime reference held by the feishu channel during initialization to become stale by the time a message arrives, or the session may not be properly bound to the runtime after recovery.

Impact

  • All Gateways using the feishu channel in WebSocket mode
  • Other channels (Telegram, Discord, etc.) not tested but may share the same runtime binding code path
  • Affects v2026.5.27 and v2026.5.28 (confirmed); v2026.5.26 and earlier work normally

Workaround

Rollback to v2026.5.26:

openclaw gateway stop
npm install -g [email protected]
openclaw gateway install --force
openclaw gateway start

Related

  • #87646 (original report, closed)
  • #86439 (suspected cause: auth env var perf changes)
  • #87044 (suspected cause: session read optimizations)

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [BUG] (feishu) Cannot dispatch messages after upgrade to v2026.5.28 — TypeError: Cannot read properties of undefined (reading 'run')