{"record":{"id":"515c4fc231c6ea98","repo":"eyaltoledano/claude-task-master","slug":"remote-tag-creation-failed","errorCode":null,"errorMessage":"Remote tag creation failed","messagePattern":"Remote tag creation failed","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/modules/task-manager/tag-management.js","lineNumber":73,"sourceCode":"\t\twarn: (...args) => log('warn', ...args),\n\t\terror: (...args) => log('error', ...args),\n\t\tdebug: (...args) => log('debug', ...args),\n\t\tsuccess: (...args) => log('success', ...args)\n\t};\n\n\t// Check if API storage should handle this via remote\n\tconst remoteResult = await tryAddTagViaRemote({\n\t\ttagName,\n\t\tprojectRoot: projectRoot || findProjectRoot(),\n\t\tisMCP: !!mcpLog,\n\t\toutputFormat,\n\t\treport: (level, ...args) => logFn[level](...args)\n\t});\n\n\t// If remote handled it, return the result\n\tif (remoteResult) {\n\t\tif (!remoteResult.success) {\n\t\t\tthrow new Error(remoteResult.message || 'Remote tag creation failed');\n\t\t}\n\t\tif (outputFormat === 'json') {\n\t\t\treturn remoteResult;\n\t\t}\n\t\t// For text output, the bridge already displayed the message\n\t\treturn remoteResult;\n\t}\n\n\t// Otherwise, continue with file-based logic below\n\ttry {\n\t\t// Validate tag name\n\t\tif (!tagName || typeof tagName !== 'string') {\n\t\t\tthrow new Error('Tag name is required and must be a string');\n\t\t}\n\n\t\t// Validate tag name format (alphanumeric, hyphens, underscores only)\n\t\tif (!/^[a-zA-Z0-9_-]+$/.test(tagName)) {\n\t\t\tthrow new Error(","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/eyaltoledano/claude-task-master/blob/c0c98d367c55296bfe69e65680625b6db437af02/scripts/modules/task-manager/tag-management.js#L55-L91","documentation":"createTag first delegates to a remote (API-backed) tag bridge. If the bridge returns a result with success=false, createTag throws either the bridge's message or the fallback 'Remote tag creation failed'. This indicates the tag was not created on the remote service.","triggerScenarios":"Creating a tag while connected to a remote (Hammer/API) backend when the remote rejects creation — e.g. auth failure, tag name conflict on the server, network errors surfaced by the bridge, or remote quota limits.","commonSituations":"Expired API credentials; offline/VPN issues while remote mode is configured; remote tag with the same name already exists; server-side validation rejecting the name.","solutions":["Read remoteResult.message from the thrown/caught error for the precise remote cause and address it (auth, conflict, etc.)","Re-authenticate with the remote service (check API key / 'task-master login')","Check network connectivity to the remote endpoint and retry","Verify the tag name does not already exist on the remote"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Before calling, verify remote connectivity/auth\nconst ok = await checkRemoteAuth(); // e.g. ping the API or 'task-master auth status'\nif (!ok) throw new Error('Remote unavailable — fix credentials/network before creating tags');","typeGuard":"function isSuccessfulRemoteResult(r) {\n  return Boolean(r) && r.success === true;\n}","tryCatchPattern":"try {\n  await createTag(tasksPath, name, { copyFromCurrent });\n} catch (err) {\n  if (err.message === 'Remote tag creation failed' || err.message.includes('remote')) {\n    console.error('Remote tag creation failed; check auth/network, then retry.');\n    await retry(() => createTag(tasksPath, name, { copyFromCurrent }), { tries: 3 });\n  } else throw err;\n}","preventionTips":["Keep API credentials fresh (re-login before long CI runs)","Check connectivity/VPN before remote-backed operations","Inspect the bridge's remoteResult.message — it usually names the exact remote cause","Confirm the remote tag name is unique before creating"],"tags":["remote","network","api"],"backgroundTag":"remote-operation-failed","analyzedSha":"c0c98d367c55296bfe69e65680625b6db437af02","analyzedAt":"2026-08-29T02:56:26.071Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}