{"record":{"id":"db91348e5f4569f8","repo":"warpdotdev/warp","slug":"invalid-value-integration","errorCode":null,"errorMessage":"invalid value 'integration'","messagePattern":"invalid value 'integration'","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/ai/agent_sdk/mod.rs","lineNumber":174,"sourceCode":"        CliCommand::Run(task_cmd) => run_task(ctx, global_options, task_cmd),\n        CliCommand::Model(model_cmd) => model::run(ctx, global_options, model_cmd),\n        CliCommand::MemoryStore(memory_store_cmd) => {\n            memory_store::run(ctx, global_options, memory_store_cmd)\n        }\n        CliCommand::Memory(memory_cmd) => memory_store::run_memory(ctx, global_options, memory_cmd),\n        CliCommand::Login => admin::login(ctx),\n        CliCommand::Logout => admin::logout(ctx),\n        CliCommand::Whoami => admin::whoami(ctx, global_options.output_format),\n        CliCommand::Provider(provider_cmd) => {\n            if !FeatureFlag::ProviderCommand.is_enabled() {\n                return Err(anyhow::anyhow!(\"invalid value 'provider'\"));\n            }\n            provider::run(ctx, global_options, provider_cmd)\n        }\n        #[cfg(not(target_family = \"wasm\"))]\n        CliCommand::Integration(integration_cmd) => {\n            if !FeatureFlag::IntegrationCommand.is_enabled() {\n                return Err(anyhow::anyhow!(\"invalid value 'integration'\"));\n            }\n            integration::run(ctx, global_options, integration_cmd)\n        }\n        #[cfg(target_family = \"wasm\")]\n        CliCommand::Integration(_) => {\n            return Err(anyhow::anyhow!(\"invalid value 'integration'\"));\n        }\n        CliCommand::Schedule(schedule_cmd) => {\n            if !FeatureFlag::ScheduledAmbientAgents.is_enabled() {\n                return Err(anyhow::anyhow!(\"invalid value 'schedule'\"));\n            }\n            schedule::run(ctx, global_options, schedule_cmd)\n        }\n        CliCommand::Secret(secret_cmd) => {\n            if !FeatureFlag::WarpManagedSecrets.is_enabled() {\n                return Err(anyhow::anyhow!(\"invalid value 'secret'\"));\n            }\n            secret::run(ctx, global_options, secret_cmd)","sourceCodeStart":156,"sourceCodeEnd":192,"githubUrl":"https://github.com/warpdotdev/warp/blob/e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc/app/src/ai/agent_sdk/mod.rs#L156-L192","documentation":"Thrown by the agent SDK CLI dispatcher (app/src/ai/agent_sdk/mod.rs:174) after clap has already parsed the `integration` subcommand. The non-wasm match arm checks FeatureFlag::IntegrationCommand and, when the flag is off, returns an anyhow error worded exactly like clap's 'invalid value' parse failure, so a disabled subcommand looks nonexistent to scripts. Flags resolve override -> user preference -> launch-environment/server state and default to false; this flag is not in the always-on DOGFOOD/PREVIEW/RELEASE lists, so most release-channel builds hit this.","triggerScenarios":"Invoking `<cli> integration <subcmd>` on a native build where FeatureFlag::IntegrationCommand.is_enabled() == false. Parsing succeeds because clap's grammar always contains the variant; the error comes only from the runtime flag check inside the handler.","commonSituations":"Running the CLI from a stable/release Warp install while MCP/OAuth integrations are still gated; an account not enrolled server-side; scripts written against a dogfood build reused on a release build; after switching update channels or downgrading.","solutions":["Run the command from a build/channel where the integration feature is enabled (dogfood/preview build, or an account enrolled server-side)","Update Warp/the CLI to a version where the gate has been promoted to your channel","If you are a Warp developer, set a feature-flag override (or set_user_preference) or add FeatureFlag::IntegrationCommand to DOGFOOD_FLAGS and rebuild","If integrations are not needed, drop the `integration` subcommand from the invocation/script"],"exampleFix":"# before\n$ oz integration list\nError: invalid value 'integration'\n\n# after (developer override before dispatch)\nif !FeatureFlag::IntegrationCommand.is_enabled() {\n    eprintln!(\"integration is not available in this build\");\n    return Ok(());\n}","handlingStrategy":"validation","validationCode":"// In Rust, before dispatching CLI commands:\nif matches!(cmd, CliCommand::Integration(_))\n    && !FeatureFlag::IntegrationCommand.is_enabled()\n{\n    eprintln!(\"integration is unavailable in this build\");\n    return Ok(());\n}","typeGuard":"pub fn integration_cmd_available() -> bool {\n    cfg!(not(target_family = \"wasm\"))\n        && FeatureFlag::IntegrationCommand.is_enabled()\n}","tryCatchPattern":"// Treat clap-shaped 'invalid value' as \"command unavailable\", not a crash:\nmatch agent_sdk::run(ctx, opts, cmd) {\n    Err(e) if e.to_string() == \"invalid value 'integration'\" => {\n        // skip or warn; feature gated off in this build\n    }\n    result => result?,\n}","preventionTips":["Check FeatureFlag::IntegrationCommand.is_enabled() in-process before dispatching","Do not infer availability from parse success - clap accepts the subcommand in every build","Probe gated subcommands once at script startup and cache the result","Pin automation to a build/channel whose flag set you have verified"],"tags":["cli","feature-flags","rust","clap","warp"],"backgroundTag":null,"analyzedSha":"e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc","analyzedAt":"2026-08-16T08:27:25.381Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}