eyaltoledano/claude-task-master · error
SAME_SOURCE_TARGET_TAG
SAME_SOURCE_TARGET_TAG
Error message
Source and target tags are the same ("${args.sourceTag}") What it means
SAME_SOURCE_TARGET_TAG is a validation error raised when sourceTag and targetTag are identical. That would not be a cross-tag move, so the function rejects it and suggests using the within-tag move form instead. Includes actionable suggestions in the error payload.
Source
Thrown at mcp-server/src/core/direct-functions/move-task-cross-tag.js:70
}
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'
]
}
};
}
try {
// Find tasks.json path if not provided
let tasksPath = args.tasksJsonPath || args.file;
if (!tasksPath) {
if (!args.projectRoot) {
return {
success: false,
error: {
message:View on GitHub (pinned to c0c98d367c)
Solutions
- Set targetTag to a tag different from sourceTag.
- If you actually want to reorder/reposition within the same tag, use the within-tag move: task-master move --from=<id> --to=<id> --tag=<tag>.
- Run `task-master tags` to confirm the intended destination tag name.
Example fix
// before
await moveTaskCrossTagDirect({ sourceIds: '5', sourceTag: 'backlog', targetTag: 'backlog' }, log);
// after
await moveTaskCrossTagDirect({ sourceIds: '5', sourceTag: 'backlog', targetTag: 'in-progress' }, log); Defensive patterns
Strategy: validation
Validate before calling
if (args.sourceTag && args.targetTag && args.sourceTag === args.targetTag) {
throw new Error('sourceTag and targetTag must differ; use within-tag move for reordering');
} Type guard
function isCrossTagMove(args) {
return typeof args?.sourceTag === 'string' && typeof args?.targetTag === 'string' && args.sourceTag !== args.targetTag;
} Try / catch
const resp = await moveTaskCrossTagDirect(args, log);
if (!resp.success && resp.error.code === 'SAME_SOURCE_TARGET_TAG') {
// resp.error.suggestions lists the within-tag alternative
throw new Error(resp.error.suggestions.join(' | '));
} Prevention
- Validate sourceTag !== targetTag in the calling code before invoking the tool.
- Use `task-master move --from=<id> --to=<id> --tag=<tag>` when you intend a within-tag reorder.
- Derive tag names from `task-master tags` output rather than hardcoding strings twice.
When it happens
Trigger: Calling moveTaskCrossTagDirect with sourceTag === targetTag — e.g. { sourceIds: '5', sourceTag: 'backlog', targetTag: 'backlog' } — triggers the check at move-task-cross-tag.js:70.
Common situations: Copy-paste of tag names into both fields, LLM clients echoing the same tag for both arguments, scripts computing tags dynamically that end up equal.
Related errors
- MISSING_SOURCE_TAG
- MISSING_TARGET_TAG
- INVALID_SOURCE_TAG
- MISSING_SOURCE_IDS
- Generated object does not match schema: ${validationError.me
AI-assisted analysis of eyaltoledano/claude-task-master@c0c98d367c (2026-08-29).
Data as JSON: /api/errors/fef5d54e6f9a3a99.
Report an issue: GitHub.