warpdotdev/warp · error

invalid value 'artifact'

Error message

invalid value 'artifact'

What it means

Thrown by the dispatcher arm for CliCommand::Artifact (mod.rs:208) when `artifact` parsed but FeatureFlag::ArtifactCommand is disabled. The clap-shaped 'invalid value' error makes the artifact subcommand (upload/download of run artifacts) appear nonexistent when the flag is off. Flag defaults to false and is not in the always-on lists.

Source

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

                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'"));
            }
            harness_support::run(ctx, global_options, args)
        }
        CliCommand::Artifact(artifact_cmd) => {
            if !FeatureFlag::ArtifactCommand.is_enabled() {
                return Err(anyhow::anyhow!("invalid value 'artifact'"));
            }
            artifact::run(ctx, global_options, artifact_cmd)
        }
        CliCommand::ApiKey(api_key_cmd) => {
            if !FeatureFlag::APIKeyManagement.is_enabled() {
                return Err(anyhow::anyhow!("invalid value 'api-key'"));
            }
            api_key::run(ctx, global_options, api_key_cmd)
        }
        CliCommand::Runner(runner_cmd) => {
            if !FeatureFlag::CloudAgentRunners.is_enabled() {
                return Err(anyhow::anyhow!("invalid value 'runner'"));
            }
            runner::run(ctx, global_options, runner_cmd)
        }
    }
}

View on GitHub (pinned to e72fd7aacb)

Solutions

  1. Run artifact commands from a build/account where ArtifactCommand is enabled
  2. Update to a version where artifacts shipped to your channel
  3. As a fallback for CI, publish outputs through your own storage instead of the artifact subcommand
  4. As a Warp developer, override the flag or add FeatureFlag::ArtifactCommand to DOGFOOD_FLAGS and rebuild

Example fix

# before
$ oz artifact upload ./out
Error: invalid value 'artifact'

# after
if FeatureFlag::ArtifactCommand.is_enabled() {
    artifact::run(ctx, global_options, cmd)?;
}
Defensive patterns

Strategy: validation

Validate before calling

if matches!(cmd, CliCommand::Artifact(_))
    && !FeatureFlag::ArtifactCommand.is_enabled()
{
    return Ok(()); // publish artifacts elsewhere
}

Type guard

pub fn artifact_cmd_available() -> bool {
    FeatureFlag::ArtifactCommand.is_enabled()
}

Try / catch

match agent_sdk::run(ctx, opts, cmd) {
    Err(e) if e.to_string() == "invalid value 'artifact'" => {
        // fall back to your own artifact storage
    }
    result => result?,
}

Prevention

When it happens

Trigger: Invoking `<cli> artifact <subcmd>` (e.g. uploading outputs of an agent run) where FeatureFlag::ArtifactCommand.is_enabled() == false.

Common situations: CI jobs that publish agent-run artifacts using a release-channel binary; org tenants not enrolled in artifact storage; pipelines ported from dogfood environments.

Related errors


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