openclaw - 💡(How to fix) Fix 【BUG】(feishu): cannot dispatch messages after v2026.5.27 upgrade — TypeError: read property 'run' of undefined

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…

After upgrading from v2026.5.26 to v2026.5.27, the feishu channel fails to dispatch incoming direct messages. The bot connects and receives messages normally, but fails to dispatch them to the agent runtime. Rolling back to v2026.5.26 resolves the issue immediately without any config changes.

Error Message

[feishu] feishu[default]: received message from ou_62a... in oc_0... (p2p)
[feishu] feishu[default]: Feishu[default] DM from ou_62a...: <message>
[feishu] feishu[default]: dispatching to agent (session=agent:main:feishu:direct:ou_62a...)
[feishu] 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.27
   openclaw gateway install --force
   openclaw gateway start

---

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

---

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

Bug: feishu channel cannot dispatch messages after v2026.5.27 upgrade — TypeError: Cannot read properties of undefined (reading 'run')

Summary

After upgrading from v2026.5.26 to v2026.5.27, the feishu channel fails to dispatch incoming direct messages. The bot connects and receives messages normally, but fails to dispatch them to the agent runtime. Rolling back to v2026.5.26 resolves the issue immediately without any config changes.

Environment

FieldValue
OpenClawv2026.5.27 (27ae826)
OSLinux 7.0.0-15-generic (x64)
Node.jsv22.22.2 / v24.15.0 (observed on both)
Channelfeishu (WebSocket mode)
Gateway modebind=lan
Agent runtimeMiniMax-M2.7 (thinking=medium)
Pluginsfeishu, memory-lancedb-pro, browser, canvas, etc. (10 plugins)

Steps to Reproduce

  1. Start with v2026.5.26 — feishu DM dispatch works normally
  2. Upgrade:
    openclaw gateway stop
    npm install -g [email protected]
    openclaw gateway install --force
    openclaw gateway start
  3. Send a DM to the feishu bot
  4. Check Gateway logs — dispatch failure is visible

Logs

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

Diagnosis

Everything works during startup:

  • Gateway loads config
  • feishu channel initializes: starting feishu[default] (mode: websocket)
  • Bot identity resolves: bot open_id resolved: ou_...
  • WebSocket connects: WebSocket client started
  • Event dispatch ready: event-dispatch is ready

Immediate failure when a message arrives:

  • feishu channel receives the WebSocket message
  • Resolves session key: agent:main:feishu:direct:ou_...
  • Attempts to get agent runtime and call .run()
  • Runtime object or .run() method is undefined

Attempted fixes (none worked):

  1. openclaw gateway restart — unchanged
  2. Delete session entry from sessions.json + delete .jsonl file — fresh session fails with same error
  3. Multiple restart cycles — issue is consistently reproducible

Root Cause (suspected)

This is a regression in the feishu channel to agent runtime binding layer introduced in v2026.5.27.

v2026.5.27 changelog mentions these hot-path optimizations:

  • [#86439] Propagate snapshots and eliminate ESM side-effects in auth env vars
  • [#87044] Session reads and visible reply optimizations

These changes may have affected how the feishu channel acquires its agent runtime reference, causing .run() to be unavailable when messages arrive. Specifically, the runtime reference held by the feishu channel during initialization may become stale before messages arrive, or the session may not be properly bound to the runtime after recovery.

Impact

  • All gateways using the feishu channel (single and multi-instance)
  • Other channels (Telegram, Discord, etc.) not tested but may be affected
  • Only affects v2026.5.27; 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 PRs

  • #86439 — propagate snapshots and eliminate esm side-effects in auth env vars
  • #87044 — session reads and visible reply 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