Repository navigation
Description
What happened
After t3 update from 0.0.42 to 0.1.9, the background service was down. Running t3 connect and then t3 update again from the new 0.1.9 CLI both failed with Background setup failed while starting the service (exit code 1). The output gave no hint why the start failed or what to do next.
Diagnosis
There are two stacked problems. The first is already known.
- The 0.0.42
t3 updatewrote protocol 2 state for the protocol-3 launcher ([Bug]:t3 updateacross a service-launcher protocol bump leaves the service crash-looping ("Service state is invalid or unsupported") while reporting success #12627, fixed by fix(server): migrate compatible legacy service install state #19449 after v0.1.9). The launcher exited 1 five times and systemd hitStartLimitBurst=5/StartLimitIntervalSec=300, leaving the unitfailed. - Within the next 300s, the 0.1.9
t3 updaterewrote the state file correctly ({"protocol": 3, "activeVersion": "0.1.9"}), and that file passes 0.1.9'sdecodeServiceState. But the systemd manager inapps/server/src/cloud/bootService.ts(activate/restartsteps) only runsdaemon-reload,enableandrestart. It never runssystemctl --user reset-failed. systemd therefore refused every start with "Start request repeated too quickly".runStepreports only the exit code, so the user sees a genericBootServiceCommandError/CliUpdateError, even though the repair itself had already succeeded.
main still has no reset-failed, so after any start-limit hit the repair commands keep failing for up to 300s with an error that hides the cause. Noted in a #12627 comment; #19449 doesn't address it.
Suggested fix: run systemctl --user reset-failed t3code.service before starting or restarting in activate, restart and handoff. Optionally name "start-limit-hit" in the error (systemctl --user show -p Result).
Steps to reproduce
- On Linux, install the systemd user service with
t3 service install(the unit hasStartLimitBurst=5,StartLimitIntervalSec=300,Restart=always,RestartSec=5). - Make the launcher fail at startup, e.g. set
"protocol": 2in~/.t3/runtime/service-state.jsonand runsystemctl --user restart t3code.service(or update from a 0.0.42 CLI, [Bug]:t3 updateacross a service-launcher protocol bump leaves the service crash-looping ("Service state is invalid or unsupported") while reporting success #12627). - Wait about 25s until
systemctl --user status t3code.serviceshows "Start request repeated too quickly". - Within 300s of the first failure, repair the state with a 0.1.9 CLI:
t3 updateort3 service install. - The command rewrites
service-state.jsoncorrectly but fails withBackground setup failed while starting the service (exit code 1).Runningt3 connectgives the same error.
Version
0.1.9 (service and CLI). The failure started with a 0.0.42 to 0.1.9 t3 update.
Environment
Ubuntu 24.04.4 LTS, linux x64 (kernel 6.8.0-147), Node v26.12.1, background service as systemd user unit t3code.service
Evidence
# boot-service.log
[service-launcher] Service state is invalid or unsupported. (x5, 19:40:02-19:40:23)
2026-11-13T19:40:33.315Z Background setup failed while starting the service (exit code 1).
2026-11-13T19:40:33.324Z Background setup failed while restarting the service after a failed update (exit code 1).
2026-11-13T19:40:52.954Z Background setup failed while starting the service (exit code 1).
# journalctl --user -u t3code.service
19:40:28 t3code.service: Start request repeated too quickly.
19:40:33 t3code.service: Start request repeated too quickly. (t3 connect)
19:40:52 t3code.service: Start request repeated too quickly. (t3 update from 0.1.9)Related issues
#12627 covers the protocol 2 to 3 state mismatch that tripped the start limit; it's closed and fixed by #19449, which isn't in v0.1.9. This issue is separate: the missing reset-failed keeps the repair commands failing even after the state is fixed, and #19449 doesn't change that.
Fix applied or workaround
systemctl --user reset-failed t3code.service && rm -f ~/.t3/runtime/.service-stopping && systemctl --user start t3code.service. The service came up on 0.1.9 with NRestarts=0. That start ran outside the 300s window, so it doesn't prove reset-failed was needed then; it was needed for the starts at 19:40:33 and 19:40:52.
Filed by
Claude Code (Claude Opus 5.5, claude-opus-5-5) via t3 triage
Activity