pbakaus/impeccable · error
Could not determine a target harness folder.
Error message
Could not determine a target harness folder.
What it means
`link` calls `sys.resolve_install_targets` with the `--providers` flag value. If no harness target folders can be determined, the command aborts with exit code 1 and suggests passing providers explicitly.
Source
Thrown at crates/skills/src/commands.rs:469
/// JS: link(flags)
fn link(flags: &[String], io: &mut Io) -> R<()> {
let (sys, mut prompt) = ctx(io);
let force = has_flag(flags, "--force");
let yes = has_flag(flags, "-y") || has_flag(flags, "--yes");
let source_value = get_flag_value(flags, "--source");
let providers_value = get_flag_value(flags, "--providers");
let root = sys.find_project_root();
let source = match bundle::resolve_link_source(source_value, &root) {
Ok(s) => s,
Err(e) => {
err(io, &e);
return Err(Flow::Exit(1));
}
};
let targets = sys.resolve_install_targets(&root, providers_value);
if targets.is_empty() {
err(io, "Could not determine a target harness folder.");
err(io, "Pass one explicitly, e.g. --providers=claude,cursor");
return Err(Flow::Exit(1));
}
if !yes {
out(io, &format!("Source checkout: {}", source.checkout_root));
out(io, &format!("Target harness folder(s): {}", targets.join(", ")));
let ans = prompt.ask(io, &format!("Link impeccable skills into {} folder(s)? (Y/n) ", targets.len()))?;
if ans == "n" || ans == "no" {
out(io, "Aborted. Re-run with --providers=<names> to choose explicitly (e.g. --providers=claude,cursor).");
return Err(Flow::Exit(0));
}
}
let result = bundle::link_provider_skills(io, &source.bundle_root, &root, &targets, force).map_err(Flow::Throw)?;
// Linked installs are excluded from install/update refreshes (overwriting
// a symlink would destroy the link), so this is the only path that can
// deliver the OpenCode command bridge to them. A copy, not a symlink: the
// bridge is static and OpenCode scans the real commands dir. No-ops when
// the source checkout has no built commands (#483).View on GitHub (pinned to 2bc2879276)
Solutions
- Pass providers explicitly: `impeccable link --providers=claude,cursor`
- Create the harness folder expected by auto-detection first
- Check the providers value for typos
Example fix
// before impeccable link // after impeccable link --providers=claude,cursor
Defensive patterns
Strategy: validation
Validate before calling
const providers = process.argv.match(/--providers=([\w,]+)/)?.[1];
if (!providers) console.error('Pass --providers=claude,cursor explicitly'); Try / catch
try { await link(); } catch (e) { if (/target harness folder/.test(String(e))) { console.error('Specify --providers'); } } Prevention
- Always pass --providers explicitly in scripts and CI
- Keep at least one harness folder present for auto-detection
When it happens
Trigger: Running `impeccable link` without `--providers` in an environment where no known harness folder (e.g. `.claude/`, `.cursor/`) exists or is detectable.
Common situations: Fresh machines with no provider folders, CI containers, or typos in the providers value resulting in zero matches.
Understand the failure class
Background: "--flag is required" and "must specify" CLI errors: how missing-required-flag validation works and how to fix it — this error's family across 20 libraries.
Related errors
- {e} (dynamic error string from bundle::resolve_link_source)
- Pass one explicitly, e.g. --providers=claude,cursor
- Nothing was linked because matching skill folders already ex
- Existing skills were left untouched. Re-run with --force to
- Nothing was linked: {} had no variants for {}.
AI-assisted analysis of pbakaus/impeccable@2bc2879276 (2026-09-08).
Data as JSON: /api/errors/db8bebb10d84b405.
Report an issue: GitHub.