Skip to content

Discord WebSocket drops every ~15 minutes with code 1006, resume fails with 1005 #39288

Description

@p19dixon

Bug Report

OpenClaw version: 2026.3.2
OS: macOS 26.2 (arm64)
Gateway mode: local, loopback (127.0.0.1:18789)

Description

The Discord provider WebSocket connection drops every ~15 minutes throughout the day. After each drop, it attempts a resume with 1000ms backoff but the resume consistently fails with code 1005.

The only fix is a manual gateway restart, which restores connectivity temporarily before the cycle repeats.

Log Pattern (repeating all day)

[2026-03-07T08:00:06] discord gateway: WebSocket connection closed with code 1006
[2026-03-07T08:00:06] discord gateway: Attempting resume with backoff: 1000ms after code 1006
[2026-03-07T08:00:13] discord gateway: WebSocket connection closed with code 1005
[2026-03-07T08:16:20] discord gateway: WebSocket connection closed with code 1006
[2026-03-07T08:16:20] discord gateway: Attempting resume with backoff: 1000ms after code 1006
[2026-03-07T08:16:27] discord gateway: WebSocket connection closed with code 1005

This repeats every 13–17 minutes continuously. openclaw status reports Discord as OK even while the connection is in a broken state.

Steps to Reproduce

  1. Run OpenClaw gateway with Discord channel configured
  2. Leave running for 15+ minutes
  3. Observe Discord WebSocket drop/resume failure cycle in logs

Expected Behavior

Discord WebSocket should maintain a stable connection or successfully resume after drops without requiring a full gateway restart.

Workaround

Manual openclaw gateway restart restores connectivity temporarily.

Notes

  • Telegram channel is unaffected and stable
  • This pattern started appearing consistently from 2026-03-06 onwards
  • Gateway is bound to loopback; outbound Discord connections should not be affected by this

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions