{"record":{"id":"a93b47cdf70263e4","repo":"eyaltoledano/claude-task-master","slug":"name-error","errorCode":null,"errorMessage":"  ${name}: ${error}","messagePattern":"  \\$\\{name\\}: \\$\\{error\\}","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"apps/cli/src/commands/list.command.ts","lineNumber":440,"sourceCode":"\n\t\t\t\tallTaggedTasks.push(...tasksToAdd);\n\t\t\t} catch (tagError: unknown) {\n\t\t\t\tconst errorMessage =\n\t\t\t\t\ttagError instanceof Error ? tagError.message : String(tagError);\n\t\t\t\tfailedTags.push({ name: tagName, error: errorMessage });\n\t\t\t\tcontinue; // Skip this tag but continue with others\n\t\t\t}\n\t\t}\n\n\t\t// Warn about failed tags\n\t\tif (failedTags.length > 0) {\n\t\t\tconsole.warn(\n\t\t\t\tchalk.yellow(\n\t\t\t\t\t`\\nWarning: Could not fetch tasks from ${failedTags.length} tag(s):`\n\t\t\t\t)\n\t\t\t);\n\t\t\tfailedTags.forEach(({ name, error }) => {\n\t\t\t\tconsole.warn(chalk.gray(`  ${name}: ${error}`));\n\t\t\t});\n\t\t}\n\n\t\t// If ALL tags failed, throw to surface the issue\n\t\tif (\n\t\t\tfailedTags.length === tagsResult.tags.length &&\n\t\t\ttagsResult.tags.length > 0\n\t\t) {\n\t\t\tthrow new Error(\n\t\t\t\t`Failed to fetch tasks from any tag. First error: ${failedTags[0].error}`\n\t\t\t);\n\t\t}\n\n\t\t// Apply additional filters\n\t\tlet filteredTasks: TaskWithTag[] = allTaggedTasks;\n\n\t\t// Apply blocking filter if specified\n\t\tif (options.blocking) {","sourceCodeStart":422,"sourceCodeEnd":458,"githubUrl":"https://github.com/eyaltoledano/claude-task-master/blob/c0c98d367c55296bfe69e65680625b6db437af02/apps/cli/src/commands/list.command.ts#L422-L458","documentation":"In getTasksFromAllTags, when fetching tasks for multiple tags individually fails for some tags, the CLI collects {name, error} entries in failedTags and prints this warning per tag before continuing with the tags that succeeded. If ALL tags fail, it rethrows. This message is the per-tag diagnostic line shown to the user.","triggerScenarios":"Calling the list command (via getTasksFromAllTags) when task file reads for specific tags throw — e.g. missing or malformed .taskmaster/tasks/tasks.json for a tag, JSON parse errors, or filesystem permission issues — while at least one other tag succeeds.","commonSituations":"Partially corrupted tasks.json after a merge; a tag created but its data never written; read-only project directories; switching machines/branches where per-tag files are absent.","solutions":["Open the task file for each named tag and fix JSON syntax or restore missing files","Re-create the broken tag's data with task-master or copy a known-good tasks file","Check file permissions on .taskmaster/tasks/","If all tags fail, fix the root cause (file path/taggedFileConfig) before re-running"],"exampleFix":"// before\n{\n  \"tags\": { \"master\": { \"tasks\": [ { \"id\": 1, \"title\": , } ] } }\n}\n// after\n{\n  \"tags\": { \"master\": { \"tasks\": [ { \"id\": 1, \"title\": \"Fix parse error\" } ] } }\n}","handlingStrategy":"validation","validationCode":"import { readFileSync } from 'fs';\nfunction validateTagFiles(tags) {\n  for (const tag of tags) {\n    try {\n      const raw = readFileSync(`.taskmaster/tasks/tasks.json`, 'utf8');\n      const data = JSON.parse(raw);\n      if (!data[tag]) throw new Error(`tag ${tag} missing`);\n    } catch (e) {\n      console.warn(`Tag ${tag} unreadable: ${e.message}`);\n    }\n  }\n}","typeGuard":"function isTagDataOk(data, tag) {\n  return typeof data === 'object' && data !== null && tag in data && Array.isArray(data[tag]?.tasks);\n}","tryCatchPattern":"try {\n  await tmCore.tasks.getTasksForAllTags();\n} catch (error) {\n  console.error('All tags failed:', error.message); // full failure surfaces here\n}\n// per-tag warnings are printed by the CLI; inspect the listed tags individually","preventionTips":["Run `task-master tags` to confirm tags exist before listing","Validate tasks.json with a JSON linter after manual edits","Commit .taskmaster task files or back them up to avoid loss on branch switches","Check directory permissions after cloning on new machines"],"tags":["cli","filesystem","json-parse","partial-failure"],"backgroundTag":"tasks-file-unreadable","analyzedSha":"c0c98d367c55296bfe69e65680625b6db437af02","analyzedAt":"2026-08-29T02:56:26.071Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}