Repository navigation
fix: chat.send resolves on first terminal output - #75
Merged
Merged
Conversation
The runner process lingers after replying (polling IPC until the idle timeout), and runAgent only settles on exit — so chat.send responses, and therefore MCP messages_send, blocked for up to 30 minutes while the reply sat in the event stream. Resolve on the first terminal output (every ContainerOutput is a completed turn); later outputs still stream as events. Found live: the first real MCP call hung.
This was referenced Jun 11, 2026
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.
Found by the first live MCP call (#73/#74):
messages_senddelegates tochat.send, whose dispatch awaited runAgent — which only settles when the runner process exits (idle timeout, up to 30 min), long after the reply streamed as an event. Same root cause as the #28 spinner. Now resolves on the first terminal output; the process still lingers for follow-up IPC; errors settle it too. Also corrects WS chat.send res timing for request/response clients (openclaw TUI awaits this res). Tests 153/153 (multi-output streaming test updated to the new, semantically-correct timing).