Fission-AI/OpenSpec · error
Invalid tool(s): . Available values
Error message
Invalid tool(s): ${invalidTokens.join(', ')}. Available values: ${availableList} What it means
Thrown by resolveToolsArg when one or more tokens do not match any known tool id (after alias resolution of retired ids). Lists the offending tokens and all available values (including 'all'/'none') so scripts using stale or misspelled tool names fail loudly with the valid choices.
Solutions
- Correct the misspelled tool ids using the listed valid values
- Remove retired tool ids or replace them with their current names
- Re-run with the fixed --tools list
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/core/init.ts:749 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/bace3e8dd51d94ef.
Report an issue: GitHub.
Appendix: source
Thrown at src/core/init.ts:749
throw new Error(
'The --tools option requires at least one tool ID when not using "all" or "none".'
);
}
// Retired ids resolve to their current tool, so a rebrand does not break
// an existing `--tools windsurf` in someone's setup script.
const normalizedTokens = tokens.map((token) => resolveToolIdAlias(token.toLowerCase()));
if (normalizedTokens.some((token) => token === 'all' || token === 'none')) {
throw new Error('Cannot combine reserved values "all" or "none" with specific tool IDs.');
}
const invalidTokens = tokens.filter(
(_token, index) => !availableSet.has(normalizedTokens[index])
);
if (invalidTokens.length > 0) {
throw new Error(
`Invalid tool(s): ${invalidTokens.join(', ')}. Available values: ${availableList}`
);
}
// Deduplicate while preserving order
const deduped: string[] = [];
for (const token of normalizedTokens) {
if (!deduped.includes(token)) {
deduped.push(token);
}
}
return deduped;
}
private validateTools(
toolIds: string[],
toolStates: Map<string, ToolSkillStatus>,View on GitHub (pinned to 6926ccb18a)