affaan-m/ECC · error · Error
Kimi requires an explicit --profile choice in this mode.
Error message
Kimi requires an explicit --profile choice in this mode.
What it means
validateExecutionMode() requires an explicit --profile whenever the 'kimi' harness is selected in non-interactive or --json mode. Since no interactive prompt can choose the Kimi profile, the caller must pass --profile; otherwise the script throws to avoid installing Kimi with an unintended configuration.
Solutions
- Add --profile <value> to the command for the desired Kimi profile.
- Remove --harness kimi if Kimi installation is not intended.
- Ensure the PROFILE variable in wrapper scripts is non-empty before invoking.
Example fix
// before node scripts/install-guided.js --harness kimi --yes // after node scripts/install-guided.js --harness kimi --profile default --yes
Defensive patterns
Strategy: validation
Validate before calling
if (harnesses.includes('kimi') && !profile) { throw new Error('kimi needs --profile'); } Try / catch
try { main(); } catch (e) { if (/Kimi requires an explicit --profile/.test(e.message)) { console.error('Supply --profile <name> when kimi is selected'); process.exit(2); } throw e; } Prevention
- Pair --harness kimi with --profile in every scripted invocation.
- Use ${PROFILE:?PROFILE required} style shell guards for the profile variable.
- Keep a canonical example command in team docs/CI templates.
When it happens
Trigger: Non-interactive or JSON-mode run where options.harnesses includes 'kimi' and options.profile is falsy (--profile not provided).
Common situations: CI jobs adding kimi to the harness list; users copying a claude-only non-interactive command and appending --harness kimi without the profile flag; scripts where the profile variable is empty/unset.
Understand the failure class
Background: "Must pass :limit option" / "Missing required option" — required option errors explained — this error's family across 41 libraries.
Related errors
- Claude requires explicit --claude-scope and --claude-hooks…
- Non-interactive guided install requires at least one…
- An executable is required after --.
- An install config path is required
- At least one --target is required for handoffs.
AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16).
Data as JSON: /api/errors/159b334f4d5a9622.
Report an issue: GitHub.
Appendix: source
Thrown at scripts/install-guided.js:196
}
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');
}
if (plan.request.harnesses.includes('claude') && plan.request.claudeHooks && plan.request.claudeHooks !== 'off') {
output.write(View on GitHub (pinned to 8321021c54)