There was an error while loading. Please reload this page.
1 parent d07701a commit c633dacCopy full SHA for c633dac
1 file changed
src/core/webview/ClineProvider.ts
@@ -3552,7 +3552,11 @@ export class ClineProvider
3552
}`,
3553
)
3554
try {
3555
- await this.removeClineFromStack({ skipDelegationRepair: true })
+ // Only pop the stack if the child we just created is still on top.
3556
+ // A concurrent delegation could have pushed another child since we created ours.
3557
+ if (this.getCurrentTask()?.taskId === child.taskId) {
3558
+ await this.removeClineFromStack({ skipDelegationRepair: true })
3559
+ }
3560
} catch (cleanupError) {
3561
this.log(
3562
`[delegateParentAndOpenChild] Failed to close paused child ${child.taskId} during rollback: ${
0 commit comments