Problem
The Discord message processing pipeline has a hard 30-second timeout inherited from Carbon's EventQueue.processListener(). When an LLM call (especially with thinking=high or extended reasoning) takes longer than 30 seconds, the listener is killed via Promise.race, which can cause cascading failures in the event queue.
Root Cause
OpenClaw creates the Carbon Client without passing eventQueue options:
const client = new Client({
baseUrl: "http://localhost",
deploySecret: "a",
clientId: applicationId,
publicKey: "a",
token,
autoDeploy: false
// ← no eventQueue config
}, ...);
Carbon's EventQueue then defaults to listenerTimeout: 30000 (30s):
// @buape/carbon EventQueue.js
this.options = {
listenerTimeout: options.listenerTimeout ?? 30000,
// ...
};
This means any Discord message handler that exceeds 30 seconds is forcibly rejected, even though the underlying Carbon ClientOptions.eventQueue interface already supports configuring this value.
Impact
- Agents using
thinking=high or complex tool chains frequently exceed 30 seconds
- The timeout kills the listener mid-execution → event queue stalls → cascading failures
- Telegram channel is unaffected (Grammy runner has no equivalent hard timeout on message processing), so this is a Discord-specific limitation
Proposed Solution
Expose eventQueue options (at minimum listenerTimeout) in OpenClaw's Discord channel configuration, e.g.:
And pass it through to the Carbon Client constructor:
const client = new Client({
// ...existing options
eventQueue: discordCfg.eventQueue ?? undefined
}, ...);
Workaround
Currently the only workaround is monkey-patching node_modules/@buape/carbon/dist/src/internals/EventQueue.js directly, which gets overwritten on every openclaw update.
Environment
- OpenClaw: latest (installed via Homebrew)
- macOS (Apple Silicon)
- Carbon:
@buape/carbon (bundled with OpenClaw)
Problem
The Discord message processing pipeline has a hard 30-second timeout inherited from Carbon's
EventQueue.processListener(). When an LLM call (especially withthinking=highor extended reasoning) takes longer than 30 seconds, the listener is killed viaPromise.race, which can cause cascading failures in the event queue.Root Cause
OpenClaw creates the Carbon
Clientwithout passingeventQueueoptions:Carbon's
EventQueuethen defaults tolistenerTimeout: 30000(30s):This means any Discord message handler that exceeds 30 seconds is forcibly rejected, even though the underlying Carbon
ClientOptions.eventQueueinterface already supports configuring this value.Impact
thinking=highor complex tool chains frequently exceed 30 secondsProposed Solution
Expose
eventQueueoptions (at minimumlistenerTimeout) in OpenClaw's Discord channel configuration, e.g.:And pass it through to the Carbon Client constructor:
Workaround
Currently the only workaround is monkey-patching
node_modules/@buape/carbon/dist/src/internals/EventQueue.jsdirectly, which gets overwritten on everyopenclaw update.Environment
@buape/carbon(bundled with OpenClaw)