bug: task-master thinks the next task is 1.1.3, but it's actually 1.3
Description
In the latest version of task master (I updated from 0.16 to 17 I think, but generated tasks with 0.16), task master is getting confused with the ids of sub tasks:
Cursor calling next_task produces this:
{
"data": {
"nextTask": {
"id": "1.1.3",
"title": "Configure Custom Tailwind Theme",
"status": "pending",
"priority": "high",
"dependencies": [],
"parentId": 1,
"complexityScore": 5
},
"isSubtask": true,
"nextSteps": "When ready to work on the subtask, use set-status to set the status to \"in progress\" Subtasks can be updated with timestamped details as you implement them. This is useful for tracking progress, marking milestones and insights (of successful or successive falures in attempting to implement the subtask). Research can be used when updating the subtask to collect up-to-date information, and can be helpful to solve a repeating problem the agent is unable to solve. It is a good idea to get-task the parent task to collect the overall context of the task, and to get-task the subtask to collect the specific details of the subtask."
},
"version": {
"version": "0.17.0",
"name": "task-master-ai"
},
"tag": {
"currentTag": "master",
"availableTags": [
"master"
]
}
}
And when I follow up saying "mark this subtask as complete", it calls set_task_status and produces the following (id passed via params is 1.1.3):
Error: Subtask 1 not found in parent task 1
Version: 0.17.0
Name: task-master-ai
Current Tag: master
This then results in a confusion loop, with Claude finally giving up and editing tasks.json directly.
My tasks.json looks like this (omitted some details for privacy reasons):
{
"master": {
"tasks": [
{
"id": 1,
"title": "Setup Next.js Project with Core Infrastructure",
"description": "Initialize the ... application with Next.js, Tailwind CSS, and comprehensive project infrastructure following the PRD specifications for ...",
"status": "in-progress",
"dependencies": [],
"priority": "high",
"details": "...",
"testStrategy": "...",
"subtasks": [
{
"id": "1.1",
"title": "Initialize Next.js Project with TypeScript",
"description": "Create base Next.js application with TypeScript, Tailwind, and ESLint",
"status": "done"
},
{
"id": "1.2",
"title": "Setup Comprehensive Project Structure",
"description": "Create directory structure for creator/brand personas, mock services, and all planned features",
"status": "done"
},
{
"id": "1.3",
"title": "Configure Custom Tailwind Theme",
"description": "Implement dark slate-indigo gradient theme, brand colors, responsive grid system, and typography scales",
"status": "done"
},
// ...more sub tasks
]
},
//..more tasks and sub-tasks
],
"metadata": {
"created": "2025-06-16T22:09:36.774Z",
"updated": "2025-06-16T22:09:36.776Z",
"description": "Tasks for master context"
}
}
}
Steps to Reproduce
See description above.
Expected Behavior
Task master should correctly pick up sub tasks as 1.3, 1.4 and so on (this worked before).
Actual Behavior
Task master thinks the sub tasks that are actually 1.3 are 1.1.3 and gets confused.
Screenshots or Logs
Provide screenshots, logs, or error messages if applicable.
Environment
- Task Master version: 0.17
- Node.js version: 23.11.0
- Operating system: MacOS
- IDE (if applicable): Cursor
Doing some more digging, it looks like task-master 0.17 creates sub tasks without the parent prefix (4 instead of 1.4). Is there an easy way to migrate from 1.16 to 1.17?
It's also possible that some task numbers were simply hallucinated, as I just found out looking at tasks.json that:
- task 1 has bad sub tasks (strings like "1.3")
- task 2 - 6 have good sub tasks (numbers like 3)
- 7 has bad sub tasks again
- 8-9 are good
- 10 is broken in an entirely different way: sub tasks are numbers, but follow the format of 101, 102 etc
Potentially the actual fix is to implement a stricter prompt for the sub task generation, or have a validation check at the end?
@pbakaus curious on which models you're using, but I think you make a good point
@pbakaus curious on which models you're using, but I think you make a good point
Good question, it was Claude 4 Sonnet in both task master and Cursor.
Thanks for that.
Let me fix this, although I think there is already an active PR for it
Awesome about the active PR, just adding my comment here that this is happening to me too:
Fixed in 0.17.0, improved in 0.18.0
Fantastic, thanks for the the fix and quick turnaround!