eyaltoledano/claude-task-master · warning
NO_TASKS
NO_TASKS
Error message
No tasks match the specified criteria
What it means
ExportService.exportTasks returns a non-throwing failure result with code NO_TASKS when, after applying the caller's filters (status, excludeSubtasks) to the local task file for the resolved tag, zero tasks remain. The library treats an empty export set as a soft failure rather than an exception, since exporting zero tasks is almost never intended. It means the brief exists and auth is fine, but the local task list produced nothing to send.
Source
Thrown at packages/tm-core/src/modules/integration/services/export.service.ts:446
const allTasks = await fileStorage.loadTasks(tag);
const taskListResult = {
tasks: filteredTasks,
total: allTasks.length,
filtered: filteredTasks.length,
tag,
storageType: 'file' as const
};
if (taskListResult.tasks.length === 0) {
return {
success: false,
taskCount: 0,
briefId,
orgId,
message: 'No tasks found to export',
error: {
code: 'NO_TASKS',
message: 'No tasks match the specified criteria'
}
};
}
try {
// Call the export API with the original tasks
// performExport will handle the transformation based on the method used
await this.performExport(orgId, briefId, taskListResult.tasks);
return {
success: true,
taskCount: taskListResult.tasks.length,
briefId,
orgId,
message: `Successfully exported ${taskListResult.tasks.length} task(s) to brief`
};
} catch (error) {View on GitHub (pinned to c0c98d367c)
Solutions
- Run `tm list` (or check .taskmaster/tasks/tasks.json) to confirm tasks exist under the active tag before exporting.
- Remove or widen the status filter in ExportTasksOptions, or pass the correct options.tag matching the populated tag.
- Set the active tag with `tm tags --set <tag>` (or pass tag explicitly) to the tag that actually contains tasks.
- Create tasks first (tm parse-prd or tm add-task) and retry the export.
Example fix
// before
await exportService.exportTasks({ orgId, briefId, status: 'done' });
// after
const tasks = await tmCore.tasks.list();
if (tasks.length === 0) throw new Error('Create tasks before exporting');
await exportService.exportTasks({ orgId, briefId }); Defensive patterns
Strategy: validation
Validate before calling
const tasks = await tmCore.tasks.list(tag);
const exportable = tasks.filter(t => !status || t.status === status);
if (exportable.length === 0) throw new Error(`No tasks to export for tag '${tag}'`); Type guard
function hasTasks(r: ExportResult): r is ExportResult & { success: true; taskCount: number } {
return r.success === true && r.taskCount > 0;
} Try / catch
const result = await exportService.exportTasks(opts);
if (!result.success && result.error?.code === 'NO_TASKS') {
console.warn('Nothing to export - check tag/status filters');
} Prevention
- Run `tm list` before every export to confirm non-empty task set
- Avoid hardcoding status filters; derive them from actual task statuses
- Always pass the tag explicitly instead of relying on the active tag
When it happens
Trigger: Calling exportTasks({orgId, briefId}) when the tasks file for the active/selected tag is empty, or when options.status (e.g. 'done') matches no tasks, or when excludeSubtasks is true and the tag only contains subtasks.
Common situations: Developers hit this when working in a fresh repo where .taskmaster/tasks.json has no tasks yet, when they set --status to a status string that doesn't exactly match stored statuses ('pending' vs 'todo'), when the active tag differs from the tag they populated, or when all tasks were already deleted.
Related errors
- Invalid iterations: ${iterations}. Must be a positive intege
- Invalid format: ${options.format}. Valid formats are: text,
- AUTHENTICATION_ERROR
- MISSING_CONFIGURATION
- VALIDATION_ERROR
AI-assisted analysis of eyaltoledano/claude-task-master@c0c98d367c (2026-08-29).
Data as JSON: /api/errors/ae763049e8f8160b.
Report an issue: GitHub.