Skip to content

Conversation

@roomote
Copy link
Collaborator

@roomote roomote commented Jun 19, 2025

When an API streaming error occurs in a subtask, instead of reinitializing
the subtask with history (which keeps it stuck in subtask view), properly
return control to the parent task by calling finishSubTask().

This ensures that orchestrator mode can properly resume the parent task
after a subtask encounters an API streaming failure during cancellation.


Important

Fixes subtask cancellation in orchestrator mode by returning control to the parent task after an API streaming error in Task.ts.

  • Behavior:
    • In Task.ts, modify error handling for API streaming errors in subtasks.
    • If a subtask encounters an API streaming error, call finishSubTask() to return control to the parent task.
    • For main tasks, continue to reinitialize with history as before.
  • Error Handling:
    • Specifically addresses API streaming failures during subtask cancellation in orchestrator mode.

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

When an API streaming error occurs in a subtask, instead of reinitializing
the subtask with history (which keeps it stuck in subtask view), properly
return control to the parent task by calling finishSubTask().

This ensures that orchestrator mode can properly resume the parent task
after a subtask encounters an API streaming failure during cancellation.
@roomote roomote requested review from cte, jr and mrubens as code owners June 19, 2025 18:35
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. bug Something isn't working labels Jun 19, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jun 19, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Jun 19, 2025
@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Jun 20, 2025
@daniel-lxs
Copy link
Member

Testing shows this fix doesn't resolve the issue. When canceling a subtask during the thinking phase and clicking X, the task still doesn't return to the parent orchestrator task as expected.

The problem appears to be that finishSubTask is already being called through the clearTask handler when clicking X, but the parent task isn't resuming. Adding another finishSubTask call in the API streaming error handler doesn't address the root cause.

Closing this PR as it doesn't fix the reported issue.

@daniel-lxs daniel-lxs closed this Jun 22, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Prelim Review] to Done in Roo Code Roadmap Jun 22, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jun 22, 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 PR - Needs Preliminary Review 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.

4 participants