openclaw - 💡(How to fix) Fix [Bug]: Discord event-loop starvation causes 30s+ message latency on 2026.5.22 (macOS Intel, multi-agent setup)

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…

Discord plugin startup starves the Node.js event loop on every gateway restart, causing all Discord channel messages to take 30+ seconds regardless of message complexity or network latency.

Root Cause

Discord plugin startup starves the Node.js event loop on every gateway restart, causing all Discord channel messages to take 30+ seconds regardless of message complexity or network latency.

Code Example

fetch-timeout url=discord.com/api/v10/oauth2/applications/@me timeoutMs=2500 elapsedMs=20915 timerDelayMs=18415 eventLoopDelayHint=timer delayed 18415ms, likely event-loop starvation

fetch-timeout url=discord.com/api/v10/users/@me timeoutMs=10000 elapsedMs=22193 timerDelayMs=12193

provider auth state pre-warmed in 42055ms eventLoopMax=22145.9ms

ping discord.com: 14-23ms, 0% packet loss. curl to same endpoints: instant 200 OK. Network is not the cause.
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Discord plugin startup starves the Node.js event loop on every gateway restart, causing all Discord channel messages to take 30+ seconds regardless of message complexity or network latency.

Steps to reproduce

  1. Configure OpenClaw with Telegram + Discord channels enabled.
  2. Bind 8 agents to 8 separate Discord channels via a single bot account.
  3. Restart the gateway.
  4. Send any message to any Discord channel.
  5. Observe 30+ second delay before agent responds.

Expected behavior

Discord messages should be processed without event-loop blocking. Response time should reflect model latency only, not startup probe delays.

Actual behavior

Every Discord message takes 30+ seconds. Gateway logs show fetch-timeout on discord.com/api/v10/oauth2/applications/@me (elapsedMs=20915, timerDelayMs=18415) and discord.com/api/v10/users/@me (elapsedMs=22193, timerDelayMs=12193). provider auth state pre-warmed in 42055ms, eventLoopMax=22145.9ms. Telegram works correctly when Discord plugin is disabled.

OpenClaw version

2026.5.22 (a374c3a)

Operating system

macOS Sequoia 15.7.4

Install method

npm global

Model

openai/gpt-5.4-mini

Provider / routing chain

openclaw -> openai-codex (OAuth)

Additional provider/model setup details

OpenAI Codex OAuth auth (ChatGPT Plus subscription, no direct OPENAI_API_KEY). 8 Discord agents each bound to their own channel. No external proxy.

Logs, screenshots, and evidence

fetch-timeout url=discord.com/api/v10/oauth2/applications/@me timeoutMs=2500 elapsedMs=20915 timerDelayMs=18415 eventLoopDelayHint=timer delayed 18415ms, likely event-loop starvation

fetch-timeout url=discord.com/api/v10/users/@me timeoutMs=10000 elapsedMs=22193 timerDelayMs=12193

provider auth state pre-warmed in 42055ms eventLoopMax=22145.9ms

ping discord.com: 14-23ms, 0% packet loss. curl to same endpoints: instant 200 OK. Network is not the cause.

Impact and severity

Affected: All Discord channels (8 agents) Severity: High (severely degraded UX, unusable for real-time interaction) Frequency: Always, on every gateway restart Consequence: Every Discord message takes 30+ seconds. Telegram unaffected when Discord plugin disabled.

Additional information

Related closed issues: #75341, #81191, #30006 Related planned fix (not yet shipped): PR #39154 Async inbound worker plan: https://openclaws.io/docs/experiments/plans/discord-async-inbound-worker/ Disabling the Discord plugin restores normal Telegram performance, confirming the Discord plugin is the sole source of event-loop starvation.

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…

FAQ

Expected behavior

Discord messages should be processed without event-loop blocking. Response time should reflect model latency only, not startup probe delays.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING