affaan-m/ECC · error · Error

Unsupported guided harness

Error message

Unsupported guided harness: ${id}

What it means

createMultiHarnessPlan builds a plan for a set of requested harness ids. Each id must map to a known harness (e.g. codex, cursor, kimi via managed-project). An unrecognized id falls into the final else and throws, because there is no code path to generate its operations.

Solutions

  1. Check the id spelling against supported harness ids in scripts/lib/multi-harness-setup.js
  2. Remove or update the unsupported id in your request/config
  3. Upgrade the ECC plugin if the harness is newer than your installed version

Example fix

// before
await createMultiHarnessPlan({ harnesses: ['claudecode', 'cursor'] });
// after
await createMultiHarnessPlan({ harnesses: ['cursor'] }); // use a supported id
Defensive patterns

Strategy: validation

Validate before calling

const SUPPORTED = ['codex', 'cursor', 'kimi']; // per multi-harness-setup.js
const bad = (request.harnesses || []).filter(h => !SUPPORTED.includes(h));
if (bad.length) throw new Error(`Unsupported harness ids: ${bad.join(', ')}`);

Type guard

function isSupportedHarness(id) {
  return ['codex', 'cursor', 'kimi'].includes(id);
}

Try / catch

try {
  const plan = await createMultiHarnessPlan(request);
} catch (e) {
  if (e.message.startsWith('Unsupported guided harness')) {
    const id = e.message.match(/: (.+)$/)[1];
    request.harnesses = request.harnesses.filter(h => h !== id);
    // retry or surface to user
  } else throw e;
}

Prevention

When it happens

Trigger: Passing a harness id in the request (e.g. via CLI flag or config) that is not one of the supported guided harnesses — typo'd, deprecated, or newly added upstream id.

Common situations: Typo like 'claudecode' vs the supported id; following outdated docs for a renamed harness; user config listing a harness installed outside this tool; forwards-compat configs from a newer version run on older code.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16). Data as JSON: /api/errors/25598329f26c76fe. Report an issue: GitHub.

Appendix: source

Thrown at scripts/lib/multi-harness-setup.js:480

}

async function createMultiHarnessPlan(request, injected = {}, options = {}) {
  const dependencies = { ...defaultDependencies(options), ...injected };
  let entries = [];
  for (const id of request.harnesses) {
    if (id === 'claude') {
      entries = [...entries, { id, channel: 'native-plugin', preview: await dependencies.previewClaude(request) }];
    } else if (id === 'codex') {
      entries = [...entries, { id, channel: 'native-plugin', preview: await dependencies.previewCodex(request) }];
    } else if (id === 'kimi') {
      const managedPlan = await dependencies.createManagedPlan(request);
      entries = [...entries, {
        id,
        channel: 'managed-project',
        preview: await dependencies.preflightManaged(managedPlan),
      }];
    } else {
      throw new Error(`Unsupported guided harness: ${id}`);
    }
  }
  return { harnesses: entries, request };
}

async function applyMultiHarnessPlan(plan, injected = {}, options = {}) {
  const dependencies = { ...defaultDependencies(options), ...injected };
  if (plan.request.dryRun) {
    return { status: 'preview', completed: [], retryHarnesses: [...plan.request.harnesses] };
  }

  let completed = [];
  for (let index = 0; index < plan.harnesses.length; index += 1) {
    const entry = plan.harnesses[index];
    try {
      let result;
      if (entry.id === 'claude') result = await dependencies.applyClaude(plan.request, entry);
      else if (entry.id === 'codex') result = await dependencies.applyCodex(plan.request, entry);

View on GitHub (pinned to 8321021c54)