affaan-m/ECC · error

Kimi requires an explicit --profile choice in this mode.

Error message

Kimi requires an explicit --profile choice in this mode.

What it means

In non-interactive or --json mode, selecting the kimi harness requires an explicit --profile choice (the content profile Kimi receives). Without a TTY the installer cannot prompt, so a missing --profile throws.

Source

Thrown at scripts/install-guided.js:195

}

function selectedHarnessIds(options) {
  if (options.allHarnesses) return normalizeHarnessSelection(['all']);
  if (options.harnesses.length === 0) return [];
  return normalizeHarnessSelection(options.harnesses);
}

function validateExecutionMode(options, interactive) {
  const harnesses = selectedHarnessIds(options);
  if (!interactive && harnesses.length === 0) {
    throw new Error('Non-interactive guided install requires at least one --harness.');
  }
  const requiresExplicit = !interactive || options.json;
  if (requiresExplicit && harnesses.includes('claude') && (!options.claudeScope || !options.claudeHooks)) {
    throw new Error('Claude requires explicit --claude-scope and --claude-hooks choices in this mode.');
  }
  if (requiresExplicit && harnesses.includes('kimi') && !options.profile) {
    throw new Error('Kimi requires an explicit --profile choice in this mode.');
  }
  if ((!interactive || options.json) && !options.yes && !options.dryRun) {
    throw new Error('Non-interactive and JSON mutations require --yes.');
  }
}

function printPlan(plan, output) {
  output.write('\nECC guided install preview\n\n');
  output.write('Harness       Channel           Destination\n');
  for (const entry of plan.harnesses) {
    const harness = getHarnessCapability(entry.id);
    output.write(`${harness.label.padEnd(13)} ${entry.channel.padEnd(17)} ${harness.destination}\n`);
  }
  if (plan.request.harnesses.includes('kimi')) {
    output.write('\nKimi note: ECC hooks are not configured; model, provider, and authentication settings are unchanged.\n');
  }
}

View on GitHub (pinned to 01e15490f0)

Solutions

  1. Add --profile <id> (e.g. core) to the command
  2. Use --dry-run to preview without mutating, then run the real install with --profile
  3. Drop kimi from --harness if you do not need it configured

Example fix

// before
node scripts/install-guided.js --harness kimi --yes
// after
node scripts/install-guided.js --harness kimi --profile core --yes
Defensive patterns

Strategy: validation

Validate before calling

const interactive = process.stdin.isTTY === true;
const explicitMode = !interactive || argv.includes('--json');
if (explicitMode && selectsKimi(argv) && !argv.includes('--profile')) {
  throw new Error('Kimi needs --profile in non-interactive/JSON mode');
}

Type guard

function hasKimiProfile(argv) {
  return argv.includes('--profile');
}

Try / catch

try { validateExecutionMode(options, interactive); }
catch (err) {
  if (/Kimi requires an explicit --profile/.test(err.message)) {
    console.error(`${err.message} Add --profile <id>.`);
    process.exit(2);
  }
  throw err;
}

Prevention

When it happens

Trigger: Running --harness kimi --yes without --profile, or adding --json to a Kimi install that did not specify a profile.

Common situations: Assuming Kimi uses the same default profile as interactive mode, or a CI template that selects kimi but forgets the profile flag.

Related errors


AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13). Data as JSON: /api/errors/159b334f4d5a9622. Report an issue: GitHub.