fix(cli): stop message send from hanging forever after delivery (#16460)#16491
Merged
gumadeiras merged 3 commits intoopenclaw:mainfrom Feb 14, 2026
Merged
fix(cli): stop message send from hanging forever after delivery (#16460)#16491gumadeiras merged 3 commits intoopenclaw:mainfrom
gumadeiras merged 3 commits intoopenclaw:mainfrom
Conversation
de3dc81 to
fdcb1d4
Compare
fdcb1d4 to
78dffc9
Compare
Member
|
Merged via squash. Thanks @yinghaosang! |
akoscz
pushed a commit
to akoscz/openclaw
that referenced
this pull request
Feb 15, 2026
…claw#16460) (openclaw#16491) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 78dffc9 Co-authored-by: yinghaosang <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
GwonHyeok
pushed a commit
to learners-superpumped/openclaw
that referenced
this pull request
Feb 15, 2026
…claw#16460) (openclaw#16491) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 78dffc9 Co-authored-by: yinghaosang <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
vincentkoc
pushed a commit
to vincentkoc/openclaw
that referenced
this pull request
Feb 15, 2026
…claw#16460) (openclaw#16491) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 78dffc9 Co-authored-by: yinghaosang <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
…claw#16460) (openclaw#16491) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 78dffc9 Co-authored-by: yinghaosang <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
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
openclaw message senddelivers the message fine but the process never exits — the plugin registry loads a Discord client with an open WebSocket, and nothing tears it down or callsexit()afterward. Scripts usingexecSynchit their timeout and retry, causing duplicate messages.Closes #16460
lobster-biscuit
Root Cause
runMessageActioninhelpers.tscallsensurePluginRegistryLoaded()which opens persistent connections (Discord WebSocket, etc.), then awaitsrunCommandWithRuntime. On success,runCommandWithRuntimejust returns — noprocess.exit(). The error path already callsexit(1), but the happy path was missing.Changes
defaultRuntime.exit(0)fires right after the action completes, same pattern as the error handlerOne line added in
src/cli/program/message/helpers.ts.Tests
src/cli/program/message/helpers.test.ts— 4 tests covering exit(0) on success, exit(1) on failure, no exit(0) on error path, and correctaccount→accountIdmapping. All fail before fix, pass after.pnpm build && pnpm checkpass (pre-existing format/TS issues in unrelated files)Greptile Overview
Greptile Summary
Added
defaultRuntime.exit(0)after successful message send to properly terminate the CLI process. Previously, the process would hang indefinitely after message delivery because the plugin registry loads persistent connections (Discord WebSocket, etc.) that keep the event loop alive.openclaw message sendcompletes successfullyexit(1); success path was missingexit(0)Confidence Score: 5/5
Last reviewed commit: de3dc81