{"record":{"id":"e495cdb819829006","repo":"eyaltoledano/claude-task-master","slug":"warning-could-not-fetch-tasks-from-failedtags-l","errorCode":null,"errorMessage":"Warning: Could not fetch tasks from ${failedTags.length} tag(s):","messagePattern":"Warning: Could not fetch tasks from (.+?) tag\\(s\\):","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"apps/cli/src/commands/list.command.ts","lineNumber":434,"sourceCode":"\n\t\t\t\t// Apply ready filter per-tag to respect tag-scoped dependencies\n\t\t\t\t// (task IDs may overlap between tags, so we must filter within each tag)\n\t\t\t\tconst tasksToAdd: TaskWithTag[] = options.ready\n\t\t\t\t\t? (filterReadyTasks(enrichedTasks) as TaskWithTag[])\n\t\t\t\t\t: enrichedTasks;\n\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}","sourceCodeStart":416,"sourceCodeEnd":452,"githubUrl":"https://github.com/eyaltoledano/claude-task-master/blob/c0c98d367c55296bfe69e65680625b6db437af02/apps/cli/src/commands/list.command.ts#L416-L452","documentation":"In list.command.ts getTasksFromAllTags, when listing tasks across all tags, individual tag fetches that throw are collected into failedTags instead of aborting. If any tags failed, this warning lists how many, followed by per-tag name/error lines. The command still returns tasks from the tags that succeeded.","triggerScenarios":"Calling getTasksFromAllTags when one or more tags' underlying storage/files fail to load or parse — e.g. corrupted tag data, missing tag file, or a storage error thrown by tmCore.tasks for a specific tag.","commonSituations":"Partially corrupted .taskmaster state after a crash; tags created by a different/newer version; filesystem permission issues on specific tag files; concurrent edits corrupting one tag's data.","solutions":["Inspect the per-tag error lines printed after this warning to identify the failing tag.","Repair or restore the failing tag's data (re-create the tag, restore from backup, or fix JSON corruption).","Run taskmaster's validation/repair flow or re-initialize the affected tag.","Delete and recreate the broken tag if its tasks are recoverable or dispensable."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before listing, sanity-check tag data files\nimport fs from 'fs';\nfor (const tag of tags) {\n  const p = `.taskmaster/tasks/${tag}.json`;\n  if (!fs.existsSync(p)) console.warn(`Tag data missing: ${tag}`);\n  else { try { JSON.parse(fs.readFileSync(p, 'utf8')); } catch { console.warn(`Tag data corrupt: ${tag}`); } }\n}","typeGuard":null,"tryCatchPattern":"try {\n  const result = await tmCore.tasks.getTasks({ tag });\n} catch (err) {\n  failedTags.push({ name: tag, error: err.message }); // mirror the CLI: skip and continue\n}","preventionTips":["Back up .taskmaster data before large edits.","Avoid concurrent taskmaster processes on the same project.","After crashes or merge conflicts, validate tag JSON before listing."],"tags":["cli","tags","partial-failure","warning"],"backgroundTag":"partial-fetch-failure","analyzedSha":"c0c98d367c55296bfe69e65680625b6db437af02","analyzedAt":"2026-08-29T02:56:26.071Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}