astrid-runtime/astrid · error
non-interactive capsule configuration failed
Error message
non-interactive capsule configuration failed: {} What it means
run_with_elicit collects errors raised during headless (non-interactive) capsule configuration into headless_errors. After the run completes, if any were recorded, it joins them with '; ' and bails, so headless installs fail loudly instead of silently proceeding with incomplete configuration.
Solutions
- Read the joined messages after 'non-interactive capsule configuration failed:' — each is a specific missing/invalid configuration item.
- Supply all required [env] values via --var flags so no interactive elicitation is needed.
- Run interactively (with a TTY) once to discover required fields, then script them.
- Fix the elicit handler/CI setup if errors are spurious (e.g. poisoned error state).
Example fix
// before (CI, no vars) astrid capsule install --source ./capsule.wasm --principal <id> // after astrid capsule install --source ./capsule.wasm --principal <id> --var API_TOKEN=... --var LOG_LEVEL=info
Defensive patterns
Strategy: validation
Validate before calling
// ensure every required [env] field is covered by --var before headless install
for key in required_env_keys("Capsule.toml") { assert!(passed_vars.contains(key), "missing --var {key}"); } Try / catch
catch the error, parse the ';'-joined sub-messages, map each to a missing --var, supply them, and retry once.
Prevention
- In CI, always run installs with a complete --var set (no TTY = no prompts).
- Do one interactive install first to enumerate required fields.
- Keep a per-capsule var file/template synced with Capsule.toml's [env] section.
When it happens
Trigger: Running a capsule install non-interactively (e.g. in CI, or via install_from_local_path_for_principal / unpack_via_lib) where an elicitation prompt could not be answered and the elicit handler recorded an error.
Common situations: CI jobs with no TTY hitting required [env] fields with no --var supplied; missing non-interactive answers for required configuration; elicit callback failing (e.g. no --var coverage for enum/secret fields).
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- Astrid volume path has no file name
- canonical Astrid workspace requires the kernel workspace…
- capsule archive contains duplicate entry
- capsule ' ': distro capsules require a concrete released…
- configure histogram buckets
AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09).
Data as JSON: /api/errors/c0a5ce650014a9df.
Report an issue: GitHub.
Appendix: source
Thrown at crates/astrid-cli/src/commands/capsule/install_finish.rs:50
handle.spawn(async move {
headless_elicit_handler(receiver, bus_for_handler, vars, errors).await;
})
} else {
handle.spawn(async move {
cli_elicit_handler(receiver, bus_for_handler).await;
})
}
});
let result = f(opts, event_bus.clone());
if let Some(task) = elicit_task {
task.abort();
}
drop(event_bus);
let errors = headless_errors
.lock()
.map_err(|_| anyhow::anyhow!("headless configuration error state was poisoned"))?;
if !errors.is_empty() {
bail!(
"non-interactive capsule configuration failed: {}",
errors.join("; ")
);
}
result
}
/// Validate install output, surface diagnostics, and persist manual install
/// configuration before returning the installed capsule identity.
pub(super) fn finish_install(
output: &InstallOutput,
home: &AstridHome,
principal: &astrid_core::PrincipalId,
prompt: &ManualInstallOptions,
) -> anyhow::Result<InstalledCapsuleOutcome> {
let batch = BATCH_MODE.load(std::sync::atomic::Ordering::Relaxed);
let manifest_path = output.target_dir.join("Capsule.toml");
let manifest = astrid_capsule::discovery::load_manifest(&manifest_path)View on GitHub (pinned to affd8760f4)