astrid-runtime/astrid · error
running daemon returned unknown unload status {other:?}
Error message
running daemon returned unknown unload status {other:?} What it means
Raised by `try_daemon_unload` when a live-unload request succeeds at the transport level (`KernelResponse::Success`) but the `status` string inside the response data is neither `unloaded` nor `not_loaded` — an unrecognized status value. The daemon acknowledged the request but returned a status the CLI does not know, indicating protocol drift or a non-conforming daemon.
Source
Thrown at crates/astrid-cli/src/commands/capsule/live_load.rs:165
astrid_types::ipc::IpcPayload::RawJson(val),
session_uuid,
);
client
.send_message(msg)
.await
.context("failed to send live capsule unload request")?;
let raw = client
.read_until_topic(response_topic.as_str(), std::time::Duration::from_secs(15))
.await
.context("running daemon did not confirm live capsule unload")?;
match crate::socket_client::SocketClient::extract_kernel_response(&raw) {
Some(KernelResponse::Success(data)) => {
match data.get("status").and_then(serde_json::Value::as_str) {
Some("unloaded") => Ok(LiveUnload::Unloaded),
Some("not_loaded") => Ok(LiveUnload::NotLoaded),
Some(other) => bail!("running daemon returned unknown unload status {other:?}"),
None => bail!("running daemon returned unload success without a status"),
}
},
Some(KernelResponse::Error(reason)) => {
bail!("running daemon declined live capsule unload: {reason}")
},
_ => bail!("running daemon returned a malformed live capsule unload response"),
}
}
async fn daemon_socket_reachable() -> bool {
let path = crate::socket_client::proxy_socket_path();
matches!(
astrid_core::local_transport::connect_outcome(&path).await,
Ok(astrid_core::local_transport::ConnectOutcome::Connected(_))
)
}
View on GitHub (pinned to affd8760f4)
Solutions
- Note the unknown status printed in `{other:?}` and upgrade the CLI to match the daemon's protocol.
- Restart the daemon on the matching version so both binaries agree on status vocabulary.
- As a fallback, perform a full (non-live) uninstall/reinstall of the capsule instead of live unload.
- Check whether any proxy or wrapper is modifying daemon responses.
Example fix
// before: newer daemon returns "partially_unloaded" // error: running daemon returned unknown unload status "partially_unloaded" // after: align versions astrid upgrade cli && astrid daemon restart astrid capsule live-unload my-capsule
Defensive patterns
Strategy: type-guard
Validate before calling
if let Some(status) = data.get("status").and_then(|v| v.as_str()) {
if !matches!(status, "unloaded" | "not_loaded") {
eprintln!("Daemon reported unrecognized unload status '{status}'; upgrade the CLI.");
}
} Type guard
fn known_unload_status(data: &serde_json::Value) -> Option<LiveUnload> {
match data.get("status").and_then(serde_json::Value::as_str)? {
"unloaded" => Some(LiveUnload::Unloaded),
"not_loaded" => Some(LiveUnload::NotLoaded),
_ => None,
}
} Try / catch
match try_daemon_unload(name).await {
Ok(LiveUnload::Unloaded) | Ok(LiveUnload::NotLoaded) => proceed(),
Err(e) if e.to_string().contains("unknown unload status") => {
eprintln!("{e:#}\nCLI/daemon version mismatch - upgrade the CLI or use full uninstall.");
},
Err(e) => return Err(e),
} Prevention
- Keep CLI and daemon on the same release so status vocabularies match.
- Fall back to a full uninstall/reinstall when live unload reports an unrecognized status.
- Log the raw daemon payload when adding new status strings to avoid silent mismatches.
- Test live-unload against your daemon build before automating it.
When it happens
Trigger: Attempting a live unload of a running capsule where the daemon's Success payload contains `status` values like a new `"partial"`, localized, or version-skewed status string that this CLI build does not map to `LiveUnload::Unloaded`/`NotLoaded`.
Common situations: Daemon running a newer build that emits new unload statuses while the CLI is older; custom daemon builds with different status vocabulary; manual edits or middleware altering the response JSON.
Related errors
- unexpected daemon response: {other:?}
- unexpected daemon response: {other:?}
- running daemon returned unload success without a status
- unexpected daemon response: {other:?}
- daemon returned an unexpected status response: {other:?}
AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09).
Data as JSON: /api/errors/c54cbfe9aa30754e.
Report an issue: GitHub.