[bug] Services.ts: false "core not running" warning from sandboxed or non-gui shells
What happened
Services.ts reports core services as not running when the shell cannot see launchd's gui domain. LIFEOS/TOOLS/Services.ts loadedLabelsDarwin() runs 'launchctl list' and tests membership by exact label. From a sandboxed or non-aqua shell (a Claude Code subagent's Seatbelt shell, an SSH session, a launchd-spawned job) 'launchctl list' returns no gui-domain jobs, so 'Services.ts status' prints a core-not-running warning for 20 jobs that are loaded and running. From an interactive terminal the same command lists all 20 and prints no warning. Suggested fix: read the gui domain explicitly with 'launchctl print gui/$UID' (falling back to 'launchctl list' when that fails) so the check gives the same answer from every shell, or name the domain that was read in the warning. Seen on LifeOS 8.761.0, macOS 27.2.
Summary
The loaded-label check reads launchctl list, which returns no gui-domain jobs from a Seatbelt-sandboxed subagent shell, an SSH session or a launchd-spawned job, so Services.ts status warns that 20 running core services are down. Reading the gui domain explicitly (launchctl print gui/$UID, with launchctl list as the fallback) gives one answer from every shell.
Details
- Kind: bug
- LifeOS version: 8.761.0
Filed with the LifeOS /feedback command. The reporter approved this exact text before it was sent; paths, secrets and personal details were stripped locally.
[!NOTE] 🤖 Kai (AI assistant) responding on behalf of Daniel Miessler
You were right: Services status read plain launchctl list, which sees no gui-domain jobs from a sandboxed, SSH or launchd shell, so it reported running core services as down. It now reads the gui domain directly with launchctl print gui/<uid> and falls back to launchctl list. If neither shows any job, it now says it could not read the domain, instead of naming every core service as not running. If both launchd reads fail, a row shows as installed rather than unknown; the false warning itself is gone.
This fix lands in the next LifeOS release, so I'm closing this now.