{"record":{"id":"776a622e6ebd26da","repo":"openai/codex-plugin-cc","slug":"unsupported-reasoning-effort-effort-use-one","errorCode":null,"errorMessage":"Unsupported reasoning effort \"${effort}\". Use one of: none, minimal, low, medium, high, xhigh.","messagePattern":"Unsupported reasoning effort \"(.+?)\"\\. Use one of: none, minimal, low, medium, high, xhigh\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"plugins/codex/scripts/codex-companion.mjs","lineNumber":123,"sourceCode":"    return null;\n  }\n  const normalized = String(model).trim();\n  if (!normalized) {\n    return null;\n  }\n  return MODEL_ALIASES.get(normalized.toLowerCase()) ?? normalized;\n}\n\nfunction normalizeReasoningEffort(effort) {\n  if (effort == null) {\n    return null;\n  }\n  const normalized = String(effort).trim().toLowerCase();\n  if (!normalized) {\n    return null;\n  }\n  if (!VALID_REASONING_EFFORTS.has(normalized)) {\n    throw new Error(\n      `Unsupported reasoning effort \"${effort}\". Use one of: none, minimal, low, medium, high, xhigh.`\n    );\n  }\n  return normalized;\n}\n\nfunction normalizeArgv(argv) {\n  if (argv.length === 1) {\n    const [raw] = argv;\n    if (!raw || !raw.trim()) {\n      return [];\n    }\n    return splitRawArgumentString(raw);\n  }\n  return argv;\n}\n\nfunction parseCommandInput(argv, config = {}) {","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/openai/codex-plugin-cc/blob/db52e28f4d9ded852ab3942cea316258ae4ef346/plugins/codex/scripts/codex-companion.mjs#L105-L141","documentation":"normalizeReasoningEffort validates the --effort flag against the fixed set VALID_REASONING_EFFORTS = {none, minimal, low, medium, high, xhigh}. The value is trimmed and lowercased before comparison, so case/whitespace differences are tolerated; only genuinely unknown tokens throw. The valid set is a codex app-server protocol contract.","triggerScenarios":"Running `codex-companion.mjs task --effort max` or any value outside the six allowed. Passing `--effort high` works; `--effort HIGH` also works due to toLowerCase(). A common miss is 'maximum' or 'ultra'.","commonSituations":"A model/UI change adds a new effort level but the companion set is not updated, or a user guesses a value from a different tool's vocabulary.","solutions":["Use one of the exact allowed values: none, minimal, low, medium, high, xhigh.","If you need a new effort level, add it to VALID_REASONING_EFFORTS in codex-companion.mjs AND ensure the codex app-server accepts it.","Omit --effort entirely to let the default apply (normalizeReasoningEffort returns null for missing/empty)."],"exampleFix":"// before\ncodex-companion.mjs task --effort max \"fix the bug\"\n// after\ncodex-companion.mjs task --effort high \"fix the bug\"","handlingStrategy":"validation","validationCode":"const VALID = new Set(['none','minimal','low','medium','high','xhigh']);\nif (effort != null && !VALID.has(String(effort).trim().toLowerCase())) {\n  throw new Error(`Invalid effort: ${effort}`);\n}","typeGuard":"/** @param {unknown} v @returns {v is string} */\nfunction isValidEffort(v) {\n  return typeof v === 'string' && VALID_REASONING_EFFORTS.has(v.trim().toLowerCase());\n}","tryCatchPattern":null,"preventionTips":["Constrain effort selection in the UI to the six allowed values.","Document the allowed set next to any --effort input."],"tags":["cli","validation","reasoning-effort","task"],"backgroundTag":null,"analyzedSha":"db52e28f4d9ded852ab3942cea316258ae4ef346","analyzedAt":"2026-08-13T05:13:20.855Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}