{"record":{"id":"fa756ea398f224cb","repo":"crewAIInc/crewAI","slug":"missing-required-input-name","errorCode":null,"errorMessage":"Missing required input '{name}'","messagePattern":"Missing required input '(.+?)'","errorType":"console","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"lib/cli/src/crewai_cli/run_crew.py","lineNumber":235,"sourceCode":"    if missing and interactive:\n        inputs.update(\n            prompt_for_inputs(\n                missing,\n                title=\"Crew inputs\",\n                subtitle=\"This crew needs the following to run.\",\n            )\n        )\n        missing = _missing_input_names(crew, inputs)\n\n    if missing:\n        for name in missing:\n            click.secho(f\"  Missing required input '{name}'\", fg=\"red\", err=True)\n        click.secho(\n            \"  Provide them via --inputs or the `inputs` object in crew.json(c).\",\n            dim=True,\n            err=True,\n        )\n        raise SystemExit(1)\n\n    return inputs\n\n\ndef _json_loading_status(message: str) -> AbstractContextManager[Any]:\n    from rich.console import Console\n    from rich.text import Text\n\n    console = Console()\n    if not console.is_terminal:\n        return nullcontext()\n    return console.status(\n        Text(f\"  {message}\", style=\"bold #1F7982\"),\n        spinner=\"dots\",\n    )\n\n\ndef _load_json_crew(crew_path: Path) -> tuple[Any, dict[str, Any]]:","sourceCodeStart":217,"sourceCodeEnd":253,"githubUrl":"https://github.com/crewAIInc/crewAI/blob/754d7323beb2fd042e33444a115ea2d5a47193f0/lib/cli/src/crewai_cli/run_crew.py#L217-L253","documentation":"Input validation before a crew kickoff: _missing_input_names(crew, inputs) returned required input names that are absent from both the `--inputs` JSON and the `inputs` object in crew.json(c). The CLI prints each missing name in red plus a dim hint about how to supply them, then exits 1 before any LLM call is made — so this error costs nothing but must be fixed by providing data.","triggerScenarios":"Running `crewai run` (classic or JSON crew) where the crew definition declares required inputs but: --inputs is omitted, the JSON passed to --inputs is missing keys, key names don't match exactly (case/typo), or crew.json's `inputs` object doesn't cover all required fields.","commonSituations":"Sharing a crew definition without sharing the sample inputs file; renaming a required input in the definition but not in run scripts/CI; nested keys flattened vs dotted mismatches; new required inputs added by a teammate.","solutions":["Add each listed name to your --inputs JSON: `crewai run --inputs '{\"topic\": \"...\"}'` or point --inputs at a file.","Alternatively put the values in the `inputs` object of crew.json / crew.jsonc.","Check exact spelling/casing of keys against the error output — matching is exact.","If an input should be optional, remove it from the crew's required inputs in the definition."],"exampleFix":"# before\n$ crewai run --inputs '{\"topic\": \"AI\"}'\n#   Missing required input 'audience'\n\n# after\n$ crewai run --inputs '{\"topic\": \"AI\", \"audience\": \"engineers\"}'","handlingStrategy":"validation","validationCode":"# Before running, check required inputs against the crew definition\nrequired = {\"topic\", \"audience\"}          # from your crew definition\nprovided = set(inputs_from_cli_or_file())  # keys you will pass\nmissing = required - provided\nif missing:\n    raise SystemExit(f\"missing required inputs: {sorted(missing)}\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep a checked-in sample inputs JSON next to the crew definition and use it in scripts.","Validate input key sets in CI before the crew run step, so failures are caught pre-LLM cost.","When renaming a required input, grep your scripts/CI for the old name in the same commit."],"tags":["validation","inputs","crew","cli","user-input"],"backgroundTag":null,"analyzedSha":"754d7323beb2fd042e33444a115ea2d5a47193f0","analyzedAt":"2026-08-15T04:06:56.746Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}