{"record":{"id":"c5d993a223f7a04b","repo":"eyaltoledano/claude-task-master","slug":"missing-source-tag","errorCode":"MISSING_SOURCE_TAG","errorMessage":"Source tag is required for cross-tag moves","messagePattern":"Source tag is required for cross-tag moves","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"mcp-server/src/core/direct-functions/move-task-cross-tag.js","lineNumber":49,"sourceCode":"\tlog.info(`moveTaskCrossTagDirect called with args: ${JSON.stringify(args)}`);\n\n\t// Validate required parameters\n\tif (!args.sourceIds) {\n\t\treturn {\n\t\t\tsuccess: false,\n\t\t\terror: {\n\t\t\t\tmessage: 'Source IDs are required',\n\t\t\t\tcode: 'MISSING_SOURCE_IDS'\n\t\t\t}\n\t\t};\n\t}\n\n\tif (!args.sourceTag) {\n\t\treturn {\n\t\t\tsuccess: false,\n\t\t\terror: {\n\t\t\t\tmessage: 'Source tag is required for cross-tag moves',\n\t\t\t\tcode: 'MISSING_SOURCE_TAG'\n\t\t\t}\n\t\t};\n\t}\n\n\tif (!args.targetTag) {\n\t\treturn {\n\t\t\tsuccess: false,\n\t\t\terror: {\n\t\t\t\tmessage: 'Target tag is required for cross-tag moves',\n\t\t\t\tcode: 'MISSING_TARGET_TAG'\n\t\t\t}\n\t\t};\n\t}\n\n\t// Validate that source and target tags are different\n\tif (args.sourceTag === args.targetTag) {\n\t\treturn {\n\t\t\tsuccess: false,","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/eyaltoledano/claude-task-master/blob/c0c98d367c55296bfe69e65680625b6db437af02/mcp-server/src/core/direct-functions/move-task-cross-tag.js#L31-L67","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Add `sourceTag` naming the tag the task currently belongs to, e.g. sourceTag: 'backlog'.","Run `task-master tags` to list existing tags and pick the correct source tag.","If the move is within one tag, use the within-tag form instead: task-master move --from=<id> --to=<id> --tag=<tag>."],"exampleFix":"// before\nawait moveTaskCrossTagDirect({ sourceIds: '5', targetTag: 'done' }, log);\n// after\nawait moveTaskCrossTagDirect({ sourceIds: '5', sourceTag: 'in-progress', targetTag: 'done' }, log);","handlingStrategy":"validation","validationCode":"if (!args.sourceTag) {\n  throw new Error('sourceTag is required for cross-tag moves');\n}\nconst tags = execSync('task-master tags').toString();\nif (!tags.includes(args.sourceTag)) {\n  throw new Error(`Unknown sourceTag: ${args.sourceTag}`);\n}","typeGuard":"function hasSourceTag(args) {\n  return typeof args?.sourceTag === 'string' && args.sourceTag.trim().length > 0;\n}","tryCatchPattern":"const resp = await moveTaskCrossTagDirect(args, log);\nif (!resp.success && resp.error.code === 'MISSING_SOURCE_TAG') {\n  throw new Error('Add sourceTag: the tag the task currently lives in');\n}","preventionTips":["Run `task-master tags` first to confirm both source and target tag names.","Supply both sourceTag and targetTag together in every cross-tag move call.","For LLM callers, mark sourceTag required in the tool input schema."],"tags":["mcp","validation","missing-parameter","tags","move-task"],"backgroundTag":"missing-required-parameter","analyzedSha":"c0c98d367c55296bfe69e65680625b6db437af02","analyzedAt":"2026-08-29T02:56:26.071Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}