{"record":{"id":"dd8392f82c334cf7","repo":"nikivdev/code","slug":"failed-to-launch-ai-taskd-status","errorCode":null,"errorMessage":"failed to launch ai-taskd (status {})","messagePattern":"failed to launch ai-taskd \\(status (.+?)\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/ai_taskd.rs","lineNumber":122,"sourceCode":"        println!(\"ai-taskd already running ({})\", socket_path().display());\n        return Ok(());\n    }\n\n    let exe = std::env::current_exe().context(\"failed to resolve current executable\")?;\n    let launch = format!(\n        \"nohup {} tasks daemon serve >/dev/null 2>&1 &\",\n        shell_quote(&exe.to_string_lossy())\n    );\n    let status = Command::new(\"sh\")\n        .arg(\"-lc\")\n        .arg(launch)\n        .stdin(Stdio::null())\n        .stdout(Stdio::null())\n        .stderr(Stdio::null())\n        .status()\n        .context(\"failed to launch ai-taskd\")?;\n    if !status.success() {\n        bail!(\"failed to launch ai-taskd (status {})\", status);\n    }\n\n    let deadline = Instant::now() + Duration::from_secs(3);\n    while Instant::now() < deadline {\n        if ping().is_ok() {\n            println!(\"ai-taskd started ({})\", socket_path().display());\n            return Ok(());\n        }\n        std::thread::sleep(Duration::from_millis(100));\n    }\n\n    bail!(\n        \"ai-taskd failed to start within timeout (socket: {})\",\n        socket_path().display()\n    )\n}\n\npub fn stop() -> Result<()> {","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/ai_taskd.rs#L104-L140","documentation":"Error \"failed to launch ai-taskd (status {})\" thrown in nikivdev/code.","triggerScenarios":"Thrown at src/ai_taskd.rs:122 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}