{"record":{"id":"41d52a0896973cfe","repo":"NousResearch/hermes-agent","slug":"waiting-for-child-e","errorCode":null,"errorMessage":"waiting for child: {e}","messagePattern":"waiting for child: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"apps/bootstrap-installer/src-tauri/src/update.rs","lineNumber":858,"sourceCode":"                Ok(Some(l)) => emit_log(app, stage_owned.as_deref(), LogStream::Stdout, &l),\n                Ok(None) => break,\n                Err(e) => { tracing::warn!(\"stdout read error: {e}\"); break; }\n            },\n            line = read_decoded_line(&mut err, &mut err_buf) => match line {\n                Ok(Some(l)) => emit_log(app, stage_owned.as_deref(), LogStream::Stderr, &l),\n                Ok(None) => {}\n                Err(e) => { tracing::warn!(\"stderr read error: {e}\"); }\n            },\n        }\n    }\n    while let Ok(Some(l)) = read_decoded_line(&mut out, &mut out_buf).await {\n        emit_log(app, stage_owned.as_deref(), LogStream::Stdout, &l);\n    }\n    while let Ok(Some(l)) = read_decoded_line(&mut err, &mut err_buf).await {\n        emit_log(app, stage_owned.as_deref(), LogStream::Stderr, &l);\n    }\n\n    let status = child.wait().await.map_err(|e| anyhow!(\"waiting for child: {e}\"))?;\n    Ok(CmdResult {\n        exit_code: status.code(),\n    })\n}\n\nstruct CmdResult {\n    exit_code: Option<i32>,\n}\n\n/// Path to the venv hermes shim under an install root, regardless of existence.\nfn venv_hermes(install_root: &Path) -> PathBuf {\n    if cfg!(target_os = \"windows\") {\n        install_root.join(\"venv\").join(\"Scripts\").join(\"hermes.exe\")\n    } else {\n        install_root.join(\"venv\").join(\"bin\").join(\"hermes\")\n    }\n}\n","sourceCodeStart":840,"sourceCodeEnd":876,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/apps/bootstrap-installer/src-tauri/src/update.rs#L840-L876","documentation":"Raised in run_streamed when awaiting the already-spawned child's exit status fails (child.wait().await returned Err). The process ran and its output was streamed; only the final wait syscall failed — typically the child was killed by a signal (no exit code available) or reaped/killed externally (e.g. job-object teardown, system shutdown) so tokio cannot report a status.","triggerScenarios":"The child (hermes update / hermes desktop --build-only) gets SIGKILLed by an OOM killer, task manager, or a shutdown mid-run; the updater process itself is being torn down while awaiting; cgroup/container eviction kills the child.","commonSituations":"Memory-hungry electron build killed by the OOM killer; user ends the process tree from Task Manager/Activity Monitor mid-update; system sleep/shutdown during the update; WSL2 VM reclaiming memory during the build.","solutions":["Check system logs (dmesg OOM lines, Event Viewer) for evidence the child was killed.","Free memory/close other apps and retry the update.","Avoid force-killing the updater or its children; close windows normally so shutdown is graceful.","If it recurs on the same step, run the printed child command manually to reproduce outside the updater."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match child.wait().await {\n    Ok(status) => Ok(CmdResult { exit_code: status.code() }),\n    Err(e) => {\n        // Child was killed/reaped (OOM, signal, external kill). Treat as failure with context,\n        // and hint at system-level causes rather than retrying blindly.\n        Err(anyhow!(\"waiting for child: {e} — the process may have been killed (OOM / signal / shutdown)\"))\n    }\n}","preventionTips":["Free memory and close other apps before update builds — the OOM killer is the usual cause.","Never force-kill the updater's process tree; close windows gracefully instead.","Run the child command manually first to confirm it completes on a constrained machine."],"tags":["child-process","update","os-signal","bootstrap-installer"],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}