eyaltoledano/claude-task-master · error
MISSING_TARGET_TAG
MISSING_TARGET_TAG
Error message
Target tag is required for cross-tag moves
What it means
MISSING_TARGET_TAG is a validation error from moveTaskCrossTagDirect when the `targetTag` argument is absent/falsy. The function needs a destination tag to move the task into. Returned as a structured success:false response.
Source
Thrown at mcp-server/src/core/direct-functions/move-task-cross-tag.js:59
};
}
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,
error: {
message: `Source and target tags are the same ("${args.sourceTag}")`,
code: 'SAME_SOURCE_TARGET_TAG',
suggestions: [
'Use different tags for cross-tag moves',
'Use within-tag move: task-master move --from=<id> --to=<id> --tag=<tag>',
'Check available tags: task-master tags'
]
}
};View on GitHub (pinned to c0c98d367c)
Solutions
- Provide `targetTag` with the destination tag, e.g. targetTag: 'in-progress'.
- Run `task-master tags` to confirm the destination tag exists (create it first if needed).
- Ensure your CLI command passes the target tag flag.
Example fix
// before
await moveTaskCrossTagDirect({ sourceIds: '5', sourceTag: 'backlog' }, log);
// after
await moveTaskCrossTagDirect({ sourceIds: '5', sourceTag: 'backlog', targetTag: 'in-progress' }, log); Defensive patterns
Strategy: validation
Validate before calling
if (!args.targetTag) {
throw new Error('targetTag is required for cross-tag moves');
}
const tags = execSync('task-master tags').toString();
if (!tags.includes(args.targetTag)) {
throw new Error(`Unknown targetTag: ${args.targetTag}`);
} Type guard
function hasTargetTag(args) {
return typeof args?.targetTag === 'string' && args.targetTag.trim().length > 0;
} Try / catch
const resp = await moveTaskCrossTagDirect(args, log);
if (!resp.success && resp.error.code === 'MISSING_TARGET_TAG') {
throw new Error('Add targetTag: the destination tag for the move');
} Prevention
- Confirm the destination tag exists via `task-master tags` before moving.
- Never assume a default target tag — always pass it explicitly.
- For LLM callers, mark targetTag required in the tool input schema.
When it happens
Trigger: Invoking the move-task tool with sourceIds and sourceTag but no targetTag — e.g. { sourceIds: '5', sourceTag: 'backlog' } — triggers the guard at move-task-cross-tag.js:59.
Common situations: Callers assume the tool defaults to a 'done' or active tag; truncated tool arguments from an LLM; CLI invocations missing the --to-tag/--target-tag flag.
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/0b0b4dfec6e98535.
Report an issue: GitHub.