affaan-m/ECC · error · Error
The managed install profile requires Kimi to be selected.
Error message
The managed install profile requires Kimi to be selected.
What it means
The managed install profile (input.profile, selecting minimal/core/developer/security/research/full) only applies to the Kimi managed-install path. normalizeGuidedInstallRequest refuses to accept a profile when 'kimi' is not in the harnesses, because there is no consumer for it and silently ignoring it would hide a misconfiguration. Fail-fast at the request boundary.
Source
Thrown at scripts/lib/multi-harness-setup.js:32
function catalogHelpers() {
return require('./harness-capabilities');
}
function normalizeGuidedInstallRequest(input = {}) {
const { normalizeHarnessSelection } = catalogHelpers();
const harnesses = normalizeHarnessSelection(input.harnesses || []);
if (harnesses.length === 0) {
throw new Error('Choose at least one guided harness: Claude, Codex, or Kimi.');
}
const includesClaude = harnesses.includes('claude');
const includesKimi = harnesses.includes('kimi');
if (!includesClaude && (input.claudeScope !== undefined || input.claudeHooks !== undefined)) {
throw new Error('Claude scope and hook options require Claude to be selected.');
}
if (!includesKimi && input.profile !== undefined) {
throw new Error('The managed install profile requires Kimi to be selected.');
}
const claudeScope = includesClaude ? (input.claudeScope || 'user') : undefined;
const claudeHooks = includesClaude ? (input.claudeHooks || 'standard') : undefined;
const profile = includesKimi ? (input.profile || 'core') : undefined;
if (claudeScope && !VALID_CLAUDE_SCOPES.has(claudeScope)) {
throw new Error(`Invalid Claude scope: ${claudeScope}`);
}
if (claudeHooks && !VALID_CLAUDE_HOOKS.has(claudeHooks)) {
throw new Error(`Invalid Claude hooks preference: ${claudeHooks}`);
}
if (profile && !VALID_PROFILES.has(profile)) {
throw new Error(`Invalid Kimi install profile: ${profile}`);
}
return {
harnesses,
...(claudeHooks ? { claudeHooks } : {}),View on GitHub (pinned to 01e15490f0)
Solutions
- Either add 'kimi' to harnesses, or remove the profile field from the input.
- When constructing the request, set profile only when kimi is selected: if (harnesses.includes('kimi')) request.profile = profile.
- Audit the calling code for unconditional profile defaults.
- Drop the key entirely rather than passing undefined explicitly.
Example fix
// before
normalizeGuidedInstallRequest({ harnesses: ['claude'], profile: 'core' }); // throws
// after (option A)
normalizeGuidedInstallRequest({ harnesses: ['claude'] });
// after (option B)
normalizeGuidedInstallRequest({ harnesses: ['claude', 'kimi'], profile: 'core' }); Defensive patterns
Strategy: validation
Validate before calling
function buildProfileOption(input = {}) {
const harnesses = input.harnesses || [];
if (harnesses.includes('kimi') && input.profile !== undefined) {
return { harnesses, profile: input.profile };
}
return { harnesses };
}
// use buildProfileOption before normalizeGuidedInstallRequest Try / catch
try { normalizeGuidedInstallRequest(input); }
catch (error) {
if (/managed install profile requires Kimi/i.test(error.message)) {
console.error('Either add \'kimi\' to harnesses or drop the profile option.');
return;
}
throw error;
} Prevention
- Only set profile when 'kimi' is in harnesses.
- Omit the profile key when Kimi is not selected.
- Build the request conditionally so profile is not threaded through every call.
- Validate coherence between harnesses and profile before calling normalize.
When it happens
Trigger: Calling normalizeGuidedInstallRequest with input.profile set to any value while input.harnesses does not include 'kimi'. Typical when a caller threads a profile default through every request regardless of selected harnesses.
Common situations: A CLI that always sends --profile core even when the user only picked Claude/Codex; a wrapper that builds the request from a template containing profile; copy-pasted request from a Kimi install; a UI that defaults the profile dropdown to 'core'.
Related errors
- Choose at least one guided harness: Claude, Codex, or Kimi.
- Claude scope and hook options require Claude to be selected.
- Invalid Claude scope: ${claudeScope}
- Invalid Claude hooks preference: ${claudeHooks}
- Invalid Kimi install profile: ${profile}
AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13).
Data as JSON: /api/errors/099f39012accc2a9.
Report an issue: GitHub.