What Changed#
The generated systemd user unit (renderBootServiceUnit) now sets an explicit Environment=PATH= that prepends ~/.local/bin and ~/bin (via the %h specifier) to the standard system directories.
File: apps/server/src/cloud/bootService.ts, plus the byte-for-byte render test.
Why#
Closes #4913.
The unit set no PATH, so t3code.service inherited the systemd user manager's minimal environment, which does not include ~/.local/bin — exactly where user-scoped provider CLIs (claude, codex) land on a headless install. Ubuntu's ~/.profile prepends ~/.local/bin, but that only runs for login shells and a systemd user unit never sources it. The result: a server that listens, pairs and authenticates but exposes zero providers, so no thread can run. It is also confusing to diagnose, because t3 serve run by hand over an SSH login shell finds every provider while the service cannot.
%h expands to the home dir (the same specifier the unit already uses for WorkingDirectory), and directories absent on a given distro are simply skipped during lookup. renderBootServiceUnit stays pure and deterministic, so status still flags an older unit as out-of-date and offers a repair that rewrites it with the PATH.
Verified: bootService.test.ts passes (render test updated byte-for-byte); apps/server typecheck is clean.
Checklist#
Note
Low Risk
Scoped to generated systemd unit environment and test expectations; no auth, data, or runtime logic changes beyond PATH for CLI discovery.
Overview
The generated systemd user unit for t3code.service now sets an explicit Environment=PATH= that prepends %h/.local/bin and %h/bin ahead of the usual system directories, matching what login shells get from ~/.profile on typical Ubuntu headless installs.
Why it matters: without this, t3 serve under the user manager inherited a minimal PATH and could not find user-scoped provider CLIs (e.g. claude, codex) in ~/.local/bin, so the service listened and paired but exposed zero providers—while the same command over SSH looked fine.
renderBootServiceUnit stays deterministic, so status still compares the installed unit byte-for-byte; units written before this change are reported out of date and repair/install rewrites them with the new PATH. Tests assert the full rendered unit and PATH prefix.
Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit bba10621ae5f5dd2131fd7314e3ffd8f92830196. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).
Note
Add ~/.local/bin to PATH in generated systemd boot service unit#
The BootService.renderBootServiceUnit function now injects an Environment=PATH= line into the [Service] section, prepending %h/.local/bin and %h/bin before standard system directories. This ensures user-installed binaries (e.g. provider CLIs) are resolvable when the boot service starts. Behavioral Change: the boot service process now runs with an explicit PATH instead of inheriting the default systemd user environment.
📊 Macroscope summarized bba1062. 1 file reviewed, 0 issues evaluated, 0 issues filtered, 0 comments posted
🗂️ Filtered Issues#
No issues evaluated.
Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
8e322a42-42e7-48e1-bae7-25b20bef0d49You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share