{"record":{"id":"2e44485f39c02fc9","repo":"eyaltoledano/claude-task-master","slug":"authcheck-error","errorCode":null,"errorMessage":"${authCheck.error}","messagePattern":"\\$\\{authCheck\\.error\\}","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"apps/cli/src/commands/loop.command.ts","lineNumber":151,"sourceCode":"\t\t\t\tverbose: options.verbose ?? false,\n\t\t\t\tbrief: briefName,\n\t\t\t\tcallbacks: this.createOutputCallbacks()\n\t\t\t};\n\n\t\t\tconst result = await this.tmCore.loop.run(config);\n\t\t\tthis.displayResult(result);\n\t\t} catch (error: unknown) {\n\t\t\tdisplayError(error, { skipExit: true });\n\t\t\tprocess.exit(1);\n\t\t}\n\t}\n\n\tprivate handleSandboxAuth(): void {\n\t\tconsole.log(chalk.dim('Checking sandbox auth...'));\n\t\tconst authCheck = this.tmCore.loop.checkSandboxAuth();\n\n\t\tif (authCheck.error) {\n\t\t\tthrow new Error(authCheck.error);\n\t\t}\n\n\t\tif (authCheck.ready) {\n\t\t\tconsole.log(chalk.green('✓ Sandbox ready'));\n\t\t\treturn;\n\t\t}\n\n\t\tconsole.log(\n\t\t\tchalk.yellow(\n\t\t\t\t'Sandbox needs authentication. Starting interactive session...'\n\t\t\t)\n\t\t);\n\t\tconsole.log(chalk.dim('Please complete auth, then Ctrl+C to continue.\\n'));\n\n\t\tconst authResult = this.tmCore.loop.runInteractiveAuth();\n\t\tif (!authResult.success) {\n\t\t\tthrow new Error(authResult.error || 'Interactive authentication failed');\n\t\t}","sourceCodeStart":133,"sourceCodeEnd":169,"githubUrl":"https://github.com/eyaltoledano/claude-task-master/blob/c0c98d367c55296bfe69e65680625b6db437af02/apps/cli/src/commands/loop.command.ts#L133-L169","documentation":"createTagFromBranch runs isValidBranchForTag and throws when the branch name cannot be sanitized into a valid tag name (e.g. it would reduce to empty or contain only invalid characters). Tag names must satisfy the [a-zA-Z0-9_-] constraint, so some git branch names are unusable as-is.","triggerScenarios":"Calling createTagFromBranch with branch names like 'refs/heads/feature/x' or names composed of characters that sanitize away entirely, leaving no valid tag name.","commonSituations":"Working on branches with slashes (GitFlow names) or dots/special characters; automating tag creation from CI where branch names include 'refs/heads/' prefixes.","solutions":["Pre-sanitize: strip 'refs/heads/' and replace '/' and '.' with '-' before calling","Run sanitizeBranchNameForTag(branchName) yourself and pass a name that passes isValidBranchForTag","Create the tag manually with createTag using a hand-picked valid name"],"exampleFix":"// before\nawait createTagFromBranch(tasksPath, 'refs/heads/feature/login');\n// after\nconst name = 'refs/heads/feature/login'.replace('refs/heads/', '').replace(/[^a-zA-Z0-9_-]/g, '-');\nawait createTagFromBranch(tasksPath, name); // 'feature-login'","handlingStrategy":"validation","validationCode":"const sanitized = branchName.replace(/^refs\\/heads\\//, '').replace(/[^a-zA-Z0-9_-]/g, '-').replace(/^-+|-+$/g, '');\nif (!sanitized) throw new Error(`Branch \"${branchName}\" yields no valid tag name`);","typeGuard":null,"tryCatchPattern":"try {\n  await createTagFromBranch(tasksPath, branchName);\n} catch (e) {\n  if (e.message.includes('cannot be converted to a valid tag name')) {\n    const safe = branchName.replace(/[^a-zA-Z0-9_-]/g, '-');\n    return createTagFromBranch(tasksPath, safe);\n  }\n  throw e;\n}","preventionTips":["Pre-sanitize slashes/dots in branch names from CI (strip refs/heads/)","Test tag creation with the exact branch naming convention your team uses","Prefer creating tags with explicit valid names in automation"],"tags":["validation","git","tag-management"],"backgroundTag":"invalid-tag-name","analyzedSha":"c0c98d367c55296bfe69e65680625b6db437af02","analyzedAt":"2026-08-29T02:56:26.071Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}