{"record":{"id":"4faf2b7091f2def4","repo":"eyaltoledano/claude-task-master","slug":"note-the-following-ids-were-not-found-initially-a","errorCode":null,"errorMessage":"Note: The following IDs were not found initially and were skipped: ${nonExistentIds.join(', ')}","messagePattern":"Note: The following IDs were not found initially and were skipped: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"scripts/modules/commands.js","lineNumber":3524,"sourceCode":"\t\t\t\t\t\tboxen(\n\t\t\t\t\t\t\tchalk.red(\n\t\t\t\t\t\t\t\t`Operation completed with errors. Removed ${result.removedTasks.length} task(s)/subtask(s).`\n\t\t\t\t\t\t\t) +\n\t\t\t\t\t\t\t\t(result.message ? `\\n\\nDetails:\\n${result.message}` : '') +\n\t\t\t\t\t\t\t\t(result.error ? `\\n\\nErrors:\\n${chalk.red(result.error)}` : ''),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpadding: 1,\n\t\t\t\t\t\t\t\tborderColor: 'red',\n\t\t\t\t\t\t\t\tborderStyle: 'round'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t\tprocess.exit(1); // Exit with error code if any part failed\n\t\t\t\t}\n\n\t\t\t\t// Log any initially non-existent IDs again for clarity\n\t\t\t\tif (nonExistentIds.length > 0) {\n\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\tchalk.yellow(\n\t\t\t\t\t\t\t`Note: The following IDs were not found initially and were skipped: ${nonExistentIds.join(', ')}`\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\n\t\t\t\t\t// Exit with error if any removals failed\n\t\t\t\t\tif (result.removedTasks.length === 0) {\n\t\t\t\t\t\tprocess.exit(1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(\n\t\t\t\t\tchalk.red(`Error: ${error.message || 'An unknown error occurred'}`)\n\t\t\t\t);\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\t\t});\n","sourceCodeStart":3506,"sourceCodeEnd":3542,"githubUrl":"https://github.com/eyaltoledano/claude-task-master/blob/c0c98d367c55296bfe69e65680625b6db437af02/scripts/modules/commands.js#L3506-L3542","documentation":"This is a non-fatal warning emitted during `task-master remove-subtask` (or similar multi-ID removal). The command collects IDs that did not match any task/subtask at the start, skips them, and warns via console.warn listing the missing IDs. The command may still exit(1) if any removals failed.","triggerScenarios":"Running `task-master remove-subtask` (or `tm remove-tasks`) with a comma-separated ID list where one or more IDs do not exist in tasks.json, e.g. typos or IDs from another tag.","commonSituations":"Stale IDs copied from an old tasks.json or different tag context; manual editing of task IDs; passing subtask IDs where parent IDs are expected.","solutions":["Verify each ID exists with `task-master list` (or `task-master show <id>`) before removal","Check you are operating in the intended tag context (`task-master tags list`, `task-master use-tag <name>`)","Correct typos in the ID list and re-run","Ignore if the skip is intentional; the warning is informational but removals failing cause exit code 1"],"exampleFix":"// before\ntask-master remove-subtask --id=1.2,9.9  // 9.9 doesn't exist\n// after\ntask-master show 9.9                     // confirm existence first\ntask-master remove-subtask --id=1.2","handlingStrategy":"validation","validationCode":"const ids = ['1.2','9.9'];\nconst data = JSON.parse(fs.readFileSync('.taskmaster/tasks.json','utf8'));\nconst existing = new Set();\nfor (const t of data.tags[currentTag].tasks) {\n  existing.add(String(t.id));\n  (t.subtasks||[]).forEach(s => existing.add(`${t.id}.${s.id}`));\n}\nconst missing = ids.filter(id => !existing.has(id));\nif (missing.length) throw new Error(`Unknown task IDs: ${missing.join(', ')}`);","typeGuard":"const isKnownId = (id, allIds) => allIds.includes(String(id));","tryCatchPattern":null,"preventionTips":["Run `task-master list` before batch removals","Remember removals are tag-scoped; confirm the active tag first","Keep IDs in sync when manually editing tasks.json","Validate ID lists in scripts before invoking the CLI"],"tags":["cli","task-management","ids-not-found"],"backgroundTag":"entity-not-found","analyzedSha":"c0c98d367c55296bfe69e65680625b6db437af02","analyzedAt":"2026-08-29T02:56:26.071Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}