eyaltoledano/claude-task-master · error

MISSING_PROMPT

MISSING_PROMPT

Error message

No prompt or metadata specified. Please provide information to append or metadata to update.

What it means

updateSubtaskByIdDirect requires at least one of `prompt` (text appended to the subtask's details) or `metadata` (structured fields to update). When both are absent it returns MISSING_PROMPT because there is nothing to change. This mirrors validation done at the MCP tool layer but is repeated defensively in the direct function.

Source

Thrown at mcp-server/src/core/direct-functions/update-subtask-by-id.js:72

		// In file storage, subtask IDs must be in format "parentId.subtaskId"
		// The core function handles storage-specific validation
		if (!id || typeof id !== 'string' || !id.trim()) {
			const errorMessage = 'Subtask ID cannot be empty.';
			logWrapper.error(errorMessage);
			return {
				success: false,
				error: { code: 'INVALID_SUBTASK_ID', message: errorMessage }
			};
		}

		// At least prompt or metadata is required (validated in MCP tool layer)
		if (!prompt && !metadata) {
			const errorMessage =
				'No prompt or metadata specified. Please provide information to append or metadata to update.';
			logWrapper.error(errorMessage);
			return {
				success: false,
				error: { code: 'MISSING_PROMPT', message: errorMessage }
			};
		}

		const subtaskIdStr = String(id).trim();

		// Use the provided path
		const tasksPath = tasksJsonPath;
		const useResearch = research === true;

		log.info(
			`Updating subtask with ID ${subtaskIdStr} with prompt "${prompt || '(metadata-only)'}" and research: ${useResearch}`
		);

		const wasSilent = isSilentMode();
		if (!wasSilent) {
			enableSilentMode();
		}

View on GitHub (pinned to c0c98d367c)

Solutions

  1. Provide prompt with the text to append: { id: '5.2', prompt: 'Implemented retry logic; added tests.' }
  2. Or provide metadata for structured updates: { id: '5.2', metadata: { status: 'done' } }.
  3. If you truly want no content change, this is the wrong tool — use set-task-status instead.

Example fix

// before
await updateSubtask({ id: '5.2' });
// after
await updateSubtask({ id: '5.2', prompt: 'Added implementation notes and test results.' });
Defensive patterns

Strategy: validation

Validate before calling

if (!(typeof prompt === 'string' && prompt.trim()) && !(metadata && typeof metadata === 'object')) {
  throw new Error('Provide prompt (text to append) or metadata (fields to update)');
}

Type guard

function hasUpdatePayload(a) { return (typeof a.prompt === 'string' && a.prompt.trim().length > 0) || (a.metadata !== null && typeof a.metadata === 'object'); }

Prevention

When it happens

Trigger: Calling the tool with only an id, or with prompt: '' and metadata: null; a client that serializes only non-empty fields and drops an intentionally empty prompt.

Common situations: Agents intending to 'touch' or re-check a subtask without content; refactors that renamed the prompt field to something else so it no longer maps.

Understand the failure class

Background: Missing required parameter errors: what 'X is required' and 'the required X param is missing' mean, and how to fix them — this error's family across 27 libraries.

Related errors


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