You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: comprehensive orchestrator mode restoration for sub-tasks
- Enhanced resumePausedTask method with comprehensive mode restoration logic
- Added mode restoration safety net in finishSubTask method
- Improved mode validation and restoration in task resumption from history
- Added error handling for interrupted sub-tasks with mode restoration
- Ensures parent task mode is properly restored regardless of how sub-task ends
Fixes#5747
`[subtasks] task ${this.taskId}.${this.instanceId} successfully restored to '${this.pausedModeSlug}' mode from history`,
846
+
)
847
+
}
848
+
}catch(error){
849
+
provider.log(
850
+
`[subtasks] task ${this.taskId}.${this.instanceId} failed to restore mode to '${this.pausedModeSlug}' from history: ${error}`,
851
+
)
852
+
// Continue execution even if mode restoration fails
853
+
}
854
+
}
855
+
798
856
// since we don't use api_req_finished anymore, we need to check if the last api_req_started has a cost value, if it doesn't and no cancellation reason to present, then we remove it since it indicates an api request without any partial content streamed
799
857
constlastApiReqStartedIndex=findLastIndex(
800
858
modifiedClineMessages,
@@ -1451,6 +1509,35 @@ export class Task extends EventEmitter<ClineEvents> {
0 commit comments