{"record":{"id":"9d43a50414a23da2","repo":"Fission-AI/OpenSpec","slug":"openspec-setup-failed-for-results-failedtools-m","errorCode":null,"errorMessage":"OpenSpec setup failed for: ${results.failedTools.map((tool) => tool.name).join(', ')}","messagePattern":"OpenSpec setup failed for: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/init.ts","lineNumber":339,"sourceCode":"    // and the alternate-agent path can remove a managed file — so list only\n    // managed files that exist, and separately flag any left-untouched ones.\n    const copilotSucceeded = [...results.createdTools, ...results.refreshedTools].some(\n      (tool) => tool.value === 'github-copilot'\n    );\n    const wroteCloud = copilotDecision.write && copilotSucceeded;\n    const copilotPresent = wroteCloud ? await listManagedCloudFiles(projectPath) : [];\n    const copilotCollisions = wroteCloud ? await findUnmanagedCloudFiles(projectPath) : [];\n\n    // Display success message\n    this.displaySuccessMessage(projectPath, validatedTools, results, configStatus, {\n      write: copilotDecision.write,\n      skippedUndecided: copilotDecision.skippedUndecided,\n      present: copilotPresent,\n      collisions: copilotCollisions,\n      removed: copilotRemoved,\n    });\n    if (results.failedTools.length > 0) {\n      throw new Error(\n        `OpenSpec setup failed for: ${results.failedTools.map((tool) => tool.name).join(', ')}`\n      );\n    }\n  }\n\n  // ═══════════════════════════════════════════════════════════\n  // VALIDATION & SETUP\n  // ═══════════════════════════════════════════════════════════\n\n  private async validate(\n    projectPath: string,\n    openspecPath: string\n  ): Promise<boolean> {\n    const extendMode = await FileSystemUtils.directoryExists(openspecPath);\n\n    // Check write permissions\n    if (!(await FileSystemUtils.ensureWritePermissions(projectPath))) {\n      throw new Error(`Insufficient permissions to write to ${projectPath}`);","sourceCodeStart":321,"sourceCodeEnd":357,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/init.ts#L321-L357","documentation":"Error \"OpenSpec setup failed for: ${results.failedTools.map((tool) => tool.name).join(', ')}\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/core/init.ts:339 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6926ccb18afa4ff621112813e9968334576ee11a","analyzedAt":"2026-08-25T12:29:45.729Z","schemaVersion":2},"datasetVersion":"2026-08-25T16:17:27.014Z"}