-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
Issue - Unassigned / ActionableClear and approved. Available for contributors to pick up.Clear and approved. Available for contributors to pick up.bugSomething isn't workingSomething isn't working
Description
App Version
v3.3.1 (or latest)
API Provider
Not Applicable / Other
Model Used
N/A
🔁 Steps to Reproduce
- Setup: macOS, Roo Code extension (latest), default settings with checkpoints enabled
- Start a task that makes an API call:
- Open Roo Code and enter a prompt that will require an API call
- Example: "Create a new React component"
- Force API failure to trigger retry:
- Disconnect network/WiFi after the task starts
- Wait for the API call to fail and enter retry state (you'll see retry messages)
- Cancel during retry:
- While the retry is happening, click the X button in the task header
- Alternative: Click the "Terminate" button if in resume_task state
Result Path 1 (Incorrect Subtask Display):
- Task shows "Subtask Results" section
- Contains error: "Task error: It was stopped and canceled by the user."
- This happens even though the task was NOT a subtask
Result Path 2 (Checkpoint Warning):
- Task shows blank screen with spinner
- Message: "Still initializing checkpoint... If this takes too long, you can disable checkpoints in settings and restart your task."
- Clicking "Terminate" corrupts the task (cannot re-enter)
- Clicking "X" button returns to the failed API call state
💥 Outcome Summary
Expected task to be cleanly canceled, but got either "Subtask Results" error display for non-subtask or stuck checkpoint initialization spinner.
📄 Relevant Logs or Errors (Optional)
Root Cause Analysis
Issue 1: Incorrect "Subtask Results" Display
Location: src/core/webview/webviewMessageHandler.ts:200
case "clearTask":
// This unconditionally calls finishSubTask even for non-subtasks
await provider.finishSubTask(t("common:tasks.canceled"))
await provider.postStateToWebview()
breakIssue 2: Checkpoint Warning During Transitions
Location: webview-ui/src/components/chat/ChatView.tsx:1145-1161
- Checkpoint warning timer starts when task exists but has no messages
- During cancellation/retry, task state is in flux causing false positive
Proposed Fix
// In webviewMessageHandler.ts
case "clearTask":
const currentCline = provider.getCurrentCline()
// Check if there's actually a parent task in the stack
if (provider.getClineStack().length > 1) {
await provider.finishSubTask(t("common:tasks.canceled"))
} else {
// Regular task - just clear it
await provider.clearTask()
}
await provider.postStateToWebview()
breakdosubot
Metadata
Metadata
Assignees
Labels
Issue - Unassigned / ActionableClear and approved. Available for contributors to pick up.Clear and approved. Available for contributors to pick up.bugSomething isn't workingSomething isn't working
Type
Projects
Status
Done