Skip to content

[Bug]:Discord EventQueue timeout (30s) too aggressive for AI responses #27851

Description

@thebotapex-coder

Summary

OpenClaw Discord EventQueue Timeout Bug Report

Issue Summary

Discord listener consistently times out after 30 seconds, causing the bot to stop responding to messages.

Problem Description

The Discord EventQueue has a hardcoded 30-second timeout that is too aggressive for AI responses. When a response takes longer than 30 seconds:

  1. The bot shows "typing" indicator
  2. The request continues processing in the background
  3. The EventQueue times out with: [EventQueue] Listener DiscordMessageListener timed out after 30000ms
  4. The response never reaches Discord
  5. Subsequent messages also fail until gateway restart

Environment

  • OpenClaw Version: 2026.2.25
  • OS: macOS 26.3 (arm64)
  • Node.js: 25.6.1
  • Model: moonshot/kimi-k2.5
  • Discord Channel: Enabled with groupPolicy="open"

Logs Showing the Issue

[EventQueue] Listener DiscordMessageListener timed out after 30000ms for event MESSAGE_CREATE

{"subsystem":"discord/monitor"} Slow listener detected: 224.2 seconds

{"subsystem":"agent/embedded"} embedded run done: durationMs: 222127 aborted=false

Key observations:

  • AI response completed successfully after 222 seconds (3.7 minutes)
  • Discord listener timed out after only 30 seconds
  • Response was never sent to Discord
  • Typing indicator stopped after 2-minute TTL

Impact

  • Discord bot becomes unresponsive until manual or automatic gateway restart
  • Happens multiple times per day
  • Requires constant monitoring or automated restart scripts

Proposed Solutions

  1. Make timeout configurable - Allow users to set discord.eventQueue.timeout in config
  2. Extend default timeout - Increase from 30s to at least 120s for AI workloads
  3. Heartbeat/ping mechanism - Keep listener alive while AI is processing
  4. Send interim message - Post "thinking..." to Discord to reset timeout
  5. Queue responses - If listener times out, queue the response and send when possible

Workaround Currently Used

System cron job every 5 minutes to restart gateway if Discord is unresponsive:

*/5 * * * * /Users/require/.openclaw/scripts/discord-health-check.sh

This is not ideal as it interrupts active conversations.

Additional Context

  • The bot is in a single Discord server (under 100 guilds)
  • Message Content Intent is enabled
  • Issue happens regardless of message complexity
  • Processing completes successfully (as shown in logs), just never delivered

Would love to see a fix for this — it's the biggest stability issue with OpenClaw + Discord right now.

Steps to reproduce

OpenClaw Discord EventQueue Timeout Bug Report

Issue Summary

Discord listener consistently times out after 30 seconds, causing the bot to stop responding to messages.

Problem Description

The Discord EventQueue has a hardcoded 30-second timeout that is too aggressive for AI responses. When a response takes longer than 30 seconds:

  1. The bot shows "typing" indicator
  2. The request continues processing in the background
  3. The EventQueue times out with: [EventQueue] Listener DiscordMessageListener timed out after 30000ms
  4. The response never reaches Discord
  5. Subsequent messages also fail until gateway restart

Environment

  • OpenClaw Version: 2026.2.25
  • OS: macOS 26.3 (arm64)
  • Node.js: 25.6.1
  • Model: moonshot/kimi-k2.5
  • Discord Channel: Enabled with groupPolicy="open"

Logs Showing the Issue

[EventQueue] Listener DiscordMessageListener timed out after 30000ms for event MESSAGE_CREATE

{"subsystem":"discord/monitor"} Slow listener detected: 224.2 seconds

{"subsystem":"agent/embedded"} embedded run done: durationMs: 222127 aborted=false

Key observations:

  • AI response completed successfully after 222 seconds (3.7 minutes)
  • Discord listener timed out after only 30 seconds
  • Response was never sent to Discord
  • Typing indicator stopped after 2-minute TTL

Impact

  • Discord bot becomes unresponsive until manual or automatic gateway restart
  • Happens multiple times per day
  • Requires constant monitoring or automated restart scripts

Proposed Solutions

  1. Make timeout configurable - Allow users to set discord.eventQueue.timeout in config
  2. Extend default timeout - Increase from 30s to at least 120s for AI workloads
  3. Heartbeat/ping mechanism - Keep listener alive while AI is processing
  4. Send interim message - Post "thinking..." to Discord to reset timeout
  5. Queue responses - If listener times out, queue the response and send when possible

Workaround Currently Used

System cron job every 5 minutes to restart gateway if Discord is unresponsive:

*/5 * * * * /Users/require/.openclaw/scripts/discord-health-check.sh

This is not ideal as it interrupts active conversations.

Additional Context

  • The bot is in a single Discord server (under 100 guilds)
  • Message Content Intent is enabled
  • Issue happens regardless of message complexity
  • Processing completes successfully (as shown in logs), just never delivered

Would love to see a fix for this — it's the biggest stability issue with OpenClaw + Discord right now.

Expected behavior

OpenClaw Discord EventQueue Timeout Bug Report

Issue Summary

Discord listener consistently times out after 30 seconds, causing the bot to stop responding to messages.

Problem Description

The Discord EventQueue has a hardcoded 30-second timeout that is too aggressive for AI responses. When a response takes longer than 30 seconds:

  1. The bot shows "typing" indicator
  2. The request continues processing in the background
  3. The EventQueue times out with: [EventQueue] Listener DiscordMessageListener timed out after 30000ms
  4. The response never reaches Discord
  5. Subsequent messages also fail until gateway restart

Environment

  • OpenClaw Version: 2026.2.25
  • OS: macOS 26.3 (arm64)
  • Node.js: 25.6.1
  • Model: moonshot/kimi-k2.5
  • Discord Channel: Enabled with groupPolicy="open"

Logs Showing the Issue

[EventQueue] Listener DiscordMessageListener timed out after 30000ms for event MESSAGE_CREATE

{"subsystem":"discord/monitor"} Slow listener detected: 224.2 seconds

{"subsystem":"agent/embedded"} embedded run done: durationMs: 222127 aborted=false

Key observations:

  • AI response completed successfully after 222 seconds (3.7 minutes)
  • Discord listener timed out after only 30 seconds
  • Response was never sent to Discord
  • Typing indicator stopped after 2-minute TTL

Impact

  • Discord bot becomes unresponsive until manual or automatic gateway restart
  • Happens multiple times per day
  • Requires constant monitoring or automated restart scripts

Proposed Solutions

  1. Make timeout configurable - Allow users to set discord.eventQueue.timeout in config
  2. Extend default timeout - Increase from 30s to at least 120s for AI workloads
  3. Heartbeat/ping mechanism - Keep listener alive while AI is processing
  4. Send interim message - Post "thinking..." to Discord to reset timeout
  5. Queue responses - If listener times out, queue the response and send when possible

Workaround Currently Used

System cron job every 5 minutes to restart gateway if Discord is unresponsive:

*/5 * * * * /Users/require/.openclaw/scripts/discord-health-check.sh

This is not ideal as it interrupts active conversations.

Additional Context

  • The bot is in a single Discord server (under 100 guilds)
  • Message Content Intent is enabled
  • Issue happens regardless of message complexity
  • Processing completes successfully (as shown in logs), just never delivered

Would love to see a fix for this — it's the biggest stability issue with OpenClaw + Discord right now.

Actual behavior

OpenClaw Discord EventQueue Timeout Bug Report

Issue Summary

Discord listener consistently times out after 30 seconds, causing the bot to stop responding to messages.

Problem Description

The Discord EventQueue has a hardcoded 30-second timeout that is too aggressive for AI responses. When a response takes longer than 30 seconds:

  1. The bot shows "typing" indicator
  2. The request continues processing in the background
  3. The EventQueue times out with: [EventQueue] Listener DiscordMessageListener timed out after 30000ms
  4. The response never reaches Discord
  5. Subsequent messages also fail until gateway restart

Environment

  • OpenClaw Version: 2026.2.25
  • OS: macOS 26.3 (arm64)
  • Node.js: 25.6.1
  • Model: moonshot/kimi-k2.5
  • Discord Channel: Enabled with groupPolicy="open"

Logs Showing the Issue

[EventQueue] Listener DiscordMessageListener timed out after 30000ms for event MESSAGE_CREATE

{"subsystem":"discord/monitor"} Slow listener detected: 224.2 seconds

{"subsystem":"agent/embedded"} embedded run done: durationMs: 222127 aborted=false

Key observations:

  • AI response completed successfully after 222 seconds (3.7 minutes)
  • Discord listener timed out after only 30 seconds
  • Response was never sent to Discord
  • Typing indicator stopped after 2-minute TTL

Impact

  • Discord bot becomes unresponsive until manual or automatic gateway restart
  • Happens multiple times per day
  • Requires constant monitoring or automated restart scripts

Proposed Solutions

  1. Make timeout configurable - Allow users to set discord.eventQueue.timeout in config
  2. Extend default timeout - Increase from 30s to at least 120s for AI workloads
  3. Heartbeat/ping mechanism - Keep listener alive while AI is processing
  4. Send interim message - Post "thinking..." to Discord to reset timeout
  5. Queue responses - If listener times out, queue the response and send when possible

Workaround Currently Used

System cron job every 5 minutes to restart gateway if Discord is unresponsive:

*/5 * * * * /Users/require/.openclaw/scripts/discord-health-check.sh

This is not ideal as it interrupts active conversations.

Additional Context

  • The bot is in a single Discord server (under 100 guilds)
  • Message Content Intent is enabled
  • Issue happens regardless of message complexity
  • Processing completes successfully (as shown in logs), just never delivered

Would love to see a fix for this — it's the biggest stability issue with OpenClaw + Discord right now.

OpenClaw version

2026.2.25

Operating system

Macos 26.3

Install method

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleMarked 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