Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/core/tools/NewTaskTool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,15 @@ export class NewTaskTool extends BaseTool<"new_task"> {
}

// Provider is guaranteed to be defined here due to earlier check.


// Create a checkpoint before delegating to subtask.
// This allows users to restore to the state before the subtask was created.
// We await this to ensure the checkpoint message appears in the history
// before the delegation happens.
if (task.enableCheckpoints) {
task.checkpointSave(true)
await task.checkpointSave(true)
}

// Delegate parent and open child as sole active task
const child = await (provider as any).delegateParentAndOpenChild({
parentTaskId: task.taskId,
Expand Down
Loading