eyaltoledano/claude-task-master · error · Error

File storage does not support expandTaskWithPrompt. Client-s

Error message

File storage does not support expandTaskWithPrompt. Client-side AI logic must process the expansion before calling updateTask().

What it means

Like updateTaskWithPrompt, expandTaskWithPrompt() requires AI processing that the local FileStorage adapter cannot perform. Expansion of a task into subtasks must be computed by client-side AI logic (or an AI-enabled backend); the file adapter only supports persisting the expanded result via updateTask().

Source

Thrown at packages/tm-core/src/modules/storage/adapters/file-storage/file-storage.ts:442

				'Client-side AI logic must process the prompt before calling updateTask().'
		);
	}

	/**
	 * Expand task into subtasks with AI-powered generation
	 * For file storage, this should NOT be called - client must handle AI processing first
	 */
	async expandTaskWithPrompt(
		_taskId: string,
		_tag?: string,
		_options?: {
			numSubtasks?: number;
			useResearch?: boolean;
			additionalContext?: string;
			force?: boolean;
		}
	): Promise<void> {
		throw new Error(
			'File storage does not support expandTaskWithPrompt. ' +
				'Client-side AI logic must process the expansion before calling updateTask().'
		);
	}

	/**
	 * Update task or subtask status by ID - handles file storage logic with parent/subtask relationships
	 */
	async updateTaskStatus(
		taskId: string,
		newStatus: TaskStatus,
		tag?: string
	): Promise<UpdateStatusResult> {
		const tasks = await this.loadTasks(tag);

		// Check if this is a subtask (contains a dot)
		if (taskId.includes('.')) {
			return this.updateSubtaskStatusInFile(tasks, taskId, newStatus, tag);

View on GitHub (pinned to c0c98d367c)

Solutions

  1. Gate the call behind an adapter-capability check
  2. Generate subtasks via your own AI provider client-side, then persist with updateTask() including the new subtasks
  3. Choose a storage adapter that supports prompt-based expansion
  4. Catch the error and route to a manual expansion workflow

Example fix

// before
await storage.expandTaskWithPrompt('3', 'break into steps', { numSubtasks: 4 });
// after
const subtasks = await aiProvider.expandTask('3', 'break into steps', 4);
const task = tasks.find((t) => t.id === 3);
await storage.updateTask('3', { ...task, subtasks });
Defensive patterns

Strategy: fallback

Validate before calling

function supportsPromptExpansion(s: unknown): boolean {
  return !(s instanceof FileStorage); // FileStorage always throws for expandTaskWithPrompt
}
if (!supportsPromptExpansion(storage)) { /* expand client-side */ }

Type guard

function isUnsupportedExpandError(e: unknown): e is Error {
  return e instanceof Error && e.message.includes('does not support expandTaskWithPrompt');
}

Try / catch

try {
  await storage.expandTaskWithPrompt(id, prompt, { numSubtasks: 4 });
} catch (e) {
  if (isUnsupportedExpandError(e)) {
    const subtasks = await aiProvider.expandTask(id, prompt, 4);
    const task = (await storage.loadTasks()).find((t) => String(t.id) === String(id));
    await storage.updateTask(id, { ...task, subtasks });
  } else throw e;
}

Prevention

When it happens

Trigger: Invoking storage.expandTaskWithPrompt() while using FileStorage, e.g. an 'expand' CLI/UI code path that assumes an AI-capable backend, or shared storage-abstraction code calling prompt methods unconditionally.

Common situations: Migrating from a remote/API storage adapter to file storage without updating expand flows, or automated scripts calling the expansion API on a purely local setup.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of eyaltoledano/claude-task-master@c0c98d367c (2026-08-29). Data as JSON: /api/errors/e01933988676e2c1. Report an issue: GitHub.