{"record":{"id":"f81b6252a7276e3b","repo":"thedotmack/claude-mem","slug":"select-exactly-one-provider","errorCode":null,"errorMessage":"Select exactly one provider.","messagePattern":"Select exactly one provider\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"src/npx-cli/commands/install.ts","lineNumber":1117,"sourceCode":"          { value: 'cmem', label: labels.cmem, hint: labels.cmemHint },\n          { value: 'claude', label: labels.claude, hint: labels.claudeHint },\n        ],\n        // CMEM Pro pre-selected: it is the recommended path and the one the\n        // funnel is built around. Selecting it no longer means \"pay now\" —\n        // it opens the offer page to read first.\n        initialValues: ['cmem'],\n        required: true,\n      });\n      // @clack/prompts 1.8: isCancel narrows to unique CANCEL_SYMBOL, not generic symbol.\n      if (p.isCancel(providerResult) || !Array.isArray(providerResult)) {\n        p.cancel('Installation cancelled.');\n        process.exit(1);\n      }\n      if (providerResult.length === 1) {\n        selectedProvider = providerResult[0];\n        break;\n      }\n      log.warn('Select exactly one provider.');\n    }\n  }\n\n  // CMEM Pro: no new provider code. The worker's OpenRouter client is a generic\n  // OpenAI-compatible client whose endpoint and model both come from settings,\n  // so \"use the CMEM observer model\" is four settings writes and nothing else.\n  if (selectedProvider === 'cmem') {\n    if (!pairing) {\n      // Unreachable via the flag that skips login (it forces 'claude'), but a\n      // future caller passing null here would otherwise enroll against nothing.\n      throw new Error('CMEM Pro requires a signed-in claude-mem account.');\n    }\n    // The billing disclosure lives on the checkout page, not here. It is a term\n    // of the charge, so it belongs on the screen that takes the payment method,\n    // where it can be shown next to the price and the card field. Re-asking for\n    // it in the terminal made the user consent twice to the same thing, before\n    // ever seeing what they were agreeing to.\n    const enrollment = await completeCmemTrialPairing(pairing, version);","sourceCodeStart":1099,"sourceCodeEnd":1135,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/8bc631a71a487424b866756e43a6efa4574cc66b/src/npx-cli/commands/install.ts#L1099-L1135","documentation":"During interactive install, the multi-select prompt for providers re-prompts with the warning 'Select exactly one provider.' when the user confirms a selection that is not exactly one provider. The installer requires a single provider because the worker's observer client is configured from one provider's settings; zero or multiple selections cannot be mapped to settings.","triggerScenarios":"User is in the provider multi-select prompt and presses confirm with zero items selected or more than one item selected; the loop re-displays the prompt with this warning until exactly one is chosen (or the user aborts with exit code 1).","commonSituations":"User assumes multi-select is allowed and picks several providers; user presses enter on an empty list wanting to skip; confusion between required vs optional selection in the interactive flow.","solutions":["Select exactly one provider in the prompt (toggle one item, deselect others) and confirm.","Press Ctrl+C/escape if you want to abort the install instead of choosing.","If you want a different provider configuration, change provider settings after install rather than selecting multiple."],"exampleFix":"// before\n? Providers (space to select, enter to confirm)\n> [x] anthropic [x] openrouter  -> warn: Select exactly one provider.\n// after\n> [x] anthropic [ ] openrouter  -> proceeds","handlingStrategy":"validation","validationCode":"function validProviderSelection(sel: string[]): boolean { return sel.length === 1; }\nif (!validProviderSelection(selected)) console.warn('Select exactly one provider.');","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Read the prompt instructions: select exactly one item before confirming.","Do not press enter on an empty selection.","Change provider preferences via settings after install instead of trying to multi-select.","Abort (Ctrl+C) if unsure rather than submitting an invalid selection."],"tags":["cli","interactive-prompt","validation","install"],"backgroundTag":"invalid-cli-argument","analyzedSha":"8bc631a71a487424b866756e43a6efa4574cc66b","analyzedAt":"2026-09-09T10:47:06.009Z","contentChangedAt":"2026-09-09T10:47:06.009Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}