Repository navigation
Description
On behalf of user by Claude Opus 5.5 (Claude Code)
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
- Install the background service with
t3 service install(ours was on0.1.4-nightly.20261028.3824, Oct 28). - Update the server remotely from the app over the next few weeks ("Update everything"), up to
0.1.10-nightly.20261116.4787. - Run
t3 service statuson the host, and look at the launcher process.
Expected behavior
A host that is only ever updated remotely ends up on a current launcher eventually, or at least the app says the launcher needs a repair.
Actual behavior
On all three of our hosts (two macOS launchd, one Linux systemd user unit), the unit still ran the Oct 28 launcher (0.1.4-nightly.20261028.3824/t3 __service-launcher) as the parent of a 0.1.10 t3 serve. In process monitors this looks like two T3 versions running, with an old one that "refuses to die": killing it does nothing because KeepAlive starts it again. The only sign was Status: needs an update or repair from t3 service status on the host. Nothing in the app showed it.
This is the remaining part of #34502. #34603 fixed the update failure, and its description says a protocol-3 launcher stays protocol 3 until a local t3 update or t3 service install. So far, then, the launcher never updates on a host that nobody opens a shell on.
A launchd handoff is possible. A comment on #34502 suggested that the server could run the staged runtime's service install itself, and noted that launchd has no handoff like systemd-run. We tested that on macOS 26.7.2 with a throwaway launch agent set up like T3's plist (KeepAlive, AbandonProcessGroup=false, ProcessType=Interactive, ExitTimeOut). A process inside the job tried to do what service install does: launchctl bootout --wait the job, point its plist at a new program, launchctl bootstrap it again.
| How the install runs from inside the job | Result |
|---|---|
As a direct child (what bootService.ts does on launchd today) |
Killed by bootout. The job is left unloaded: the service stays down until the next login. |
Double-fork + setsid |
Survives. The job comes back on the new program. |
Separate one-shot job: launchctl bootstrap gui/$UID oneshot.plist (RunAtLoad, LaunchOnlyOnce) |
Survives. The job comes back on the new program. |
Rewrite the plist on disk, then exit and let KeepAlive respawn |
Respawns the old program: launchd keeps using the definition it loaded. |
What follows from this:
- A one-shot job bootstrapped into
gui/$UIDis the launchd equivalent of thesystemd-run --user --collecthandoff atbootService.ts:1305, which handles only systemd today. It needs a unique label and abootoutof that label afterwards, becauseLaunchOnlyOncejobs stay loaded after they exit. - Today, on launchd,
runningInsideServicedoesn't change anything.service installrunsmanager.stop(L1332–1335), and going by our test, that kills the installer betweenbootoutandbootstrap. That leaves the service unloaded, and on a host reached over SSH, nobody can see that. An agent running in a T3 thread on that host that runst3 service installwould cause this. We reproduced it with a stand-in job, not with T3 itself. - Repointing the plist only takes effect after a real
bootoutandbootstrap, so "rewrite the unit and let it respawn" isn't enough on macOS.
We did not test the alternative of the launcher execing into the staged launcher in place.
Impact
Major degradation or frequent failure
Version or commit
Server 0.1.10-nightly.20261116.4787, launcher 0.1.4-nightly.20261028.3824, source references at c8c51af
Environment
macOS 26.7.2 and macOS 27.2 (arm64, launchd); Arch Linux / Omarchy, kernel 7.2 (systemd user unit). Updated remotely from the T3 Code app.
Workaround
On each host, run ~/.t3/runtime/versions/<current>/t3 service install. That rewrote the unit and restarted onto the current launcher. On the Linux host it also ended the agent sessions running there, as other commenters on #34502 saw.
Related issues
#34502, #34603, #17225 (each new versioned launcher path on macOS also needs new privacy approvals).
Activity