Skip to content

Conversation

@roomote
Copy link
Collaborator

@roomote roomote commented Jun 19, 2025

  • Modified task resumption logic in Task.ts to detect completed subtasks
  • Added check for finishTask tool completion when determining resume type
  • Ensures completed subtasks show 'Start New Task' button instead of 'Resume Task'
  • Prevents unnecessary re-execution of completed subtasks and token costs

Important

Modifies task resumption logic in Task.ts to detect completed subtasks, ensuring correct UI display and preventing unnecessary re-execution.

  • Behavior:
    • Modified task resumption logic in Task.ts to detect completed subtasks by checking for finishTask tool completion.
    • Ensures completed subtasks show 'Start New Task' button instead of 'Resume Task'.
    • Prevents unnecessary re-execution of completed subtasks and token costs.

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

- Modified task resumption logic in Task.ts to detect completed subtasks
- Added check for finishTask tool completion when determining resume type
- Ensures completed subtasks show 'Start New Task' button instead of 'Resume Task'
- Prevents unnecessary re-execution of completed subtasks and token costs
@roomote roomote requested review from cte, jr and mrubens as code owners June 19, 2025 15:46
@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

After reviewing this PR and discussing the issue, I think we're addressing a symptom rather than the root cause, also I tested it and it doesn't seem to work.

The real problem is that when a subtask is reopened after navigating away, the system loses context that it is a subtask, so the "Complete subtask and return to parent task" button does not appear. This happens whether the subtask is in progress or already completed.

The current PR checks for finishTask tool calls to detect completed subtasks, but that only helps in those cases. If the subtask is still in progress, the UI falls back to showing "Cancel" and "Resume Task" instead of the subtask-specific controls.

The core issue is that the subtask UI state is not preserved when reopening subtasks. The fix should ensure this context is maintained for all subtasks when resumed, not just completed ones.

I will add a more detailed analysis and proposed solution to the original issue (#4881).

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