{"record":{"id":"bace3e8dd51d94ef","repo":"Fission-AI/OpenSpec","slug":"invalid-tool-s-invalidtokens-join-avai","errorCode":null,"errorMessage":"Invalid tool(s): ${invalidTokens.join(', ')}. Available values: ${availableList}","messagePattern":"Invalid tool\\(s\\): (.+?)\\. Available values: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/init.ts","lineNumber":749,"sourceCode":"      throw new Error(\n        'The --tools option requires at least one tool ID when not using \"all\" or \"none\".'\n      );\n    }\n\n    // Retired ids resolve to their current tool, so a rebrand does not break\n    // an existing `--tools windsurf` in someone's setup script.\n    const normalizedTokens = tokens.map((token) => resolveToolIdAlias(token.toLowerCase()));\n\n    if (normalizedTokens.some((token) => token === 'all' || token === 'none')) {\n      throw new Error('Cannot combine reserved values \"all\" or \"none\" with specific tool IDs.');\n    }\n\n    const invalidTokens = tokens.filter(\n      (_token, index) => !availableSet.has(normalizedTokens[index])\n    );\n\n    if (invalidTokens.length > 0) {\n      throw new Error(\n        `Invalid tool(s): ${invalidTokens.join(', ')}. Available values: ${availableList}`\n      );\n    }\n\n    // Deduplicate while preserving order\n    const deduped: string[] = [];\n    for (const token of normalizedTokens) {\n      if (!deduped.includes(token)) {\n        deduped.push(token);\n      }\n    }\n\n    return deduped;\n  }\n\n  private validateTools(\n    toolIds: string[],\n    toolStates: Map<string, ToolSkillStatus>,","sourceCodeStart":731,"sourceCodeEnd":767,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/init.ts#L731-L767","documentation":"Error \"Invalid tool(s): ${invalidTokens.join(', ')}. Available values: ${availableList}\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/core/init.ts:749 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"}