Fix Linear agent hanging on follow-up messages after task completion #10439
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.
Fixes ROO-365: Linear agent hangs when follow-up message is sent after task completion.
Problem
When a Linear agent completes a task with
attempt_completion, it shows acompletion_resultask and waits for user response. During this waiting period, if Linear sends follow-up messages via theSendMessageIPC command, these messages get queued but are never processed. This causes the agent to hang in a perpetual "thinking" state.Root Cause
The
AttemptCompletionToolwas not callingprocessQueuedMessages()after handling the completion result, unlike other tools (e.g.,SearchAndReplaceTool,WriteToFileTool,ApplyDiffTool). This meant that any messages queued while waiting for the completion response would never be processed.Solution
Added
processQueuedMessages()calls in two places withinAttemptCompletionTool.execute():yesButtonClickedresponse) - to process any queued messages that arrived during the completion waitmessageResponsewith feedback text) - to process any messages that were queued while the feedback was being handledThis ensures queued follow-up messages are properly dequeued and submitted to the task, preventing the hang.
Testing
processQueuedMessages()View task on Roo Code Cloud