EveryInc/compound-engineering-plugin · error · Error
Unknown target: ${targetName}
Error message
Unknown target: ${targetName} What it means
`install --to` must name a target registered in the shared `targets` registry (src/targets/index.ts: opencode, codex, pi, antigravity). If the name is not a key in that record, `run` throws this error before checking implementation status or writing any files.
Source
Thrown at src/commands/install.ts:158
piHome,
pluginName: plugin.manifest.name,
hasExplicitOutput,
})
const writeScope =
tool.name === "opencode" ? resolveOpenCodeWriteScope(hasExplicitOutput, undefined) : undefined
await handler.write(root, bundle, writeScope)
console.log(`Installed ${plugin.manifest.name} to ${tool.name} at ${root}`)
}
if (activeTargets.some((t) => t.name === "codex")) {
await stripCodexAgentsToolMap(codexHome)
}
return
}
const target = targets[targetName]
if (!target) {
throw new Error(`Unknown target: ${targetName}`)
}
if (!target.implemented) {
throw new Error(`Target ${targetName} is registered but not implemented yet.`)
}
const resolvedScope = validateScope(targetName, target, args.scope ? String(args.scope) : undefined)
const bundle = target.convert(plugin, options)
if (!bundle) {
throw new Error(`Target ${targetName} did not return a bundle.`)
}
const primaryOutputRoot = resolveTargetOutputRoot({
targetName,
outputRoot,
codexHome,
piHome,
pluginName: plugin.manifest.name,
hasExplicitOutput,View on GitHub (pinned to c9c10f8c75)
Solutions
- Use one of the registered install targets: --to opencode, codex, pi, or antigravity.
- Match case exactly — registry keys are lowercase.
- Confirm available targets with `install --help` or by reading `targets` in src/targets/index.ts.
- If the platform you want is cleanup-only (kiro, copilot, droid, qwen, windsurf), it has no installer; convert/install only supports the registered set.
Example fix
// before bun run src/index.ts install --to windsurf --plugin compound-engineering // Error: Unknown target: windsurf // after bun run src/index.ts install --to opencode --plugin compound-engineering
Defensive patterns
Strategy: validation
Validate before calling
import { targets } from "./src/targets/index"
const to = process.env.INSTALL_TARGET
if (!(to in targets)) {
throw new Error(`--to '${to}' is not an install target. Registered: ${Object.keys(targets).join(", ")}`)
} Type guard
function isInstallTarget(v: string): v is keyof typeof targets {
return v in targets
} Try / catch
try {
await install({ to: targetName, plugin })
} catch (e) {
if (e instanceof Error && e.message.startsWith("Unknown target:")) {
console.error(`${e.message} — install targets: opencode, codex, pi, antigravity`)
} else throw e
} Prevention
- Remember install/convert support fewer targets than cleanup; don't reuse cleanup target lists for install.
- Use lowercase exact registry keys.
- Derive the allowed list from Object.keys(targets) in scripts instead of maintaining a copy.
When it happens
Trigger: Running `install --to gemini`, `--to kiro`, `--to copilot`, or any misspelled/unknown target. Notably, the cleanup command supports more targets (kiro, copilot, droid, qwen, windsurf) than install — passing a cleanup-only target to install produces this error.
Common situations: Assuming every agent platform with a cleanup target also has an install target; typos or wrong casing; scripts written against a different version of the target registry; confusing `convert`/`install` target sets with `cleanup` target sets.
Related errors
- Unknown cleanup target: ${target}. Use one of: ${cleanupTarg
- Unknown permissions mode: ${permissions}
- Unknown target: ${targetName}
- Unknown permissions mode: ${permissions}
- Cleanup currently supports only the compound-engineering plu
AI-assisted analysis of EveryInc/compound-engineering-plugin@c9c10f8c75 (2026-08-31).
Data as JSON: /api/errors/d30d2330bc986a9b.
Report an issue: GitHub.