{"record":{"id":"5998c591b127f208","repo":"affaan-m/ECC","slug":"unknown-argument-arg-5998c5","errorCode":null,"errorMessage":"unknown argument: ${arg}","messagePattern":"unknown argument: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"skills/council-multi-model/scripts/review-with-codex.js","lineNumber":74,"sourceCode":"\n  for (let index = 0; index < argv.length; index += 1) {\n    const arg = argv[index];\n    if (arg === '--consent-to-openai') {\n      options.consent = true;\n    } else if (arg === '--host-provider') {\n      options.hostProvider = argv[index + 1];\n      index += 1;\n    } else if (arg === '--timeout-seconds') {\n      const seconds = Number(argv[index + 1]);\n      if (!Number.isInteger(seconds) || seconds < 10 || seconds > 120) {\n        throw new Error('--timeout-seconds must be an integer from 10 to 120');\n      }\n      options.timeoutMs = seconds * 1000;\n      index += 1;\n    } else if (arg === '--help' || arg === '-h') {\n      options.help = true;\n    } else {\n      throw new Error(`unknown argument: ${arg}`);\n    }\n  }\n\n  if (options.help) return options;\n  if (!options.consent) {\n    throw new Error('explicit --consent-to-openai is required');\n  }\n  if (!HOST_PROVIDERS.has(options.hostProvider)) {\n    throw new Error('--host-provider must be anthropic, openai, or unknown');\n  }\n  return options;\n}\n\nfunction providerLabel(hostProvider) {\n  if (hostProvider === 'anthropic') return 'cross-provider external critique';\n  if (hostProvider === 'openai') return 'same-provider external critique';\n  return 'provider relationship unverified';\n}","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/skills/council-multi-model/scripts/review-with-codex.js#L56-L92","documentation":"Thrown by parseArgs() in review-with-codex.js for any argv token that is not one of --consent-to-openai, --host-provider, --timeout-seconds, --help, or -h. The parser is intentionally strict: the review script sends prompts to a third-party LLM, so unrecognized flags are rejected rather than silently ignored.","triggerScenarios":"Passing any unsupported flag, e.g. --model, --verbose, --repo, --prompt, or a positional argument. Note the parser does not support --flag=value form either: `--host-provider=anthropic` is treated as an unknown argument.","commonSituations":"Assuming the script shares flags with work-items.js or other ECC tools; using =-glued flags; passing the prompt as a positional instead of via stdin (the prompt must come on stdin).","solutions":["Strip unsupported flags; the script only accepts --consent-to-openai, --host-provider <p>, --timeout-seconds <n>, --help.","Pass multi-part values as the next token, not as --flag=value.","Feed the review packet on stdin, not as an argument."],"exampleFix":"// before\nnode skills/council-multi-model/scripts/review-with-codex.js --consent-to-openai --host-provider=anthropic --model gpt-4\n\n// after\necho \"$REVIEW_PACKET\" | node skills/council-multi-model/scripts/review-with-codex.js --consent-to-openai --host-provider anthropic","handlingStrategy":"validation","validationCode":"const REVIEW_FLAGS = new Set(['--consent-to-openai', '--host-provider', '--timeout-seconds', '--help', '-h']);\nfunction assertReviewFlag(arg) {\n  if (!REVIEW_FLAGS.has(arg)) {\n    throw new Error(`unknown argument: ${arg}`);\n  }\n}","typeGuard":"function isReviewFlag(arg) {\n  return ['--consent-to-openai', '--host-provider', '--timeout-seconds', '--help', '-h'].includes(arg);\n}","tryCatchPattern":null,"preventionTips":["Only pass the four supported flags; this script does not share flags with other ECC tools.","Use space-separated --flag value form, never --flag=value.","Feed the review packet on stdin, not as an argument."],"tags":["cli","validation","unknown-argument","argument-parsing"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}