astrid-runtime/astrid · error

this executable is an Astrid provider companion, not an inte

Error message

this executable is an Astrid provider companion, not an interactive command

What it means

The fskit provider companion binary is not a general-purpose CLI. run() requires exactly one argument, the literal --astrid-provider-stdio-v1, under which it speaks a request/response protocol on stdin/stdout. Any other invocation is rejected to prevent accidental interactive use.

Source

Thrown at crates/astrid-storage-provider-fskit/src/main.rs:78

    let response = run().await;
    match response {
        Ok(response) => {
            if serde_json::to_writer(std::io::stdout().lock(), &response).is_err() {
                std::process::exit(2);
            }
            println!();
        },
        Err(error) => {
            eprintln!("{PROVIDER_NAME}: {error:#}");
            std::process::exit(2);
        },
    }
}

async fn run() -> Result<StorageProviderResponseV1> {
    let arguments = std::env::args_os().skip(1).collect::<Vec<_>>();
    if arguments.as_slice() != [std::ffi::OsStr::new("--astrid-provider-stdio-v1")] {
        bail!("this executable is an Astrid provider companion, not an interactive command");
    }
    let mut bytes = Vec::new();
    std::io::stdin()
        .lock()
        .take(MAX_REQUEST_BYTES + 1)
        .read_to_end(&mut bytes)
        .context("read provider request")?;
    if bytes.len() as u64 > MAX_REQUEST_BYTES {
        bail!("provider request exceeds limit");
    }
    let request: StorageProviderRequestV1 =
        serde_json::from_slice(&bytes).context("decode provider request")?;
    if request.protocol_version != STORAGE_PROVIDER_PROTOCOL_V1 {
        bail!("unsupported provider protocol {}", request.protocol_version);
    }
    let request_id = request.request_id;
    let outcome = match execute(request).await {
        Ok(success) => StorageProviderOutcomeV1::Success(success),

View on GitHub (pinned to affd8760f4)

Solutions

  1. Launch the binary with exactly one argument: --astrid-provider-stdio-v1
  2. Check how the process is spawned (kernel/supervisor config) and correct the argument list
  3. Do not use this binary interactively; use the kernel admin tooling instead

Example fix

// before
$ astrid-storage-provider-fskit --mount /mnt/data
// after
$ astrid-storage-provider-fskit --astrid-provider-stdio-v1
Defensive patterns

Strategy: validation

Validate before calling

// spawn check (client side)
const PROTOCOL_FLAG: &str = "--astrid-provider-stdio-v1";
assert_eq!(args, vec![PROTOCOL_FLAG], "companion must be launched with exactly the stdio v1 protocol flag");

Prevention

When it happens

Trigger: Running the binary with no arguments, with the wrong flag, or with extra arguments — anything other than exactly `binary --astrid-provider-stdio-v1`.

Common situations: A developer runs the executable directly from a terminal to 'try it out'; a supervisor or script launches it with the wrong protocol flag (e.g. an outdated protocol version string); packaging/wrapper scripts add extra arguments.

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 astrid-runtime/astrid@affd8760f4 (2026-09-09). Data as JSON: /api/errors/09f4791d0b6580d8. Report an issue: GitHub.