Skip to content

Agents periodically stop responding — EventQueue listener timeouts during heavy session I/O #29107

Description

@petersykim

Summary

Agents occasionally stop responding to messages entirely. During these episodes, the gateway error log shows repeated EventQueue listener timed out after 30000ms for both MESSAGE_CREATE and INTERACTION_CREATE events. The typing indicator also hits its 2-minute TTL and stops. Recovery is eventually automatic (a few minutes), or a gateway restart clears it faster.

Observed Pattern

  • Agent goes silent — stops responding to all incoming messages
  • Switching models during the episode doesn't help
  • Gateway error log: [EventQueue] Listener DiscordMessageListener timed out after 30000ms for event MESSAGE_CREATE
  • Typing TTL log: typing TTL reached (2m); stopping typing indicator
  • Typically resolves on its own after a few minutes, or immediately after openclaw gateway restart
  • Often coincides with large session files being processed (e.g. a 20MB .reset file being handled during compaction)

Likely Cause

Session compaction/archiving appears to involve synchronous file I/O (readFileSync, renameSync) on large files, which can block the Node.js event loop long enough for the 30-second EventQueue listener timeout to fire. Once the event loop catches up, the agent recovers.

Suggested Fix

Moving session compaction and large file operations to a worker thread (or using async streaming reads) would keep the event loop free during heavy I/O, preventing the timeout cascade.

Workaround

openclaw gateway restart immediately unblocks the agent. Otherwise it recovers on its own once the blocking I/O completes.

Environment

  • OpenClaw: 2026.2.26
  • macOS 26.2 (arm64)

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