fix: process queued messages after execute_command completes #11024
+20
−0
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.
Related GitHub Issue
This PR addresses Linear issue EXT-638: Messages are not queuing when execute_command tool is in progress.
Roo Code Task Context (Optional)
View task on Roo Code Cloud
Description
The
ExecuteCommandToolwas not callingtask.processQueuedMessages()after command execution completes. This is inconsistent with other tools likeEditFileTool,WriteToFileTool,ApplyDiffTool,SearchReplaceTool, andSearchAndReplaceToolwhich all call this method after their operations complete.The fix adds a single
processQueuedMessages()call at the end of the execute method (before the return statement), ensuring any user messages that were queued during command execution are properly processed.Key implementation details:
task.processQueuedMessages()call after successful command execution (line 132)pushToolResultcode paths converge, ensuring it runs regardless of which execution path was taken (normal, fallback with shell integration error, etc.)Test Procedure
processQueuedMessagesmock to the existing test setupcd src && npx vitest run core/tools/__tests__/executeCommandTool.spec.ts- All 12 tests passpnpm run check-types- All 14 successfulTo manually verify the fix:
npm install)Pre-Submission Checklist
Screenshots / Videos
N/A - No UI changes
Documentation Updates
Additional Notes
The fix follows the same pattern used by other tools in the codebase. See
WriteToFileTool.ts:185,EditFileTool.ts:472,ApplyDiffTool.ts:258, etc. for reference.Get in Touch
N/A
Important
Fixes
ExecuteCommandToolto process queued messages after command execution by addingtask.processQueuedMessages()call.task.processQueuedMessages()call inExecuteCommandTool.tsafter command execution to process queued messages.pushToolResultpaths, regardless of execution path.processQueuedMessagesinexecuteCommandTool.spec.ts.This description was created by
for cc59868. You can customize this summary. It will automatically update as commits are pushed.