Repository navigation
Description
Summary
The standard Linux machine installer creates a root systemd service without HOME or User=. systemd starts that service without a home environment, which BB passes to child CLIs. Git fails with fatal: $HOME not set, and CLI configuration lookup can fall back to the working directory rather than the existing user profile.
Versions and environment
- bb-app 0.49.0, standard Linux machine installer, root-owned system service.
- Ubuntu 24.04.4 LTS, systemd 255, Node.js v24.22.3.
- Observed on two Linux machine daemons. No provider is required to reproduce.
- Also verified against the installer at current source base
da3e60b81d560e114a2bec724bb59c997aaaae7f: new unit assertions fail because the generated service omitsHOME.
Steps to reproduce
- Enroll a Linux/systemd machine with the standard installer as root.
- After the installer starts its system service, run a machine terminal:
bb terminal run --machine <machine-id> --cwd /tmp -- node -e 'console.log("HOME=" + String(process.env.HOME))' bb terminal run --machine <machine-id> --cwd /tmp -- git config --global --get user.name
- Alternatively reproduce the relevant service environment without enrolling or changing a BB machine:
sudo systemd-run --quiet --unit=bb-home-repro --wait --pipe --collect \ "$(command -v node)" -e ' console.log("HOME=" + String(process.env.HOME)); const r = require("node:child_process").spawnSync( "/usr/bin/git", ["config", "--global", "--get", "user.name"], { encoding: "utf8" } ); console.log("git exit=" + r.status); process.stdout.write(r.stderr); '
Expected vs actual
Expected: child CLIs receive the configured service user's home directory and can locate their existing configuration.
Actual output from the temporary service:
HOME=undefined
git exit=128
fatal: $HOME not set
Supplying HOME in a systemd drop-in and restarting the affected daemons corrected their child environments.
Evidence
- Investigation report and reproduction.
- Installer selects system scope for root.
- Generated unit omits HOME and User.
- Added assertions fail against the unmodified installer for a system unit, a user/container unit, and a home path containing spaces and
%.
What was ruled out
- An account login problem: the existing user credentials were present; using the correct home restored lookup.
- Provider-specific behavior: a plain Git subprocess reproduces it.
- fix(install): systemd service uses ephemeral fnm Node.js path and fails after reboot #6773: Node is found and the daemon is running; this is a missing home environment rather than an ephemeral Node path.
- The installer's existing unset-HOME handling only fixes its own process. The system service it writes still omits HOME.
Suggested priority and effort
Affects standard root/systemd Linux enrollments and child CLI configuration lookup. A service drop-in is a workaround; the installer and daemon startup need a small fix plus regression tests.
AGENT GENERATED
Activity
bb-slop-cop commentedon Nov 15, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilothost.confirmed-repro.install-machine-script.test.ts→installs a persistent root system unit, with the added HOME assertion shown in the report: two expected failures in each checkout.Keep HOME for host daemons started by systemd