affaan-m/ECC · error · Error
Claude scope and hook options require Claude to be selected.
Error message
Claude scope and hook options require Claude to be selected.
What it means
normalizeGuidedInstallRequest validates guided-install options against the selected harness set. Claude-specific options (claudeScope, claudeHooks) are only meaningful when 'claude' is in the harnesses list, so passing them while Claude is not selected throws this error to prevent silently ignored options. It is a strict option-consistency guard, not a value validation.
Solutions
- Add 'claude' to the harnesses array in the request, or
- Remove/omit the claudeScope and claudeHooks options when Claude is not selected
- Build the options object conditionally so Claude-only keys are only set when Claude is selected
Example fix
// before
runSetup({ harnesses: ['codex'], claudeScope: 'project' })
// after
runSetup({ harnesses: ['codex'] })
// or
runSetup({ harnesses: ['codex', 'claude'], claudeScope: 'project' }) Defensive patterns
Strategy: validation
Validate before calling
const claudeSelected = harnesses.includes('claude')
if (!claudeSelected && (input.claudeScope !== undefined || input.claudeHooks !== undefined)) {
throw new Error('Pass claudeScope/claudeHooks only when Claude is selected')
} Type guard
const canUseClaudeOptions = (input) => Array.isArray(input.harnesses) && input.harnesses.includes('claude') Try / catch
try {
const normalized = normalizeGuidedInstallRequest(input)
} catch (err) {
if (err.message.includes('Claude scope and hook options')) {
const { claudeScope, claudeHooks, ...rest } = input
return normalizeGuidedInstallRequest(rest)
}
throw err
} Prevention
- Build request objects conditionally per selected harness instead of reusing a fixed config shape
- Validate the harness/option pairing in CLI arg parsing before calling the API
- Keep harness selection and its options together in one validated schema
When it happens
Trigger: Calling the guided install request API (via request -> normalizeGuidedInstallRequest) with harnesses that exclude 'claude' while setting input.claudeScope or input.claudeHooks to any value including undefined check catches any presence (defined value).
Common situations: Programmatic installs where a shared config object always carries claudeScope/claudeHooks but the harness list was trimmed to codex/kimi; CLI flag defaults injected even when --claude was not passed; refactoring harness selection to a subset without pruning Claude options.
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
- The managed install profile requires Kimi to be selected.
- application config exceeds local size limit
- Asset request_id/modality does not match the bundle
- at least one genre spec is required
- bundle collections must be lists
AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16).
Data as JSON: /api/errors/2f4d4ceadd9f0bd8.
Report an issue: GitHub.
Appendix: source
Thrown at scripts/lib/multi-harness-setup.js:29
const VALID_CLAUDE_SCOPES = new Set(['user', 'project', 'local']);
const VALID_CLAUDE_HOOKS = new Set(['off', 'minimal', 'standard', 'strict']);
const VALID_PROFILES = new Set(['minimal', 'core', 'developer', 'security', 'research', 'full']);
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}`);
}
View on GitHub (pinned to 8321021c54)