{"record":{"id":"998d1b898dc8a9f1","repo":"jackwener/OpenCLI","slug":"no-picker-option-matched","errorCode":null,"errorMessage":"No picker option matched.","messagePattern":"No picker option matched\\.","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"error","filePath":"clis/codex/send.js","lineNumber":160,"sourceCode":"          .filter((it) => it instanceof HTMLElement && it.offsetParent);\n        if (items.length) break;\n        await wait(75);\n      }\n      // Picker titles are split into per-character spans for match\n      // highlighting, so read the leading truncate div for the title and the\n      // concatenated textContent (title plus description) for substrings.\n      return items.map((el) => {\n        const text = (el.textContent || '').replace(/\\\\s+/g, ' ').trim();\n        const lead = el.querySelector('[class*=\"truncate\"]');\n        return { title: lead ? (lead.textContent || '').replace(/\\\\s+/g, ' ').trim() : text, text };\n      });\n    })()`));\n            if (!Array.isArray(options) || options.length === 0) {\n                throw new CommandExecutionError('Codex picker did not open after typing the command.', 'Check that the text opens a picker, or drop --pick.');\n            }\n            picked = findUniquePickerOption(options, pick);\n            if (!picked) {\n                throw new CommandExecutionError('No picker option matched.', `wanted=${pick} available=${JSON.stringify(options.map((option) => option.title))}`);\n            }\n            const clicked = unwrapEvaluateResult(await page.evaluate(`(() => {\n      const items = Array.from(document.querySelectorAll('${PICKER_ITEM_SELECTOR}'))\n        .filter((it) => it instanceof HTMLElement && it.offsetParent);\n      const target = items[${picked.index}];\n      if (!target) return false;\n      const rect = target.getBoundingClientRect();\n      const init = {\n        bubbles: true, cancelable: true, button: 0, buttons: 1,\n        clientX: Math.round(rect.left + rect.width / 2),\n        clientY: Math.round(rect.top + rect.height / 2),\n      };\n      // The picker only responds to the full pointer chain, and deferring it\n      // keeps the eval response ahead of the re-render that closes the picker.\n      Promise.resolve().then(() => {\n        try {\n          target.dispatchEvent(new PointerEvent('pointerdown', { ...init, pointerType: 'mouse' }));\n          target.dispatchEvent(new MouseEvent('mousedown', init));","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/codex/send.js#L142-L178","documentation":"The picker opened, but findUniquePickerOption returned null: no option's title matched exactly and no option's text contained the wanted --pick label. The library throws CommandExecutionError including the wanted label and all available option titles so you can correct the label.","triggerScenarios":"Calling send with --pick \"label\" where the opened picker has options but none match the label exactly or as a substring (after whitespace-collapsing and lowercasing).","commonSituations":"Typo in the label; wrong casing assumptions are fine but wrong wording isn't (e.g. 'planning' vs 'Plan'); the picker shows different options than expected because the composer text differs; non-English UI; trailing punctuation in the label.","solutions":["Read the 'available=[...]' list in the error and use one of those titles (or an unambiguous substring) as --pick.","Fix typos and remove punctuation from the --pick label.","Adjust the composer text so the picker lists the option you intend to select.","Drop --pick if you don't need a picker selection at all."],"exampleFix":"// before\n$ codex send --pick \"plan mode\" \"/rev\"\n// No picker option matched. wanted=plan mode available=[\"Review\",\"Resolve\"]\n\n// after\n$ codex send --pick \"Review\" \"/rev\"","handlingStrategy":"validation","validationCode":"const knownTitles = ['Review', 'Resolve', 'Plan mode']; // titles captured from the picker\nconst wanted = (pick || '').replace(/\\s+/g, ' ').trim().toLowerCase();\nif (pick && !knownTitles.some(t => t.toLowerCase().includes(wanted))) {\n  throw new Error(`Unknown picker option \"${pick}\". Available: ${knownTitles.join(', ')}`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  await codexSend({ text, pick });\n} catch (e) {\n  if (e instanceof CommandExecutionError && /No picker option matched/.test(e.message)) {\n    const available = JSON.parse(e.detail.match(/available=(\\[.*\\])/)?.[1] ?? '[]');\n    console.error('Use one of:', available);\n    process.exitCode = 2;\n    return;\n  }\n  throw e;\n}","preventionTips":["Copy option titles from the 'available=' list in the error rather than guessing.","Keep a checked-in list of valid picker labels for your workflows.","Fix typos and strip punctuation from --pick labels before sending."],"tags":["picker","match-failure","codex","ui-automation"],"backgroundTag":"picker-option-not-found","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}