eyaltoledano/claude-task-master · warning

Warning: The following task IDs were not found: ${nonExisten

Error message

Warning: The following task IDs were not found: ${nonExistentIds.join(', ')}

What it means

In scripts/modules/commands.js, commands that accept task ID lists verify each ID before acting. IDs that cannot be found (or error while being looked up) are collected and reported with this warning so the user knows part of the requested set doesn't exist; the command typically continues with the valid IDs.

Source

Thrown at scripts/modules/commands.js:3389

									(t) =>
										t.dependencies &&
										t.dependencies.includes(parseInt(taskId, 10))
								);
								if (dependentTasks.length > 0) {
									dependentTaskMessages.push(
										`  - Task ${taskId}: ${dependentTasks.length} dependent tasks (${dependentTasks.map((t) => t.id).join(', ')})`
									);
								}
							}
						} else {
							// Handle case where findTaskById returned null for the task property (should be rare)
							nonExistentIds.push(`${taskId} (error finding details)`);
						}
					}
				}

				if (nonExistentIds.length > 0) {
					console.warn(
						chalk.yellow(
							`Warning: The following task IDs were not found: ${nonExistentIds.join(', ')}`
						)
					);
				}

				if (existingTasksToRemove.length === 0) {
					console.log(chalk.blue('No existing tasks found to remove.'));
					process.exit(0);
				}

				// Skip confirmation if --yes flag is provided
				if (!options.yes) {
					console.log();
					console.log(
						chalk.red.bold(
							`⚠️ WARNING: This will permanently delete the following ${existingTasksToRemove.length} item(s):`
						)

View on GitHub (pinned to c0c98d367c)

Solutions

  1. Run the task list command to see current valid IDs and correct the input
  2. Remove the nonexistent IDs from the command's ID list and re-run
  3. Check you are in the project directory whose tasks.json contains those IDs
  4. Verify subtask IDs use the correct notation (e.g. 1.2) expected by the command

Example fix

// before
tm update-task --id=5,9 --prompt="..."  # 9 not found
// after
tm update-task --id=5 --prompt="..."  # only existing IDs
Defensive patterns

Strategy: validation

Validate before calling

const existing = new Set((await listTasks()).map(t => String(t.id)));
const missing = requestedIds.filter(id => !existing.has(String(id)));
if (missing.length) throw new Error(`Unknown task IDs: ${missing.join(', ')}`);

Prevention

When it happens

Trigger: registerCommands()-registered commands (e.g. update/remove/expand with --id lists) invoked with task IDs absent from tasks.json, or IDs that throw while fetching details ('error finding details').

Common situations: Stale IDs after renumbering/regenerating tasks.json, referencing subtask-form IDs where plain IDs are expected, typos in IDs, operating on a different tasks.json than the one the IDs came from.

Related errors


AI-assisted analysis of eyaltoledano/claude-task-master@c0c98d367c (2026-08-29). Data as JSON: /api/errors/ecfeb687810801d9. Report an issue: GitHub.