{"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":"warning","filePath":"src/npx-cli/commands/install.ts","lineNumber":1140,"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":1122,"sourceCodeEnd":1158,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/d8bc9755e74915e5c3b999181e10a67c889bce2a/src/npx-cli/commands/install.ts#L1122-L1158","documentation":"In the interactive provider setup, the provider multi-select prompt loops until exactly one provider is selected. If the user confirms with zero or multiple providers selected, the installer logs this warning and re-prompts instead of proceeding.","triggerScenarios":"Confirming the provider multi-select (p.multiselect) with a selection whose length !== 1 — nothing selected, or more than one provider checked — inside the while loop after the length===1 fast path fails.","commonSituations":"Prompt defaults select multiple providers and the user just presses Enter; user tries to configure two BYO-key providers at once; clearing the selection then confirming.","solutions":["Re-answer the prompt with exactly one provider checked, then confirm.","Deselect extra pre-checked providers before pressing Enter.","Configure additional providers in a second pass after install completes."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["In the multi-select provider prompt, select exactly one provider before confirming.","Deselect extra providers if the prompt defaulted to multiple selections.","If you need multiple providers, configure them in separate setup passes."],"tags":["interactive-prompt","validation","provider","multi-select"],"backgroundTag":"invalid-argument-value","analyzedSha":"d8bc9755e74915e5c3b999181e10a67c889bce2a","analyzedAt":"2026-09-17T16:40:26.182Z","contentChangedAt":"2026-09-17T16:40:26.182Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}