Fission-AI/OpenSpec · error

Unknown tool ' '. Valid tools

Error message

Unknown tool '${toolId}'. Valid tools:
  ${validToolIds.join('\n  ')}

What it means

Generic guard in the InitCommand skill-generation loop: the reconciled tool id was not found in AI_TOOLS. Means a tool id reached this path that reconciledToolIds/alias resolution should have filtered out or that does not exist; the error prints the current list of tools with a skills directory.

Solutions

  1. Replace the unknown id with one from the listed valid tools
  2. Update OpenSpec if the tool was recently added and your build is stale
  3. Re-run init with a corrected --tools list
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/core/init.ts:808 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Fission-AI/OpenSpec@6926ccb18a (2026-08-25). Data as JSON: /api/errors/590bfc379d975d67. Report an issue: GitHub.

Appendix: source

Thrown at src/core/init.ts:808

          return index === firstSharedIndex && sharedTargetOwner ? [sharedTargetOwner] : [];
        })
      : toolIds;
    if (
      reconciledToolIds.length !== toolIds.length ||
      reconciledToolIds.some((toolId, index) => toolId !== toolIds[index])
    ) {
      console.log(
        chalk.dim(
          `Codex, Zed, and agents share .agents/skills; writing one tree for ${sharedTargetOwner}.`
        )
      );
    }

    for (const toolId of reconciledToolIds) {
      const tool = AI_TOOLS.find((t) => t.value === toolId);
      if (!tool) {
        const validToolIds = getToolsWithSkillsDir();
        throw new Error(
          `Unknown tool '${toolId}'. Valid tools:\n  ${validToolIds.join('\n  ')}`
        );
      }

      if (!toolSupportsSkills(tool)) {
        const validToolsWithSkills = getToolsWithSkillsDir();
        throw new Error(
          `Tool '${toolId}' does not support skill generation.\nTools with skill generation support:\n  ${validToolsWithSkills.join('\n  ')}`
        );
      }

      const preState = toolStates.get(tool.value);
      const skillsPath = resolveToolSkillsDir(projectPath, tool);
      const isGlobalSkillTarget = hasGlobalSkillTarget(tool);
      validatedTools.push({
        value: tool.value,
        name: tool.name,
        skillsDir: tool.skillsDir,

View on GitHub (pinned to 6926ccb18a)