Bug Report
Environment
- OpenClaw: 2026.5.28
- Node: v24.14.0
- OS: macOS 14.8.5
- Channel: Feishu (websocket mode)
- Session dmScope: tested with both
per-channel-peer and main
Description
Feishu DM messages are received by the channel but fail to dispatch to the agent runner.
Error
Every Feishu direct message triggers:
feishu[default]: received message from ou_xxx (p2p) ✓
feishu[default]: dispatching to agent (session=agent:main:feishu:direct:ou_xxx) ✓
feishu[default]: failed to dispatch message: TypeError: Cannot read properties of undefined (reading 'run')
What works
- Messages sent TO Feishu via cron jobs (isolated agentTurn + delivery.announce) work fine
- WebChat channel works normally
- Feishu channel status: enabled, configured, running
- Feishu WebSocket client starts successfully
What doesn't work
- Any DM sent FROM Feishu to the agent — always fails with the same TypeError
- Happens with both
dmScope=per-channel-peer and dmScope=main
- The feishu:direct session is created but its transcriptPath is empty and channel/lastRoute are null
Attempted fixes (none worked)
- Deleting and recreating the feishu:direct session from sessions.json
- Switching dmScope between per-channel-peer and main
- Adding model fallbacks (deepseek -> minimax)
- Full gateway restart multiple times
Key log pattern (repeated every DM attempt)
feishu[default]: received message from ou_xxx in oc_xxx (p2p)
feishu[default]: Feishu[default] DM from ou_xxx: {message content}
feishu[default]: dispatching to agent (session=agent:main:feishu:direct:ou_xxx)
feishu[default]: failed to dispatch message: TypeError: Cannot read properties of undefined (reading 'run')
Additional observations
The session entry in sessions.json shows:
- sessionId: generated UUID (valid)
- transcriptPath: (empty string)
- channel: null
- lastRoute: null
This suggests the session object is created but the runner instance is not properly initialized. Agent runner property run is undefined at dispatch time.
Bug Report
Environment
per-channel-peerandmainDescription
Feishu DM messages are received by the channel but fail to dispatch to the agent runner.
Error
Every Feishu direct message triggers:
What works
What doesn't work
dmScope=per-channel-peeranddmScope=mainAttempted fixes (none worked)
Key log pattern (repeated every DM attempt)
Additional observations
The session entry in sessions.json shows:
This suggests the session object is created but the runner instance is not properly initialized. Agent runner property
runis undefined at dispatch time.