warpdotdev/warp · error

invalid value 'schedule'

Error message

invalid value 'schedule'

What it means

Thrown by the dispatcher (mod.rs:184-ish arm for CliCommand::Schedule) when the `schedule` subcommand parsed but FeatureFlag::ScheduledAmbientAgents is disabled. It mimics clap's 'invalid value' error so the scheduled-agents subcommand appears absent when the feature is gated off. The flag defaults to false and is not in the always-on build lists, so availability depends on launch channel/server-side enrollment.

Source

Thrown at app/src/ai/agent_sdk/mod.rs:184

            if !FeatureFlag::ProviderCommand.is_enabled() {
                return Err(anyhow::anyhow!("invalid value 'provider'"));
            }
            provider::run(ctx, global_options, provider_cmd)
        }
        #[cfg(not(target_family = "wasm"))]
        CliCommand::Integration(integration_cmd) => {
            if !FeatureFlag::IntegrationCommand.is_enabled() {
                return Err(anyhow::anyhow!("invalid value 'integration'"));
            }
            integration::run(ctx, global_options, integration_cmd)
        }
        #[cfg(target_family = "wasm")]
        CliCommand::Integration(_) => {
            return Err(anyhow::anyhow!("invalid value 'integration'"));
        }
        CliCommand::Schedule(schedule_cmd) => {
            if !FeatureFlag::ScheduledAmbientAgents.is_enabled() {
                return Err(anyhow::anyhow!("invalid value 'schedule'"));
            }
            schedule::run(ctx, global_options, schedule_cmd)
        }
        CliCommand::Secret(secret_cmd) => {
            if !FeatureFlag::WarpManagedSecrets.is_enabled() {
                return Err(anyhow::anyhow!("invalid value 'secret'"));
            }
            secret::run(ctx, global_options, secret_cmd)
        }
        CliCommand::Federate(federate_cmd) => {
            if !FeatureFlag::OzIdentityFederation.is_enabled() {
                return Err(anyhow::anyhow!("invalid value 'federate'"));
            }
            federate::run(ctx, global_options, federate_cmd)
        }
        CliCommand::HarnessSupport(args) => {
            if !FeatureFlag::AgentHarness.is_enabled() {
                return Err(anyhow::anyhow!("invalid value 'harness-support'"));

View on GitHub (pinned to e72fd7aacb)

Solutions

  1. Use a build/account where ScheduledAmbientAgents is enabled (dogfood/preview or server-side enrollment)
  2. Update to a version where scheduled ambient agents are generally available, or drop the `schedule` calls
  3. As a Warp developer, override the flag or add FeatureFlag::ScheduledAmbientAgents to DOGFOOD_FLAGS and rebuild

Example fix

# before
$ oz schedule create --prompt "nightly report" --cron "0 3 * * *"
Error: invalid value 'schedule'

# after (Rust caller checks first)
ensure!(FeatureFlag::ScheduledAmbientAgents.is_enabled(), "schedule unavailable");
Defensive patterns

Strategy: validation

Validate before calling

if matches!(cmd, CliCommand::Schedule(_))
    && !FeatureFlag::ScheduledAmbientAgents.is_enabled()
{
    return Ok(()); // feature gated off; skip gracefully
}

Type guard

pub fn schedule_cmd_available() -> bool {
    FeatureFlag::ScheduledAmbientAgents.is_enabled()
}

Try / catch

match agent_sdk::run(ctx, opts, cmd) {
    Err(e) if e.to_string() == "invalid value 'schedule'" => {
        // scheduled agents unavailable; fall back to immediate runs
    }
    result => result?,
}

Prevention

When it happens

Trigger: Invoking `<cli> schedule <subcmd>` (create/list of scheduled ambient agents) on a build where FeatureFlag::ScheduledAmbientAgents.is_enabled() == false. Parse succeeds; the runtime flag check returns the error.

Common situations: Automating scheduled agent runs from a release build where the feature has not shipped; account not enrolled in the scheduled-agents experiment; cron/CI scripts ported from an environment where the flag was on.

Related errors


AI-assisted analysis of warpdotdev/warp@e72fd7aacb (2026-08-16). Data as JSON: /api/errors/4974463c09be6bba. Report an issue: GitHub.