{"record":{"id":"3f94a1805124dae4","repo":"zeroclaw-labs/zeroclaw","slug":"systemd-user-lingering-could-not-be-checked-with-l","errorCode":null,"errorMessage":"systemd user lingering could not be checked with loginctl","messagePattern":"systemd user lingering could not be checked with loginctl","errorType":"console","errorClass":"DiagItem","httpStatus":null,"severity":"warning","filePath":"crates/zeroclaw-runtime/src/doctor/mod.rs","lineNumber":1768,"sourceCode":"        ));\n    }\n}\n\nfn systemd_linger_diag_item(status: crate::service::SystemdUserLinger) -> DiagItem {\n    let cat = \"environment\";\n    match status {\n        crate::service::SystemdUserLinger::Enabled => DiagItem::ok(\n            cat,\n            crate::i18n::get_required_cli_string(\"cli-doctor-systemd-linger-enabled\"),\n        ),\n        crate::service::SystemdUserLinger::Disabled { user } => DiagItem::warn(\n            cat,\n            crate::i18n::get_required_cli_string_with_args(\n                \"cli-doctor-systemd-linger-disabled\",\n                &[(\"user\", user.as_str())],\n            ),\n        ),\n        crate::service::SystemdUserLinger::Unknown => DiagItem::warn(\n            cat,\n            crate::i18n::get_required_cli_string(\"cli-doctor-systemd-linger-unknown\"),\n        ),\n    }\n}\n\nfn check_cli_tools(items: &mut Vec<DiagItem>) {\n    let cat = \"cli-tools\";\n\n    let discovered = crate::tools::discover_cli_tools(&[], &[]);\n\n    if discovered.is_empty() {\n        items.push(DiagItem::warn(cat, \"No CLI tools found in PATH\"));\n    } else {\n        for cli in &discovered {\n            let version_info = cli\n                .version\n                .as_deref()","sourceCodeStart":1750,"sourceCodeEnd":1786,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-runtime/src/doctor/mod.rs#L1750-L1786","documentation":"A `zeroclaw doctor` warning from `systemd_linger_diag_item`: the linger check returned `SystemdUserLinger::Unknown`, meaning `loginctl` could not answer (binary missing, no user session bus, or a non-standard systemd setup). Doctor cannot decide whether the user service will survive logout, so it warns rather than guessing.","triggerScenarios":"Running `zeroclaw doctor` on a host where `systemd_user_linger_status()` cannot complete: `loginctl` absent from PATH, D-Bus user session not available, containers, WSL1, or init systems that are not systemd despite `/run/systemd` hints.","commonSituations":"Docker/Podman containers with a partial systemd userland; chroot or minimal VMs; broken polkit/dbus setups; SSH sessions without a user session bus.","solutions":["Verify `loginctl` is installed and on PATH (`command -v loginctl`).","If running in a container or non-systemd environment, treat this warning as expected and rely on the container supervisor for lifecycle.","On real systemd hosts, check the user session bus (`systemctl --user status`) and dbus-user-session package, then re-run `zeroclaw doctor`."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"match zeroclaw_runtime::service::systemd_user_linger_status() {\n    zeroclaw_runtime::service::SystemdUserLinger::Unknown => {\n        // no loginctl answer: treat lifecycle as container/supervisor-managed, not an error\n    }\n    other => { /* handle Enabled/Disabled as usual */ }\n}","preventionTips":["In containers, let the container supervisor own lifecycle and skip systemd linger expectations.","Install `loginctl` (systemd package) plus dbus-user-session where systemd user services are intended."],"tags":["environment","systemd","loginctl","doctor","containers","zeroclaw"],"backgroundTag":"systemd-not-available","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}