eyaltoledano/claude-task-master · warning
${name}: ${error}
Error message
${name}: ${error} What it means
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.
Source
Thrown at apps/cli/src/commands/list.command.ts:440
allTaggedTasks.push(...tasksToAdd);
} catch (tagError: unknown) {
const errorMessage =
tagError instanceof Error ? tagError.message : String(tagError);
failedTags.push({ name: tagName, error: errorMessage });
continue; // Skip this tag but continue with others
}
}
// Warn about failed tags
if (failedTags.length > 0) {
console.warn(
chalk.yellow(
`\nWarning: Could not fetch tasks from ${failedTags.length} tag(s):`
)
);
failedTags.forEach(({ name, error }) => {
console.warn(chalk.gray(` ${name}: ${error}`));
});
}
// If ALL tags failed, throw to surface the issue
if (
failedTags.length === tagsResult.tags.length &&
tagsResult.tags.length > 0
) {
throw new Error(
`Failed to fetch tasks from any tag. First error: ${failedTags[0].error}`
);
}
// Apply additional filters
let filteredTasks: TaskWithTag[] = allTaggedTasks;
// Apply blocking filter if specified
if (options.blocking) {View on GitHub (pinned to c0c98d367c)
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
Example fix
// before
{
"tags": { "master": { "tasks": [ { "id": 1, "title": , } ] } }
}
// after
{
"tags": { "master": { "tasks": [ { "id": 1, "title": "Fix parse error" } ] } }
} Defensive patterns
Strategy: validation
Validate before calling
import { readFileSync } from 'fs';
function validateTagFiles(tags) {
for (const tag of tags) {
try {
const raw = readFileSync(`.taskmaster/tasks/tasks.json`, 'utf8');
const data = JSON.parse(raw);
if (!data[tag]) throw new Error(`tag ${tag} missing`);
} catch (e) {
console.warn(`Tag ${tag} unreadable: ${e.message}`);
}
}
} Type guard
function isTagDataOk(data, tag) {
return typeof data === 'object' && data !== null && tag in data && Array.isArray(data[tag]?.tasks);
} Try / catch
try {
await tmCore.tasks.getTasksForAllTags();
} catch (error) {
console.error('All tags failed:', error.message); // full failure surfaces here
}
// per-tag warnings are printed by the CLI; inspect the listed tags individually Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Warning: Could not load tasks for ContextGatherer: ${error.m
- Warning: Could not fetch tasks from ${failedTags.length} tag
- MFA_VERIFICATION_FAILED
- Failed to get brief creation URL
- MFA_VERIFICATION_FAILED
AI-assisted analysis of eyaltoledano/claude-task-master@c0c98d367c (2026-08-29).
Data as JSON: /api/errors/a93b47cdf70263e4.
Report an issue: GitHub.