{"record":{"id":"a32cdf7b0e1f013c","repo":"eyaltoledano/claude-task-master","slug":"cross-tag-dependency-conflicts","errorCode":"CROSS_TAG_DEPENDENCY_CONFLICTS","errorMessage":"Cannot move tasks: ${crossTagDependencies.length} cross-tag dependency conflicts found","messagePattern":"Cannot move tasks: (.+?) cross-tag dependency conflicts found","errorType":"exception","errorClass":"MoveTaskError","httpStatus":null,"severity":"error","filePath":"scripts/modules/task-manager/move-task.js","lineNumber":800,"sourceCode":"\t\t\t\t\treturn true;\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tlog(\n\t\t\t\t'warn',\n\t\t\t\t`Removed ${crossTagDependencies.length} cross-tag dependencies`\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\ttasksToMove: taskIds,\n\t\t\t\tdependencyResolution: {\n\t\t\t\t\ttype: 'ignored-dependencies',\n\t\t\t\t\tconflicts: crossTagDependencies\n\t\t\t\t}\n\t\t\t};\n\t\t} else {\n\t\t\t// Block move and show error\n\t\t\tthrow new MoveTaskError(\n\t\t\t\tMOVE_ERROR_CODES.CROSS_TAG_DEPENDENCY_CONFLICTS,\n\t\t\t\t`Cannot move tasks: ${crossTagDependencies.length} cross-tag dependency conflicts found`,\n\t\t\t\t{\n\t\t\t\t\tconflicts: crossTagDependencies,\n\t\t\t\t\tsourceTag,\n\t\t\t\t\ttargetTag,\n\t\t\t\t\ttaskIds\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t}\n\n\treturn {\n\t\ttasksToMove: taskIds,\n\t\tdependencyResolution: { type: 'no-conflicts' }\n\t};\n}\n","sourceCodeStart":782,"sourceCodeEnd":818,"githubUrl":"https://github.com/eyaltoledano/claude-task-master/blob/c0c98d367c55296bfe69e65680625b6db437af02/scripts/modules/task-manager/move-task.js#L782-L818","documentation":"This MoveTaskError with code CROSS_TAG_DEPENDENCY_CONFLICTS is thrown by the dependency resolution step during cross-tag moves when tasks being moved depend on tasks that will remain in the source tag (or vice versa), and the chosen resolution policy is to block rather than ignore. The error carries a conflicts payload listing the offending dependency edges, sourceTag, and targetTag so callers can present or resolve them.","triggerScenarios":"Calling moveTasksBetweenTags where a task in tasksToMove has a depends-on relationship with a task not included in the move, and dependencyResolution is set to 'error'/'block' (the default strict mode) instead of 'ignore' or a resolicy that rewrites dependencies.","commonSituations":"Moving one feature task while its prerequisite stays behind; bulk moves selecting a subset of a dependency chain; teams unaware tasks across tags cannot depend on each other; CI scripts that move tasks without specifying a dependency policy.","solutions":["Include the dependent tasks in the same move (move the whole dependency chain together).","Pass an explicit dependency resolution option to auto-rewrite or drop cross-tag dependencies, e.g. dependencyResolution: 'ignore' or 'remove', if losing the edge is acceptable.","Inspect error.conflicts to identify the exact dependency edges, then resolve manually before moving.","Update the task's dependencies to point at equivalents in the target tag, then retry.","If strictness is unintended, change the move call's dependency policy rather than the data."],"exampleFix":"// before\nawait moveTasksBetweenTags(tasksPath, ['7'], 'backlog', 'done'); // task 7 depends on task 5 in backlog\n// after\nawait moveTasksBetweenTags(tasksPath, ['7'], 'done', {\n  dependencyResolution: 'ignore' // or move tasks ['5','7'] together\n});","handlingStrategy":"try-catch","validationCode":"const data = JSON.parse(fs.readFileSync(tasksPath, 'utf8'));\nconst moving = new Set(taskIds.map(Number));\nconst conflicts = [];\nfor (const t of data[sourceTag].tasks) {\n  if (moving.has(t.id)) {\n    for (const d of t.dependencies ?? []) {\n      if (!moving.has(d)) conflicts.push({ taskId: t.id, dependsOn: d });\n    }\n  }\n}\nif (conflicts.length) throw new Error(`Resolve ${conflicts.length} cross-tag deps first.`);","typeGuard":null,"tryCatchPattern":"try {\n  await moveTasksBetweenTags(tasksPath, taskIds, from, to);\n} catch (e) {\n  if (e.code === 'CROSS_TAG_DEPENDENCY_CONFLICTS') {\n    const chain = [...new Set(e.details?.conflicts\n      ?.flatMap(c => [c.taskId, c.dependsOn ?? c.dependencyId]) ?? [])];\n    await moveTasksBetweenTags(tasksPath, chain, from, to);\n  } else throw e;\n}","preventionTips":["Always move complete dependency chains, not isolated tasks.","Set an explicit dependencyResolution policy in automation instead of relying on the strict default.","Read error.details.conflicts to see exactly which edges broke.","Audit dependencies across tags before large migrations."],"tags":["task-management","dependencies","tags","move-task"],"backgroundTag":"cross-tag-dependency-conflict","analyzedSha":"c0c98d367c55296bfe69e65680625b6db437af02","analyzedAt":"2026-08-29T02:56:26.071Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}