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

normalizeGuidedInstallRequest throws this when input.profile (the Kimi managed install profile) is supplied but 'kimi' is not among the selected harnesses. The profile option only applies to Kimi installs; the library refuses to accept it to avoid the caller assuming it had any effect. Like the Claude guard, it checks mere presence of the option.

Solutions

  1. Add 'kimi' to the harnesses array, or
  2. Remove the profile option when Kimi is not selected
  3. Conditionally build the request object so profile is only present when kimi is selected

Example fix

// before
runSetup({ harnesses: ['claude'], profile: 'core' })
// after
runSetup({ harnesses: ['claude'] })
// or
runSetup({ harnesses: ['claude', 'kimi'], profile: 'core' })
Defensive patterns

Strategy: validation

Validate before calling

if (!harnesses.includes('kimi') && input.profile !== undefined) {
  throw new Error('profile requires kimi to be selected')
}

Type guard

const canUseProfile = (input) => Array.isArray(input.harnesses) && input.harnesses.includes('kimi')

Try / catch

try {
  return normalizeGuidedInstallRequest(input)
} catch (err) {
  if (err.message.includes('managed install profile requires Kimi')) {
    const { profile, ...rest } = input
    return normalizeGuidedInstallRequest(rest)
  }
  throw err
}

Prevention

When it happens

Trigger: Calling the guided install request API with a harnesses array that does not include 'kimi' while input.profile is defined (e.g. profile: 'core').

Common situations: Shared install config that always sets profile but Kimi was deselected; CLI wrapper forwarding --profile unconditionally; switching from a kimi-inclusive setup to codex/claude only without removing profile.

Understand the failure class

Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.

Related errors


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

Appendix: 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 8321021c54)