Skip to content

UI hangs/stutters when task is aborted in presentAssistantMessage #3459

@KJ7LNW

Description

@KJ7LNW

Version

  • App version: 3.16.5
  • Model: sonnet-3.7

What happened?

The UI hangs/stutters when a task is aborted in the presentAssistantMessage function. The error occurs in the recursivelyMakeClineRequests function, which appears to be called recursively multiple times before failing.

Error message:

mainThreadExtensionService.ts:78 [RooVeterinaryInc.roo-cline][Cline#presentAssistantMessage] task 1e21d285-2358-4e4a-937c-0a16a5d6630d.87a4fccb aborted
mainThreadExtensionService.ts:79 Error: [Cline#presentAssistantMessage] task 1e21d285-2358-4e4a-937c-0a16a5d6630d.87a4fccb aborted

The stack trace shows multiple recursive calls to recursivelyMakeClineRequests, which suggests a potential issue with how task abortion is handled in recursive scenarios.

Expected behavior

When a task is aborted, the UI should remain responsive and not hang or stutter. The task abortion should be handled gracefully without causing performance issues in the interface.

Steps to reproduce

The exact reproduction steps are not provided in the error report, but based on the error message and stack trace, the issue appears to occur when:

  1. A task is initiated that involves recursivelyMakeClineRequests
  2. The task is aborted for some reason
  3. The UI hangs/stutters as a result of the aborted task

Full error output

mainThreadExtensionService.ts:78 [RooVeterinaryInc.roo-cline][Cline#presentAssistantMessage] task 1e21d285-2358-4e4a-937c-0a16a5d6630d.87a4fccb aborted
mainThreadExtensionService.ts:79 Error: [Cline#presentAssistantMessage] task 1e21d285-2358-4e4a-937c-0a16a5d6630d.87a4fccb aborted
    at qK (/home/ewheeler/.vscode-insiders/extensions/rooveterinaryinc.roo-cline-3.16.5/dist/extension.js:4396:6109)
    at t.recursivelyMakeClineRequests (/home/ewheeler/.vscode-insiders/extensions/rooveterinaryinc.roo-cline-3.16.5/dist/extension.js:4716:971)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at t.recursivelyMakeClineRequests (/home/ewheeler/.vscode-insiders/extensions/rooveterinaryinc.roo-cline-3.16.5/dist/extension.js:4720:1110)
    at t.recursivelyMakeClineRequests (/home/ewheeler/.vscode-insiders/extensions/rooveterinaryinc.roo-cline-3.16.5/dist/extension.js:4720:1110)
    at t.recursivelyMakeClineRequests (/home/ewheeler/.vscode-insiders/extensions/rooveterinaryinc.roo-cline-3.16.5/dist/extension.js:4720:1110)
    at t.recursivelyMakeClineRequests (/home/ewheeler/.vscode-insiders/extensions/rooveterinaryinc.roo-cline-3.16.5/dist/extension.js:4720:1110)
    at t.recursivelyMakeClineRequests (/home/ewheeler/.vscode-insiders/extensions/rooveterinaryinc.roo-cline-3.16.5/dist/extension.js:4720:1110)
    at t.initiateTaskLoop (/home/ewheeler/.vscode-insiders/extensions/rooveterinaryinc.roo-cline-3.16.5/dist/extension.js:4708:1053)
    at t.resumeTaskFromHistory (/home/ewheeler/.vscode-insiders/extensions/rooveterinaryinc.roo-cline-3.16.5/dist/extension.js:4708:206)

Additional context

The stack trace shows multiple recursive calls to recursivelyMakeClineRequests, which suggests a potential issue with how task abortion is handled in recursive scenarios. This could be related to:

  1. Error handling in recursive function calls
  2. Task abortion mechanism not properly cleaning up resources
  3. Potential infinite recursion or excessive stack depth when a task is aborted

The error occurs in the minified extension.js file, making it difficult to pinpoint the exact source of the issue without access to the unminified source code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue - Unassigned / ActionableClear and approved. Available for contributors to pick up.bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions