{"record":{"id":"607782dfb91dbbb5","repo":"astrid-runtime/astrid","slug":"daemon-rejected-readiness-query-msg","errorCode":null,"errorMessage":"daemon rejected readiness query: {msg}","messagePattern":"daemon rejected readiness query: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-cli/src/commands/doctor.rs","lineNumber":269,"sourceCode":"/// other daemon-dependent checks use. Rides the existing\n/// `astrid.v1.request.` ingress allowlist prefix — no capsule change needed.\nasync fn agent_readiness() -> Result<astrid_core::kernel_api::AgentLoopReadiness> {\n    let mut client = tokio::time::timeout(\n        Duration::from_secs(5),\n        crate::socket_client::connect_kernel_for_workspace(None),\n    )\n    .await\n    .map_err(|_| anyhow::anyhow!(\"connection timed out after 5s\"))??;\n    match tokio::time::timeout(\n        Duration::from_secs(5),\n        client.request(KernelRequest::GetAgentReadiness),\n    )\n    .await\n    .map_err(|_| anyhow::anyhow!(\"daemon response timed out after 5s\"))??\n    {\n        KernelResponse::AgentReadiness(readiness) => Ok(readiness),\n        KernelResponse::Error(msg) => {\n            Err(anyhow::anyhow!(\"daemon rejected readiness query: {msg}\"))\n        },\n        _ => Err(anyhow::anyhow!(\n            \"daemon did not return an agent-readiness response\"\n        )),\n    }\n}\n\nasync fn projection_name_diagnostic(\n    policy: ProjectionNamePolicyPreset,\n) -> Result<ProjectionNameDiagnostic> {\n    let mut client = tokio::time::timeout(\n        Duration::from_secs(5),\n        crate::socket_client::connect_kernel_for_workspace(None),\n    )\n    .await\n    .map_err(|_| anyhow::anyhow!(\"connection timed out after 5s\"))??;\n    tokio::time::timeout(\n        Duration::from_secs(30),","sourceCodeStart":251,"sourceCodeEnd":287,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-cli/src/commands/doctor.rs#L251-L287","documentation":"When the daemon answers GetAgentReadiness with KernelResponse::Error, the inner message is surfaced as 'daemon rejected readiness query: {msg}'. The request and response round-tripped fine; the daemon itself refused the readiness computation or reported an application-level failure.","triggerScenarios":"The daemon returns KernelResponse::Error(msg) for a GetAgentReadiness request — e.g. its internal readiness evaluation failed, the workspace state is invalid, or the daemon lacks required state to evaluate agent-loop readiness.","commonSituations":"Corrupt or partially-initialized workspace state on the daemon; daemon running against an incompatible store; internal daemon error while checking configured interfaces.","solutions":["Read the interpolated {msg} for the daemon's underlying failure reason","Fix the workspace/kernel state indicated by the inner message","Restart the daemon to clear bad in-memory state","Add logging around the daemon's readiness evaluator to capture the root cause"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match agent_readiness().await {\n    Err(e) if e.to_string().starts_with(\"daemon rejected readiness query\") => {\n        // surface the inner daemon message; inspect daemon logs\n        eprintln!(\"{e:#}\");\n    }\n    other => other?,\n}","preventionTips":["Keep workspace/kernel state valid and initialized","Check daemon logs for the inner failure reason","Restart the daemon after version upgrades","Run doctor regularly to catch state corruption early"],"tags":["daemon","ipc","readiness","application-error"],"backgroundTag":"api-error-response","analyzedSha":"affd8760f44190dbdfbec23403f4c4b642c33112","analyzedAt":"2026-09-09T21:28:12.402Z","contentChangedAt":"2026-09-09T21:28:12.402Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}