astrid-runtime/astrid · warning

this executable is an Astrid WinFsp provider, not an…

Error message

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

What it means

The WinFsp provider executable is not a general-purpose CLI: run() requires the sole argument to be exactly --astrid-provider-stdio-v1, through which the host passes a request on stdin. Any other invocation (double-click, bare run, wrong flags) is rejected with this message.

Solutions

  1. Do not run this binary interactively — it is driven by the Astrid host over stdio.
  2. If invoking manually for testing, pass exactly one argument: --astrid-provider-stdio-v1, and pipe a StorageProviderRequestV1 JSON on stdin.
  3. Use the intended Astrid management CLI/service to launch mounts instead of the provider binary directly.
  4. Check any launcher script or service definition for typos or extra arguments in the command line.

Example fix

// before: bare invocation
$ astrid-storage-provider-winfsp.exe
// after: exact provider handshake invocation
$ echo '{"protocol_version":1,...}' | astrid-storage-provider-winfsp.exe --astrid-provider-stdio-v1
Defensive patterns

Strategy: validation

Validate before calling

// Guard any manual invocation:
const ARGS: &[&OsStr] = &[OsStr::new("--astrid-provider-stdio-v1")];
let ok = std::env::args_os().skip(1).collect::<Vec<_>>() == ARGS;
if !ok { eprintln!("run via the Astrid host, not directly"); }

Try / catch

// Only relevant if you shell out to the provider:
let status = Command::new(provider_exe)
    .arg("--astrid-provider-stdio-v1")
    .stdin(Stdio::piped())
    .status()?;

Prevention

When it happens

Trigger: Executing the provider binary with no arguments, with the wrong flag, with extra arguments, or without the exact --astrid-provider-stdio-v1 argument; only the exact single-argument form is accepted.

Common situations: A user double-clicks the .exe or runs it in a terminal expecting an interactive tool; a service manifest or script passes a misspelled or extra argument; documentation confuses the provider binary with an admin CLI.

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/a7c8511cee147dd5. Report an issue: GitHub.

Appendix: source

Thrown at crates/astrid-storage-provider-winfsp/src/main.rs:88

    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 WinFsp provider, 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)