openclaw - 💡(How to fix) Fix [Bug] Feishu WebSocket closes after each message in v2026.3.13 [2 comments, 3 participants]

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…
GitHub stats
openclaw/openclaw#49323Fetched 2026-04-08 00:56:29
View on GitHub
Comments
2
Participants
3
Timeline
2
Reactions
0
Timeline (top)
commented ×2

After upgrading from OpenClaw v2026.3.8 to v2026.3.13, the Feishu WebSocket connection is closed (force) after receiving each message. After the first message, subsequent messages are not received until gateway restart.

Root Cause

After upgrading from OpenClaw v2026.3.8 to v2026.3.13, the Feishu WebSocket connection is closed (force) after receiving each message. After the first message, subsequent messages are not received until gateway restart.

Fix Action

Workaround

Downgrade to OpenClaw v2026.3.8:

npm install -g [email protected]
launchctl kickstart -k gui/$(id -u)/ai.openclaw.gateway

Code Example

08:28:54.700 [feishu] message om_x100b54ab52af58a0c454347f471b5f0 in chat oc_xxx — immediate
08:28:54.736 [info]: [ '[ws]', 'ws client closed manually (force)' ]
08:28:55.136 [feishu] received message from ou_xxx in oc_xxx (p2p)
08:28:55.153 [feishu] dispatching to agent (session=agent:main:main)

---

npm install -g openclaw@2026.3.8
launchctl kickstart -k gui/$(id -u)/ai.openclaw.gateway
RAW_BUFFERClick to expand / collapse

Summary

After upgrading from OpenClaw v2026.3.8 to v2026.3.13, the Feishu WebSocket connection is closed (force) after receiving each message. After the first message, subsequent messages are not received until gateway restart.

Environment

  • OpenClaw Version: v2026.3.13 (regression from v2026.3.8)
  • OS: macOS (Darwin 25.3.0 arm64)
  • Node: v24.13.0
  • Channel: Feishu (WebSocket mode)
  • openclaw-lark version: 2026.3.17

Steps to Reproduce

  1. Install OpenClaw v2026.3.13
  2. Configure Feishu channel with WebSocket mode
  3. Start gateway
  4. Send message 1 to bot in Feishu → ✅ Received
  5. Send message 2 to bot in Feishu → ❌ NOT received
  6. Restart gateway
  7. Send message 3 → ✅ Received (but only this one)

Expected Behavior

All messages should be received continuously without requiring gateway restart between messages.

Actual Behavior

Only the first message after gateway restart is received. The WebSocket connection is closed after each message:

08:28:54.700 [feishu] message om_x100b54ab52af58a0c454347f471b5f0 in chat oc_xxx — immediate
08:28:54.736 [info]: [ '[ws]', 'ws client closed manually (force)' ]
08:28:55.136 [feishu] received message from ou_xxx in oc_xxx (p2p)
08:28:55.153 [feishu] dispatching to agent (session=agent:main:main)

After WebSocket closes and reconnects, subsequent messages are not received.

Verification

Downgraded to v2026.3.8 and the issue does NOT occur - no "ws client closed manually (force)" log, and multiple messages are received correctly.

Regression Info

VersionFeishu WebSocket Behavior
v2026.3.8✅ Works correctly
v2026.3.13❌ Closes after each message

Workaround

Downgrade to OpenClaw v2026.3.8:

npm install -g [email protected]
launchctl kickstart -k gui/$(id -u)/ai.openclaw.gateway

Reporter

  • User: Roven
  • Report Date: 2026-03-18

extent analysis

Fix Plan

To resolve the issue of the Feishu WebSocket connection closing after each message in OpenClaw v2026.3.13, we need to modify the WebSocket handling logic.

  1. Update WebSocket Connection Handling:
    • Ensure that the WebSocket connection remains open after receiving a message.
    • Modify the onMessage event handler to not close the connection.

Example code snippet (assuming a Node.js environment):

// Assuming 'ws' is your WebSocket object
ws.on('message', (message) => {
  // Process the message
  console.log(`Received message: ${message}`);
  
  // Do not close the connection here
  // ws.close(); // Comment out or remove this line if present
});
  1. Implement Reconnection Logic:
    • If the connection is closed unexpectedly, implement a reconnection mechanism.
    • Use ws.on('close', ...) and ws.on('error', ...) to detect closure and errors, and attempt to reconnect.

Example code snippet:

let reconnectTimeout = 1000; // 1 second

ws.on('close', () => {
  console.log('WebSocket connection closed. Reconnecting...');
  setTimeout(() => {
    // Reconnect logic here
    // For example, call a function that establishes a new WebSocket connection
    establishWebSocketConnection();
  }, reconnectTimeout);
});

ws.on('error', (error) => {
  console.error('WebSocket error:', error);
  // Optionally, attempt to reconnect here as well
});
  1. Review OpenClaw Configuration:
    • Check the OpenClaw configuration for any settings related to WebSocket connections that might be causing the issue.
    • Adjust these settings as necessary to ensure continuous message reception.

Verification

To verify that the fix worked:

  • Send multiple messages to the bot in Feishu.
  • Check the logs for any "ws client closed manually (force)" messages.
  • Ensure that all messages are received correctly without needing to restart the gateway.

Extra Tips

  • Regularly review updates to OpenClaw and its dependencies for any changes that might affect WebSocket connection handling.
  • Consider implementing additional logging to monitor WebSocket connection states and message reception for easier debugging.

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