Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jan 27, 2026

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 ExecuteCommandTool was not calling task.processQueuedMessages() after command execution completes. This is inconsistent with other tools like EditFileTool, WriteToFileTool, ApplyDiffTool, SearchReplaceTool, and SearchAndReplaceTool which 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:

  • Added task.processQueuedMessages() call after successful command execution (line 132)
  • The call is placed after all pushToolResult code paths converge, ensuring it runs regardless of which execution path was taken (normal, fallback with shell integration error, etc.)

Test Procedure

  1. Added processQueuedMessages mock to the existing test setup
  2. Added new test case: "should process queued messages after command execution"
  3. Ran tests: cd src && npx vitest run core/tools/__tests__/executeCommandTool.spec.ts - All 12 tests pass
  4. Ran type checks: pnpm run check-types - All 14 successful

To manually verify the fix:

  1. Start Roo Code extension
  2. Have the agent execute a command (e.g., npm install)
  3. While the command is running, send a user message
  4. After the command completes, the queued message should now be processed

Pre-Submission Checklist

  • Issue Linked: This PR is linked to Linear issue EXT-638
  • Scope: Changes are focused on fixing the message queuing issue for execute_command
  • Self-Review: Performed thorough review of the changes
  • Testing: Added new test to verify processQueuedMessages is called
  • Documentation Impact: No documentation updates required
  • Contribution Guidelines: Read and agree to guidelines

Screenshots / Videos

N/A - No UI changes

Documentation Updates

  • No documentation updates are required.

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 ExecuteCommandTool to process queued messages after command execution by adding task.processQueuedMessages() call.

  • Behavior:
    • Adds task.processQueuedMessages() call in ExecuteCommandTool.ts after command execution to process queued messages.
    • Ensures the call is made after all pushToolResult paths, regardless of execution path.
  • Testing:
    • Adds mock for processQueuedMessages in executeCommandTool.spec.ts.
    • New test case "should process queued messages after command execution" added to verify behavior.
    • All tests and type checks pass.

This description was created by Ellipsis for cc59868. You can customize this summary. It will automatically update as commits are pushed.

The ExecuteCommandTool was not calling task.processQueuedMessages() after command
execution, unlike other tools such as EditFileTool, WriteToFileTool, ApplyDiffTool,
etc. This caused user messages sent during command execution to remain stuck in the
queue instead of being processed.

The fix adds processQueuedMessages() call after command execution completes,
matching the pattern used by other tools.

Fixes EXT-638
@roomote
Copy link
Contributor Author

roomote bot commented Jan 27, 2026

Rooviewer Clock   See task on Roo Cloud

Review complete. No issues found.

The implementation correctly adds task.processQueuedMessages() after command execution, following the same pattern used by other tools in the codebase. The placement ensures queued messages are processed regardless of the execution path taken (normal or fallback).

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant