eyaltoledano/claude-task-master · error

MISSING_SOURCE_TAG

MISSING_SOURCE_TAG

Error message

Source tag is required for cross-tag moves

What it means

MISSING_SOURCE_TAG is a validation error from moveTaskCrossTagDirect when the `sourceTag` argument is absent/falsy. A cross-tag move must know which tag the task currently lives in. Returned as a structured success:false response, not a thrown exception.

Source

Thrown at mcp-server/src/core/direct-functions/move-task-cross-tag.js:49

	log.info(`moveTaskCrossTagDirect called with args: ${JSON.stringify(args)}`);

	// Validate required parameters
	if (!args.sourceIds) {
		return {
			success: false,
			error: {
				message: 'Source IDs are required',
				code: 'MISSING_SOURCE_IDS'
			}
		};
	}

	if (!args.sourceTag) {
		return {
			success: false,
			error: {
				message: 'Source tag is required for cross-tag moves',
				code: 'MISSING_SOURCE_TAG'
			}
		};
	}

	if (!args.targetTag) {
		return {
			success: false,
			error: {
				message: 'Target tag is required for cross-tag moves',
				code: 'MISSING_TARGET_TAG'
			}
		};
	}

	// Validate that source and target tags are different
	if (args.sourceTag === args.targetTag) {
		return {
			success: false,

View on GitHub (pinned to c0c98d367c)

Solutions

  1. Add `sourceTag` naming the tag the task currently belongs to, e.g. sourceTag: 'backlog'.
  2. Run `task-master tags` to list existing tags and pick the correct source tag.
  3. If the move is within one tag, use the within-tag form instead: task-master move --from=<id> --to=<id> --tag=<tag>.

Example fix

// before
await moveTaskCrossTagDirect({ sourceIds: '5', targetTag: 'done' }, log);
// after
await moveTaskCrossTagDirect({ sourceIds: '5', sourceTag: 'in-progress', targetTag: 'done' }, log);
Defensive patterns

Strategy: validation

Validate before calling

if (!args.sourceTag) {
  throw new Error('sourceTag is required for cross-tag moves');
}
const tags = execSync('task-master tags').toString();
if (!tags.includes(args.sourceTag)) {
  throw new Error(`Unknown sourceTag: ${args.sourceTag}`);
}

Type guard

function hasSourceTag(args) {
  return typeof args?.sourceTag === 'string' && args.sourceTag.trim().length > 0;
}

Try / catch

const resp = await moveTaskCrossTagDirect(args, log);
if (!resp.success && resp.error.code === 'MISSING_SOURCE_TAG') {
  throw new Error('Add sourceTag: the tag the task currently lives in');
}

Prevention

When it happens

Trigger: Invoking the move-task tool with sourceIds and targetTag but no sourceTag — e.g. { sourceIds: '5', targetTag: 'done' } — triggers the guard at move-task-cross-tag.js:49.

Common situations: Users forget that cross-tag moves need both origin and destination tags; LLM clients supply only the target tag; migrating configs where sourceTag was renamed or dropped from the tool call.

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/c5d993a223f7a04b. Report an issue: GitHub.