Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jul 19, 2025

This PR fixes issue #5955 where task history gets unexpectedly truncated after cancelling a running task.

Problem

When a task was cancelled while an ask promise was waiting for user response, the promise state was not properly cleared. This caused the "Current ask promise was ignored" error when trying to resume the task from history.

Solution

  1. Clear ask promise state (askResponse, askResponseText, askResponseImages) in abortTask() method
  2. Add abort check in ask() method to handle task cancellation gracefully while waiting for response
  3. Clear ask promise state at the beginning of resumeTaskFromHistory() to ensure clean state

Testing

  • Ran existing tests for ClineProvider which all pass
  • ESLint checks pass
  • TypeScript type checks pass

Fixes #5955


Important

Fixes issue #5955 by clearing ask promise state in abortTask() and resumeTaskFromHistory() methods in Task.ts to prevent errors when cancelling tasks.

  • Behavior:
    • Fixes issue Task history gets unexpectedly truncated #5955 by clearing ask promise state (askResponse, askResponseText, askResponseImages) in abortTask() and resumeTaskFromHistory() methods in Task.ts.
    • Adds abort check in ask() method to handle task cancellation while waiting for response.
  • Testing:
    • Existing tests for ClineProvider pass.
    • ESLint and TypeScript checks pass.

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

…tasks

- Clear ask promise state (askResponse, askResponseText, askResponseImages) in abortTask()
- Add abort check in ask() method to handle task cancellation gracefully
- Clear ask promise state at the beginning of resumeTaskFromHistory()
- This prevents the error that occurred when cancelling a task with an active ask promise

Fixes #5955
@roomote roomote bot requested review from cte, jr and mrubens as code owners July 19, 2025 18:47
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. bug Something isn't working labels Jul 19, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 19, 2025
@daniel-lxs
Copy link
Member

Should be handled by #5544

@daniel-lxs daniel-lxs closed this Jul 21, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jul 21, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:S This PR changes 10-29 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Task history gets unexpectedly truncated

4 participants