{"record":{"id":"e6542d97da96bf30","repo":"eyaltoledano/claude-task-master","slug":"failed-to-get-brief-creation-url","errorCode":null,"errorMessage":"Failed to get brief creation URL","messagePattern":"Failed to get brief creation URL","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"apps/cli/src/commands/briefs.command.ts","lineNumber":635,"sourceCode":"\t\t\t// Check authentication\n\t\t\tif (!(await this.checkAuth())) {\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\n\t\t\t// Use the bridge to redirect to web UI\n\t\t\tconst remoteResult = await tryAddTagViaRemote({\n\t\t\t\ttagName: name || 'new-brief',\n\t\t\t\tprojectRoot: process.cwd(),\n\t\t\t\treport: (level: LogLevel, ...args: unknown[]) => {\n\t\t\t\t\tconst message = args[0] as string;\n\t\t\t\t\tif (level === 'error') ui.displayError(message);\n\t\t\t\t\telse if (level === 'warn') ui.displayWarning(message);\n\t\t\t\t\telse if (level === 'info') ui.displayInfo(message);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (!remoteResult) {\n\t\t\t\tthrow new Error('Failed to get brief creation URL');\n\t\t\t}\n\n\t\t\tthis.setLastResult({\n\t\t\t\tsuccess: remoteResult.success,\n\t\t\t\taction: 'create',\n\t\t\t\tmessage: remoteResult.message\n\t\t\t});\n\n\t\t\tif (!remoteResult.success) {\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tui.displayErrorBox(`Failed to create brief: ${(error as Error).message}`);\n\t\t\tthis.setLastResult({\n\t\t\t\tsuccess: false,\n\t\t\t\taction: 'create',\n\t\t\t\tmessage: (error as Error).message\n\t\t\t});","sourceCodeStart":617,"sourceCodeEnd":653,"githubUrl":"https://github.com/eyaltoledano/claude-task-master/blob/c0c98d367c55296bfe69e65680625b6db437af02/apps/cli/src/commands/briefs.command.ts#L617-L653","documentation":"copyTag reads the tasks file with readJSON and throws this error when the read returns null/undefined, meaning the tasks file is missing, unreadable, or unparseable at the given path. It aborts before performing any tag mutation to avoid creating data in a bogus location.","triggerScenarios":"Calling copyTag with a tasksPath that doesn't exist, points to a directory, or contains malformed JSON that readJSON cannot parse.","commonSituations":"Running copy-tag before `task-master init`/any task creation; wrong --file path passed to the CLI; tasks.json corrupted by a failed edit or merge conflict.","solutions":["Verify tasks.json exists at the given path (run task-master init or create a task first)","Correct the tasksPath / run from the project root","Restore or fix malformed JSON in tasks.json (check for merge conflict markers)"],"exampleFix":"// before\nawait copyTag('/wrong/path/tasks.json', 'a', 'b');\n// after\nawait copyTag(path.join(projectRoot, '.taskmaster', 'tasks', 'tasks.json'), 'a', 'b');","handlingStrategy":"validation","validationCode":"const fs = require('fs');\nif (!fs.existsSync(tasksPath)) {\n  throw new Error('tasks.json missing at ' + tasksPath);\n}\nJSON.parse(fs.readFileSync(tasksPath, 'utf8')); // throws if malformed","typeGuard":null,"tryCatchPattern":"try {\n  await copyTag(tasksPath, source, target);\n} catch (e) {\n  if (e.message.startsWith('Could not read tasks file')) {\n    throw new Error('Initialize tasks file first: task-master init');\n  }\n  throw e;\n}","preventionTips":["Run from the project root so the default tasks path resolves","Verify tasks.json exists and parses before any tag operation","Keep tasks.json out of conflicted merge states"],"tags":["filesystem","io","tag-management"],"backgroundTag":"file-not-found","analyzedSha":"c0c98d367c55296bfe69e65680625b6db437af02","analyzedAt":"2026-08-29T02:56:26.071Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}