Hmbown/CodeWhale · error

unsupported runtime --set key (value omitted): supported…

Error message

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

What it means

`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`.

Solutions

  1. Move the setting to the saved config: `codewhale config set <key> <value>`, then run without `--set`.
  2. Check the key spelling against the supported list: provider, model, default_text_model, verbosity, approval_policy, sandbox_mode, telemetry.
  3. Use a dedicated CLI flag if one exists for the field (e.g. `--provider`, `--model`) instead of `--set`.

Example fix

// before
codewhale --set temperature=0.2 exec "hi"
// error: unsupported runtime --set key ...

// after
codewhale config set temperature 0.2
codewhale exec "hi"
Defensive patterns

Strategy: validation

Validate before calling

const SET_KEYS: &[&str] = &["provider","model","default_text_model","verbosity","approval_policy","sandbox_mode","telemetry"];
if !SET_KEYS.contains(&key) {
    eprintln!("key '{key}' is not a runtime --set key; use `codewhale config set {key} <value>`");
}

Try / catch

match run(args) {
    Err(e) if e.to_string().contains("unsupported runtime --set key") => {
        eprintln!("move this setting to the saved config via `codewhale config set`");
    }
    r => r?,
}

Prevention

When it happens

Trigger: 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).

Common situations: 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.

Understand the failure class

Background: "Unknown argument", "Invalid value", and "must be one of": invalid CLI argument errors explained — this error's family across 35 libraries.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22). Data as JSON: /api/errors/7efcc997c0752b42. Report an issue: GitHub.

Appendix: source

Thrown at crates/cli/src/lib.rs:1916

        match key.trim() {
            "provider" => {
                provider = Some(
                    parse_provider_identifier(value)
                        .map_err(|_| anyhow!("invalid --set provider (value omitted)"))?,
                );
            }
            "model" | "default_text_model" => values.model = Some(value.to_string()),
            "verbosity" => values.verbosity = Some(value.to_string()),
            "approval_policy" => values.approval_policy = Some(value.to_string()),
            "sandbox_mode" => values.sandbox_mode = Some(value.to_string()),
            "telemetry" => {
                let mut config = ConfigToml::default();
                config
                    .set_value("telemetry", value)
                    .map_err(|_| anyhow!("invalid --set telemetry: expected a boolean"))?;
                values.telemetry = config.telemetry;
            }
            _ => bail!(
                "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"
            ),
        }
        if value.trim().is_empty() {
            bail!("invalid runtime --set: value must not be empty");
        }
    }
    // A dedicated flag is more specific than a generic --set for the same
    // field. Repeated --set keys otherwise keep their last value.
    cli.provider = cli.provider.take().or(provider);
    cli.model = cli.model.take().or(values.model);
    cli.verbosity = cli.verbosity.take().or(values.verbosity);
    cli.approval_policy = cli.approval_policy.take().or(values.approval_policy);
    cli.sandbox_mode = cli.sandbox_mode.take().or(values.sandbox_mode);
    cli.telemetry = cli.telemetry.or(values.telemetry);
    Ok(())

View on GitHub (pinned to 73e0f67d83)