{"record":{"id":"6885e323a8a27d33","repo":"Hmbown/CodeWhale","slug":"set-is-not-supported-by-auth-commands-use-a-saved-config","errorCode":null,"errorMessage":"--set is not supported by auth commands; use a saved config","messagePattern":"--set is not supported by auth commands; use a saved config","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/cli/src/lib.rs","lineNumber":1951,"sourceCode":"    cli.telemetry = cli.telemetry.or(values.telemetry);\n    Ok(())\n}\n\nfn run() -> Result<()> {\n    let matches = Cli::command().get_matches();\n    let project_bundle_scope = config_command_targets_project(&matches);\n    let mut cli = Cli::from_arg_matches(&matches).unwrap_or_else(|error| error.exit());\n\n    // The detached log proxy must not depend on user config parsing: its job\n    // is to frame child output and publish a terminal receipt even when the\n    // delegated command's own config is malformed.\n    let (proxy, command) = split_lane_log_proxy_command(cli.command.take());\n    if let Some(args) = proxy {\n        return run_lane_log_proxy_command(args);\n    }\n\n    if !cli.overrides.is_empty() && matches!(command, Some(Commands::Auth(_))) {\n        bail!(\"--set is not supported by auth commands; use a saved config\");\n    }\n    if !cli.overrides.is_empty()\n        && matches!(&command, Some(Commands::AppServer(args)) if !args.http && !args.mobile)\n    {\n        bail!(\n            \"--set is not supported by the legacy app-server transport; use app-server --http or a saved config\"\n        );\n    }\n    if !matches!(command, Some(Commands::Config(_))) {\n        apply_runtime_set_overrides(&mut cli)?;\n    }\n\n    let pipe_api_key_handoff = matches!(\n        &command,\n        Some(Commands::Auth(AuthArgs {\n            command: AuthCommand::PrintApiKey { .. }\n        }))\n    );","sourceCodeStart":1933,"sourceCodeEnd":1969,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/cli/src/lib.rs#L1933-L1969","documentation":"The CLI main dispatcher rejects `--set` overrides when the resolved subcommand is `Auth`: auth flows use stored credentials and applying runtime config overrides to them is not supported. If `cli.overrides` is non-empty and the command matches `Commands::Auth(_)`, it bails with a pointer to saved configs. This prevents users from believing a transient `--set` influenced authentication.","triggerScenarios":"Running any `codewhale auth ...` subcommand while supplying one or more `--set key=value` overrides on the same invocation.","commonSituations":"Scripted login attempts that bundle model/provider overrides with `auth login`, or users assuming runtime overrides apply globally to all subcommands.","solutions":["Drop the `--set` flags and configure behavior via `codewhale config set` before running the auth command.","Run the auth command without overrides, then apply runtime settings to the actual session/exec invocation.","If you need different settings per environment, use separate saved config profiles rather than `--set` on auth."],"exampleFix":"// before\ncodewhale --set model=gpt-x auth login\n// error: --set is not supported by auth commands\n\n// after\ncodewhale auth login\ncodewhale config set model gpt-x","handlingStrategy":"validation","validationCode":"# guard in wrapper script\ncase \"$*\" in\n  *auth*) [ -n \"$OVERRIDES\" ] && { echo \"drop --set for auth commands\"; exit 2; };;\nesac","typeGuard":null,"tryCatchPattern":"match run(args) {\n    Err(e) if e.to_string().contains(\"not supported by auth commands\") => {\n        eprintln!(\"configure via `codewhale config set` before auth\");\n    }\n    r => r?,\n}","preventionTips":["Never mix --set with auth subcommands in scripts.","Persist environment-specific settings in saved config profiles.","Run auth flows first, then apply runtime settings to session commands."],"tags":["cli","authentication","flags","configuration"],"backgroundTag":"conflicting-config-options","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"}