diff --git a/.changeset/curvy-weeks-flow.md b/.changeset/curvy-weeks-flow.md new file mode 100644 index 00000000..028194c7 --- /dev/null +++ b/.changeset/curvy-weeks-flow.md @@ -0,0 +1,5 @@ +--- +"task-master-ai": patch +--- + +Change parent task back to "pending" when all subtasks are in "pending" state diff --git a/packages/tm-core/src/storage/file-storage/file-storage.ts b/packages/tm-core/src/storage/file-storage/file-storage.ts index a0486e41..858543d1 100644 --- a/packages/tm-core/src/storage/file-storage/file-storage.ts +++ b/packages/tm-core/src/storage/file-storage/file-storage.ts @@ -409,8 +409,11 @@ export class FileStorage implements IStorage { const allDone = subs.every(isDoneLike); const anyInProgress = subs.some((s) => norm(s) === 'in-progress'); const anyDone = subs.some(isDoneLike); + const allPending = subs.every((s) => norm(s) === 'pending'); + if (allDone) parentNewStatus = 'done'; else if (anyInProgress || anyDone) parentNewStatus = 'in-progress'; + else if (allPending) parentNewStatus = 'pending'; } // Always bump updatedAt; update status only if changed