openclaw - 💡(How to fix) Fix [Regression 2026.5.20] Discord typing indicator severely delayed (20-30s) — session write lock contention

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…

Fix Action

Fix / Workaround

After 2026.5.20:

  • Ack reaction emojis (👀) arrive promptly
  • Warning emoji (⚠️) often appears due to slow pre-dispatch processing
  • "Bot is typing..." indicator only appears after 20-30 seconds
  • Actual LLM response time is normal once typing starts

The session write lock introduced in #84289 appears to serialize Discord message processing, creating a bottleneck. The lock acquisition and transcript mirror writes block the event loop, delaying the typing indicator (which signals model dispatch) far beyond acceptable thresholds.

Code Example

liveness warning: reasons=event_loop_delay,cpu
eventLoopDelayP99Ms=4362.1
eventLoopDelayMaxMs=13396.6
eventLoopUtilization=0.885
cpuCoreRatio=0.919

---

sidecars.session-locks:1715ms
work=[active=agent:main:discord:channel:885761219150086156(
  processing/embedded_run,
  q=1,
  age=27s,
  last=embedded_run:started
)]

---

workspace bootstrap file TOOLS.md is 13510 chars (limit 12000)
workspace bootstrap file MEMORY.md is 18142 chars (limit 12000)
RAW_BUFFERClick to expand / collapse

Bug Description

After upgrading from 2026.4.23 to 2026.5.20, Discord message handling has become significantly slower. The delay is not due to LLM inference — the issue occurs before the model is even reached.

Before 2026.5.20: Typing indicator appeared on Discord immediately after sending a message.

After 2026.5.20:

  • Ack reaction emojis (👀) arrive promptly
  • Warning emoji (⚠️) often appears due to slow pre-dispatch processing
  • "Bot is typing..." indicator only appears after 20-30 seconds
  • Actual LLM response time is normal once typing starts

Regression Source

Suspected commit from 2026.5.20 changelog:

"Agents/messages: stop message-tool-only turns after a successful source-channel message send while keeping transcript mirrors under the session write lock" (#84289)

Log Evidence

Event loop starvation:

liveness warning: reasons=event_loop_delay,cpu
eventLoopDelayP99Ms=4362.1
eventLoopDelayMaxMs=13396.6
eventLoopUtilization=0.885
cpuCoreRatio=0.919

Session lock contention:

sidecars.session-locks:1715ms
work=[active=agent:main:discord:channel:885761219150086156(
  processing/embedded_run,
  q=1,
  age=27s,
  last=embedded_run:started
)]

Large workspace bootstrap being truncated (injected under lock):

workspace bootstrap file TOOLS.md is 13510 chars (limit 12000)
workspace bootstrap file MEMORY.md is 18142 chars (limit 12000)

Environment

  • OpenClaw: 2026.5.20 (e510042)
  • Node.js: v25.4.0
  • OS: Linux 6.17.0-1012-aws (x64)

Steps to Reproduce

  1. Run OpenClaw 2026.5.20 with Discord channel configured
  2. Send a message to the bot in a Discord guild channel
  3. Observe: ack reactions arrive quickly, but typing indicator is delayed by 20-30s
  4. Check gateway logs: eventLoopDelayMaxMs spikes to 10s+, session work queue builds up

Expected Behavior

Typing indicator should appear within 1-2 seconds of message receipt, as it did in 2026.4.23.

Actual Behavior

Typing indicator delayed by 20-30 seconds due to event loop starvation and session write lock contention.

Additional Context

The session write lock introduced in #84289 appears to serialize Discord message processing, creating a bottleneck. The lock acquisition and transcript mirror writes block the event loop, delaying the typing indicator (which signals model dispatch) far beyond acceptable thresholds.

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

openclaw - 💡(How to fix) Fix [Regression 2026.5.20] Discord typing indicator severely delayed (20-30s) — session write lock contention