{"record":{"id":"7efcc997c0752b42","repo":"Hmbown/CodeWhale","slug":"unsupported-runtime-set-key-value-omitted-supported-keys-are","errorCode":null,"errorMessage":"unsupported runtime --set key (value omitted): supported keys are provider, model, default_text_model, verbosity, approval_policy, sandbox_mode and telemetry; use the dedicated option or config set for other keys","messagePattern":"unsupported runtime --set key \\(value omitted\\): supported keys are provider, model, default_text_model, verbosity, approval_policy, sandbox_mode and telemetry; use the dedicated option or config set for other keys","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/cli/src/lib.rs","lineNumber":1916,"sourceCode":"        match key.trim() {\n            \"provider\" => {\n                provider = Some(\n                    parse_provider_identifier(value)\n                        .map_err(|_| anyhow!(\"invalid --set provider (value omitted)\"))?,\n                );\n            }\n            \"model\" | \"default_text_model\" => values.model = Some(value.to_string()),\n            \"verbosity\" => values.verbosity = Some(value.to_string()),\n            \"approval_policy\" => values.approval_policy = Some(value.to_string()),\n            \"sandbox_mode\" => values.sandbox_mode = Some(value.to_string()),\n            \"telemetry\" => {\n                let mut config = ConfigToml::default();\n                config\n                    .set_value(\"telemetry\", value)\n                    .map_err(|_| anyhow!(\"invalid --set telemetry: expected a boolean\"))?;\n                values.telemetry = config.telemetry;\n            }\n            _ => bail!(\n                \"unsupported runtime --set key (value omitted): supported keys are provider, \\\n                 model, default_text_model, verbosity, approval_policy, sandbox_mode and \\\n                 telemetry; use the dedicated option or config set for other keys\"\n            ),\n        }\n        if value.trim().is_empty() {\n            bail!(\"invalid runtime --set: value must not be empty\");\n        }\n    }\n    // A dedicated flag is more specific than a generic --set for the same\n    // field. Repeated --set keys otherwise keep their last value.\n    cli.provider = cli.provider.take().or(provider);\n    cli.model = cli.model.take().or(values.model);\n    cli.verbosity = cli.verbosity.take().or(values.verbosity);\n    cli.approval_policy = cli.approval_policy.take().or(values.approval_policy);\n    cli.sandbox_mode = cli.sandbox_mode.take().or(values.sandbox_mode);\n    cli.telemetry = cli.telemetry.or(values.telemetry);\n    Ok(())","sourceCodeStart":1898,"sourceCodeEnd":1934,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/cli/src/lib.rs#L1898-L1934","documentation":"`apply_runtime_set_overrides` parses each `--set key=value` and matches the key against a fixed allow-list: provider, model, default_text_model, verbosity, approval_policy, sandbox_mode, telemetry. Any other key hits the catch-all `_ => bail!` arm. Only these keys can be set at runtime without a saved config; everything else must go through `codewhale config set`.","triggerScenarios":"Invoking codewhale with `--set some_key=value` where `some_key` is not one of the seven supported runtime keys (provider, model, default_text_model, verbosity, approval_policy, sandbox_mode, telemetry).","commonSituations":"Trying to tweak arbitrary ConfigToml fields via `--set` (e.g. `--set temperature=0.2`), misspelling a supported key (`--set aproval_policy=...`), or copying an example that used `config set` syntax.","solutions":["Move the setting to the saved config: `codewhale config set <key> <value>`, then run without `--set`.","Check the key spelling against the supported list: provider, model, default_text_model, verbosity, approval_policy, sandbox_mode, telemetry.","Use a dedicated CLI flag if one exists for the field (e.g. `--provider`, `--model`) instead of `--set`."],"exampleFix":"// before\ncodewhale --set temperature=0.2 exec \"hi\"\n// error: unsupported runtime --set key ...\n\n// after\ncodewhale config set temperature 0.2\ncodewhale exec \"hi\"","handlingStrategy":"validation","validationCode":"const SET_KEYS: &[&str] = &[\"provider\",\"model\",\"default_text_model\",\"verbosity\",\"approval_policy\",\"sandbox_mode\",\"telemetry\"];\nif !SET_KEYS.contains(&key) {\n    eprintln!(\"key '{key}' is not a runtime --set key; use `codewhale config set {key} <value>`\");\n}","typeGuard":null,"tryCatchPattern":"match run(args) {\n    Err(e) if e.to_string().contains(\"unsupported runtime --set key\") => {\n        eprintln!(\"move this setting to the saved config via `codewhale config set`\");\n    }\n    r => r?,\n}","preventionTips":["Memorize/check the seven supported keys before using --set.","Route all other config fields through `codewhale config set`.","Prefer dedicated flags (--provider, --model) over --set when they exist."],"tags":["cli","configuration","flags","validation"],"backgroundTag":"invalid-cli-argument","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T02:17:17.105Z"}