astrid-runtime/astrid · error
daemon rejected status request: {message}
Error message
daemon rejected status request: {message} What it means
doctor's daemon_roundtrip received a timely KernelResponse::Error for its GetStatus request. The IPC round-trip worked; the daemon itself refused/failed the status request and this error surfaces the daemon's own message verbatim.
Source
Thrown at crates/astrid-cli/src/commands/doctor.rs:242
}
async fn daemon_roundtrip() -> Result<()> {
let mut client = tokio::time::timeout(
Duration::from_secs(5),
crate::socket_client::connect_kernel_for_workspace(None),
)
.await
.map_err(|_| anyhow::anyhow!("connection timed out after 5s"))??;
match tokio::time::timeout(
Duration::from_secs(5),
client.request(KernelRequest::GetStatus),
)
.await
.map_err(|_| anyhow::anyhow!("daemon response timed out after 5s"))??
{
KernelResponse::Status(_) => Ok(()),
KernelResponse::Error(message) => {
Err(anyhow::anyhow!("daemon rejected status request: {message}"))
},
_ => Err(anyhow::anyhow!(
"daemon returned an unexpected status response"
)),
}
}
/// Query the daemon for agent-loop readiness over the same socket the
/// other daemon-dependent checks use. Rides the existing
/// `astrid.v1.request.` ingress allowlist prefix — no capsule change needed.
async fn agent_readiness() -> Result<astrid_core::kernel_api::AgentLoopReadiness> {
let mut client = tokio::time::timeout(
Duration::from_secs(5),
crate::socket_client::connect_kernel_for_workspace(None),
)
.await
.map_err(|_| anyhow::anyhow!("connection timed out after 5s"))??;
match tokio::time::timeout(View on GitHub (pinned to affd8760f4)
Solutions
- Read the daemon's message embedded in the error — it names the specific rejection reason.
- Restart the daemon so it re-registers the workspace, then re-run doctor.
- Ensure CLI and daemon are the same astrid version (upgrade both) to rule out protocol mismatch.
- Run doctor from the correct workspace directory.
Example fix
// before $ astrid doctor Error: daemon rejected status request: workspace not registered // after $ astrid daemon restart && astrid doctor # daemon roundtrip: ok
Defensive patterns
Strategy: try-catch
Validate before calling
// Check the daemon is tracking this workspace before requesting status
if !daemon_workspace_registered(&workspace_path).await? {
eprintln!("workspace not registered with daemon");
} Type guard
// Narrow the response before acting
if let KernelResponse::Error(msg) = resp { return Err(anyhow!("daemon: {msg}")); } Try / catch
match client.request(KernelRequest::GetStatus).await {
Ok(KernelResponse::Status(_)) => Ok(()),
Ok(KernelResponse::Error(m)) => Err(anyhow!("daemon rejected status: {m}")),
Ok(_) => Err(anyhow!("unexpected response")),
Err(e) => Err(e.into()),
} Prevention
- Run CLI and daemon from the same astrid version.
- Register the workspace with the daemon before querying status.
- Surface the daemon's error message to the user instead of masking it.
- Restart the daemon after kernel crashes to clear degraded state.
When it happens
Trigger: daemon_roundtrip matches KernelResponse::Error(message): the kernel rejected GetStatus, e.g. workspace not initialized/registered in the daemon, kernel in a failed state after a crash, version/protocol mismatch between CLI and daemon, or internal kernel error handling the status query.
Common situations: Running doctor from a directory the daemon doesn't track; daemon started under an older/newer astrid version with protocol drift; kernel recovered into a degraded state needing restart.
Related errors
- unexpected daemon response: {other:?}
- unexpected daemon response: {other:?}
- running daemon returned unknown unload status {other:?}
- running daemon returned unload success without a status
- unexpected daemon response: {other:?}
AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09).
Data as JSON: /api/errors/cb56c681c6b25e04.
Report an issue: GitHub.