affaan-m/ECC · error
Unknown install target adapter
Error message
Unknown install target adapter: ${targetOrAdapterId} What it means
getInstallTargetAdapter looks up an adapter in the ADAPTERS registry by asking each candidate supports(targetOrAdapterId). If no adapter claims the id, the registry throws, because every subsequent step (validate, resolveRoot, planOperations) depends on an adapter. This guards against typos or unregistered install targets (e.g. a new harness without an adapter module registered).
Solutions
- Use a supported target id — log or list ADAPTERS ids and match the exact string.
- Fix the typo or casing in the target/adapter identifier you pass.
- If the target is new, register its adapter module in ADAPTERS with a supports() implementation.
- Validate target ids at the CLI boundary before reaching the registry.
Example fix
// before
planInstallTargetScaffold({ target: 'kimi-mcp' });
// after
planInstallTargetScaffold({ target: 'kimi' }); Defensive patterns
Strategy: type-guard
Validate before calling
const SUPPORTED = ['claude', 'codex', 'cursor', 'opencode', 'kimi', 'antigravity'];
if (!SUPPORTED.includes(targetOrAdapterId)) throw new Error(`Unsupported target: ${targetOrAdapterId}`); Type guard
const isKnownTarget = (id) => typeof id === 'string' && ADAPTERS.some(a => a.supports(id));
Try / catch
try {
const adapter = getInstallTargetAdapter(target);
} catch (e) {
if (e.message.startsWith('Unknown install target adapter')) {
console.error(`Unknown target '${target}'. Supported: ${listTargetIds().join(', ')}`);
}
throw e;
} Prevention
- Keep target ids centralized in a constant list and validate CLI flags against it.
- Never construct target ids dynamically from unvalidated config strings.
- When registering a new adapter, add its id to docs and the CLI help output.
When it happens
Trigger: Calling getInstallTargetAdapter('claude-code') or planInstallTargetScaffold({ target: '...' }) with an id no adapter supports; passing an adapter object's wrong property; typo'd target name; calling before adapter modules are loaded/registered.
Common situations: Typo in a CLI --target flag value; adding a new install target but forgetting to register it in ADAPTERS; version change where a target id was renamed (e.g. 'codex' to 'openai-codex'); tests constructing ids dynamically from config files.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- Another ECC process is updating Claude settings
- At least one guided harness must be selected
- ${blockingIssues.map(issue => issue.message).join('; ')}
- Cannot adapt Antigravity agent
- Install-state checkpoint also failed
AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16).
Data as JSON: /api/errors/a59b8e6a88738303.
Report an issue: GitHub.
Appendix: source
Thrown at scripts/lib/install-targets/registry.js:44
opencodeHome,
openclawHome,
codebuddyProject,
joycodeProject,
kimiProject,
qwenHome,
zedProject,
adalProject,
]);
function listInstallTargetAdapters() {
return ADAPTERS.slice();
}
function getInstallTargetAdapter(targetOrAdapterId) {
const adapter = ADAPTERS.find(candidate => candidate.supports(targetOrAdapterId));
if (!adapter) {
throw new Error(`Unknown install target adapter: ${targetOrAdapterId}`);
}
return adapter;
}
function planInstallTargetScaffold(options = {}) {
const adapter = getInstallTargetAdapter(options.target);
const modules = Array.isArray(options.modules) ? options.modules : [];
const exemptValidationCodes = new Set(Array.isArray(options.exemptValidationCodes) ? options.exemptValidationCodes : []);
const planningInput = {
repoRoot: options.repoRoot,
projectRoot: options.projectRoot || options.repoRoot,
homeDir: options.homeDir,
env: resolveInvocationEnvironment(options),
};
const validationIssues = adapter.validate(planningInput);
const blockingIssues = validationIssues.filter(issue => (
issue.severity === 'error' && !exemptValidationCodes.has(issue.code)View on GitHub (pinned to 8321021c54)