Repository navigation
fix: cap Discord gateway reconnect at 50 attempts to prevent infinite loop - #12230
Merged
thewilloftheshadow merged 2 commits intoFeb 10, 2026
Merged
thewilloftheshadow merged 2 commits into
thewilloftheshadow merged 2 commits into
Conversation
The Discord GatewayPlugin was configured with maxAttempts: Infinity, which causes an unbounded reconnection loop when the Discord gateway enters a persistent failure state (e.g. code 1005 with stalled HELLO). In production, this manifested as 2,483+ reconnection attempts in a single log file, starving the Node.js event loop and preventing cron, heartbeat, and other subsystems from functioning. Cap maxAttempts at 50, which provides ~25 minutes of retry time (with 30s HELLO timeout between attempts) before cleanly exiting via the existing "Max reconnect attempts" error handler. Closes openclaw#11836 Co-Authored-By: Claude Opus 4.6 <[email protected]>
thewilloftheshadow
force-pushed
the
fix/discord-reconnect-max-attempts
branch
from
February 10, 2026 02:36
dc32c70 to
3bebc3f
Compare
Member
lucasmpramos
pushed a commit
to butley/openclaw
that referenced
this pull request
Feb 10, 2026
… loop (openclaw#12230) * fix: cap Discord gateway reconnect attempts to prevent infinite loop The Discord GatewayPlugin was configured with maxAttempts: Infinity, which causes an unbounded reconnection loop when the Discord gateway enters a persistent failure state (e.g. code 1005 with stalled HELLO). In production, this manifested as 2,483+ reconnection attempts in a single log file, starving the Node.js event loop and preventing cron, heartbeat, and other subsystems from functioning. Cap maxAttempts at 50, which provides ~25 minutes of retry time (with 30s HELLO timeout between attempts) before cleanly exiting via the existing "Max reconnect attempts" error handler. Closes openclaw#11836 Co-Authored-By: Claude Opus 4.6 <[email protected]> * Changelog: note Discord gateway reconnect cap (openclaw#12230) (thanks @Yida-Dev) --------- Co-authored-by: Yida-Dev <[email protected]> Co-authored-by: Claude Opus 4.6 <[email protected]> Co-authored-by: Shadow <[email protected]>
ProgramCaiCai
pushed a commit
to ProgramCaiCai/openclaw
that referenced
this pull request
Feb 10, 2026
… loop (openclaw#12230) * fix: cap Discord gateway reconnect attempts to prevent infinite loop The Discord GatewayPlugin was configured with maxAttempts: Infinity, which causes an unbounded reconnection loop when the Discord gateway enters a persistent failure state (e.g. code 1005 with stalled HELLO). In production, this manifested as 2,483+ reconnection attempts in a single log file, starving the Node.js event loop and preventing cron, heartbeat, and other subsystems from functioning. Cap maxAttempts at 50, which provides ~25 minutes of retry time (with 30s HELLO timeout between attempts) before cleanly exiting via the existing "Max reconnect attempts" error handler. Closes openclaw#11836 Co-Authored-By: Claude Opus 4.6 <[email protected]> * Changelog: note Discord gateway reconnect cap (openclaw#12230) (thanks @Yida-Dev) --------- Co-authored-by: Yida-Dev <[email protected]> Co-authored-by: Claude Opus 4.6 <[email protected]> Co-authored-by: Shadow <[email protected]>
skyhawk14
pushed a commit
to skyhawk14/openclaw
that referenced
this pull request
Feb 13, 2026
… loop (openclaw#12230) * fix: cap Discord gateway reconnect attempts to prevent infinite loop The Discord GatewayPlugin was configured with maxAttempts: Infinity, which causes an unbounded reconnection loop when the Discord gateway enters a persistent failure state (e.g. code 1005 with stalled HELLO). In production, this manifested as 2,483+ reconnection attempts in a single log file, starving the Node.js event loop and preventing cron, heartbeat, and other subsystems from functioning. Cap maxAttempts at 50, which provides ~25 minutes of retry time (with 30s HELLO timeout between attempts) before cleanly exiting via the existing "Max reconnect attempts" error handler. Closes openclaw#11836 Co-Authored-By: Claude Opus 4.6 <[email protected]> * Changelog: note Discord gateway reconnect cap (openclaw#12230) (thanks @Yida-Dev) --------- Co-authored-by: Yida-Dev <[email protected]> Co-authored-by: Claude Opus 4.6 <[email protected]> Co-authored-by: Shadow <[email protected]>
john-ver
pushed a commit
to apmcoin/apmclaw
that referenced
this pull request
Mar 9, 2026
dustin-olenslager
pushed a commit
to dustin-olenslager/ironclaw-supreme
that referenced
this pull request
Mar 24, 2026
lovewanwan
pushed a commit
to lovewanwan/openclaw
that referenced
this pull request
Apr 28, 2026
… loop (openclaw#12230) * fix: cap Discord gateway reconnect attempts to prevent infinite loop The Discord GatewayPlugin was configured with maxAttempts: Infinity, which causes an unbounded reconnection loop when the Discord gateway enters a persistent failure state (e.g. code 1005 with stalled HELLO). In production, this manifested as 2,483+ reconnection attempts in a single log file, starving the Node.js event loop and preventing cron, heartbeat, and other subsystems from functioning. Cap maxAttempts at 50, which provides ~25 minutes of retry time (with 30s HELLO timeout between attempts) before cleanly exiting via the existing "Max reconnect attempts" error handler. Closes openclaw#11836 Co-Authored-By: Claude Opus 4.6 <[email protected]> * Changelog: note Discord gateway reconnect cap (openclaw#12230) (thanks @Yida-Dev) --------- Co-authored-by: Yida-Dev <[email protected]> Co-authored-by: Claude Opus 4.6 <[email protected]> Co-authored-by: Shadow <[email protected]>
ogt-redknie
pushed a commit
to ogt-redknie/OPENX
that referenced
this pull request
May 2, 2026
… loop (openclaw#12230) * fix: cap Discord gateway reconnect attempts to prevent infinite loop The Discord GatewayPlugin was configured with maxAttempts: Infinity, which causes an unbounded reconnection loop when the Discord gateway enters a persistent failure state (e.g. code 1005 with stalled HELLO). In production, this manifested as 2,483+ reconnection attempts in a single log file, starving the Node.js event loop and preventing cron, heartbeat, and other subsystems from functioning. Cap maxAttempts at 50, which provides ~25 minutes of retry time (with 30s HELLO timeout between attempts) before cleanly exiting via the existing "Max reconnect attempts" error handler. Closes openclaw#11836 Co-Authored-By: Claude Opus 4.6 <[email protected]> * Changelog: note Discord gateway reconnect cap (openclaw#12230) (thanks @Yida-Dev) --------- Co-authored-by: Yida-Dev <[email protected]> Co-authored-by: Claude Opus 4.6 <[email protected]> Co-authored-by: Shadow <[email protected]>
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 9, 2026
… loop (openclaw#12230) * fix: cap Discord gateway reconnect attempts to prevent infinite loop The Discord GatewayPlugin was configured with maxAttempts: Infinity, which causes an unbounded reconnection loop when the Discord gateway enters a persistent failure state (e.g. code 1005 with stalled HELLO). In production, this manifested as 2,483+ reconnection attempts in a single log file, starving the Node.js event loop and preventing cron, heartbeat, and other subsystems from functioning. Cap maxAttempts at 50, which provides ~25 minutes of retry time (with 30s HELLO timeout between attempts) before cleanly exiting via the existing "Max reconnect attempts" error handler. Closes openclaw#11836 Co-Authored-By: Claude Opus 4.6 <[email protected]> * Changelog: note Discord gateway reconnect cap (openclaw#12230) (thanks @Yida-Dev) --------- Co-authored-by: Yida-Dev <[email protected]> Co-authored-by: Claude Opus 4.6 <[email protected]> Co-authored-by: Shadow <[email protected]>
jameslcowan
pushed a commit
to jameslcowan/openclaw
that referenced
this pull request
Jun 2, 2026
This was referenced Aug 12, 2026
lhfer
pushed a commit
to lhfer/openclaw
that referenced
this pull request
Oct 11, 2026
… loop (openclaw#12230) * fix: cap Discord gateway reconnect attempts to prevent infinite loop The Discord GatewayPlugin was configured with maxAttempts: Infinity, which causes an unbounded reconnection loop when the Discord gateway enters a persistent failure state (e.g. code 1005 with stalled HELLO). In production, this manifested as 2,483+ reconnection attempts in a single log file, starving the Node.js event loop and preventing cron, heartbeat, and other subsystems from functioning. Cap maxAttempts at 50, which provides ~25 minutes of retry time (with 30s HELLO timeout between attempts) before cleanly exiting via the existing "Max reconnect attempts" error handler. Closes openclaw#11836 Co-Authored-By: Claude Opus 4.6 <[email protected]> * Changelog: note Discord gateway reconnect cap (openclaw#12230) (thanks @Yida-Dev) --------- Co-authored-by: Yida-Dev <[email protected]> Co-authored-by: Claude Opus 4.6 <[email protected]> Co-authored-by: Shadow <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GatewayPluginwas configured withmaxAttempts: Number.POSITIVE_INFINITY, allowing unbounded reconnection loopsmaxAttemptsfromInfinityto50, providing ~25 minutes of retry time before cleanly exiting via the existingshouldStopOnErrorhandler that checks for "Max reconnect attempts"Test plan
shouldStopOnErrorhandler (line 659) already handles the "Max reconnect attempts" error message that Carbon emits when the limit is reachedCloses #11836
Co-Authored-By: Claude Opus 4.6 [email protected]
Greptile Overview
Greptile Summary
This change updates the Discord
GatewayPluginreconnect configuration insrc/discord/monitor/provider.tsby cappingreconnect.maxAttemptsfromNumber.POSITIVE_INFINITYto50. The intent is to prevent unbounded reconnect loops when the Discord gateway is in a persistent failure/zombie state, letting the existingshouldStopOnErrorhandler (which stops on the "Max reconnect attempts" error message) terminate the monitor cleanly after a finite retry window.Confidence Score: 5/5