EveryInc/compound-engineering-plugin · error · Error
Unknown target: ${targetName}
Error message
Unknown target: ${targetName} What it means
`convert --to` must name a registered target in the `targets` registry (src/targets/index.ts). If `targets[targetName]` is undefined the CLI throws this error before any conversion runs. Registered targets include opencode, codex, pi, and antigravity.
Source
Thrown at src/commands/convert.ts:147
piHome,
pluginName: plugin.manifest.name,
hasExplicitOutput,
})
const writeScope =
tool.name === "opencode" ? resolveOpenCodeWriteScope(hasExplicitOutput, undefined) : undefined
await handler.write(root, bundle, writeScope)
console.log(`Converted ${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 primaryOutputRoot = resolveTargetOutputRoot({
targetName,
outputRoot,
codexHome,
piHome,
pluginName: plugin.manifest.name,
hasExplicitOutput,
scope: resolvedScope,
})
const bundle = target.convert(plugin, options)View on GitHub (pinned to c9c10f8c75)
Solutions
- Use a registered target: --to opencode, codex, pi, or antigravity.
- Check case-sensitivity: the name must match the registry key exactly (lowercase).
- List available targets via `convert --help` or by inspecting `targets` in src/targets/index.ts for your version.
- If you need a target that isn't registered, don't confuse it with `cleanup` targets — convert only supports the registered set.
Example fix
// before bun run src/index.ts convert --to cursor --source ./plugin // Error: Unknown target: cursor // after bun run src/index.ts convert --to opencode --source ./plugin
Defensive patterns
Strategy: validation
Validate before calling
const CONVERT_TARGETS = ["opencode", "codex", "pi", "antigravity"] as const
const to = process.env.TARGET
if (!(CONVERT_TARGETS as readonly string[]).includes(to)) {
throw new Error(`--to must be one of ${CONVERT_TARGETS.join(" | ")}, got: ${to}`)
} Type guard
type ConvertTarget = "opencode" | "codex" | "pi" | "antigravity"
function isConvertTarget(v: string): v is ConvertTarget {
return (["opencode", "codex", "pi", "antigravity"] as const).includes(v as never)
} Try / catch
try {
await convert({ to: targetName })
} catch (e) {
if (e instanceof Error && e.message.startsWith("Unknown target:")) {
console.error(`${e.message} — registered targets: opencode, codex, pi, antigravity`)
} else throw e
} Prevention
- Don't assume cleanup targets (kiro, copilot, windsurf, ...) are convertible targets — the sets differ.
- Use lowercase target names; registry keys are case-sensitive.
- In scripts, import the `targets` record from src/targets/index.ts (or read its keys) instead of hardcoding names.
When it happens
Trigger: Running `convert --to claude`, `--to cursor`, or any misspelled/unsupported target name. Also occurs when passing the name of a target you expect to exist but that isn't in your installed CLI version's registry.
Common situations: Confusing convert targets with cleanup targets (cleanup supports kiro/copilot/droid/qwen/windsurf, convert does not); typos like "openCode" (case-sensitive); using docs for a newer/older CLI version with a different target set.
Related errors
- Unknown cleanup target: ${target}. Use one of: ${cleanupTarg
- Unknown permissions mode: ${permissions}
- Unknown permissions mode: ${permissions}
- Unknown target: ${targetName}
- 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/b6fb98afcb07522b.
Report an issue: GitHub.