Repository navigation
Description
What happened
I switched from nightly (0.1.7-nightly.20261102.4080, running as the macOS background service) to stable by running t3 update --channel stable once, in a normal Terminal window (not inside T3). The service went down and never came back, so my other laptop could not connect. The update installed 0.1.6 and rewrote the LaunchAgent, but launchd never started the job: it stayed loaded, enabled and not running with runs = 0 until I ran launchctl kickstart by hand.
Diagnosis
Verified on the machine:
~/Library/LaunchAgents/com.t3tools.t3code.service.plistandruntime/service-state.json(activeVersion: "0.1.6") were both rewritten at 13:20:06 local.logs/boot-service.logends with the old service's shutdown at 12:46:24 (relay stopped, tunnel released, shutdown reconciliation completed), then one line:Background setup failed while stopping the installed launch agent (exit code 3).Exit code 3 fromlaunchctl bootoutisNo such process(reproduced with a nonexistent label), i.e. the job was not loaded at that point. That step isoptional: trueinlaunchdManager.stop, so the failure is logged but ignored.runtime/.restart-pendingwas absent afterwards, which (perinstall()inapps/server/src/cloud/bootService.tsat v0.1.6) meansmanager.activate(launchctl enable+launchctl bootstrap gui/<uid> <plist>) returned success.- Yet
launchctl print gui/<uid>/com.t3tools.t3code.serviceshowedstate = not running,runs = 0,last exit code = (never exited),pended nondemand spawn = speculative, andprint-disabledshowed itenabled. The plist hasRunAtLoadandKeepAlivetrue. Nothing was listening on 3773.runtime/.service-stoppingfrom the 12:46 shutdown was still present. launchctl kickstart gui/<uid>/com.t3tools.t3code.servicestarted it immediately; it came up on 0.1.6, migrated the DB 69 → 76, and cleared the stop marker.
Not established: why launchd left the bootstrapped job pending instead of spawning it, and why the old service stopped at 12:46 but the new unit was only written at 13:20 (about 34 minutes later; one t3 update run). The DB (statev2.sqlite) is ~1 GB, so a long pre-update backup in between is plausible but unverified. A possible hardening: after bootstrap, check launchctl print for a running pid and kickstart if none.
Separately, the t3 on PATH was still the nightly desktop app's shim (~/.t3/bin/t3 → T3 Code (Nightly).app, 0.0.46), so t3 serve afterwards ran 0.0.46 against a DB at migration 69 and only warned (Database migration history diverges from this build) before serving.
Steps to reproduce
- macOS 26, background service installed as the LaunchAgent and running a nightly (0.1.7-nightly.20261102.4080), with a large
statev2.sqlite(~1 GB). - In a normal terminal (outside T3), run
t3 update --channel stableonce. - After it finishes, run
launchctl print gui/$(id -u)/com.t3tools.t3code.service. - Observe
state = not running,runs = 0; the server port does not answer. launchctl kickstart gui/$(id -u)/com.t3tools.t3code.servicestarts it.
Version
Bug happened on: update from 0.1.7-nightly.20261102.4080 to 0.1.6 (service runtime). The triage CLI was 0.0.46-nightly.20261015.3158 (the old desktop shim; only the CLI that ran t3 triage).
Environment
macOS 26.4.1 (Darwin 25.4.0), arm64. Node v24.21.0. Background service via launchd (com.t3tools.t3code.service). Connecting from the desktop app on a second laptop.
Evidence
$ launchctl print gui/<uid>/com.t3tools.t3code.service (before kickstart)
state = not running
program = ~/.t3/runtime/versions/0.1.6/t3
runs = 0
pended nondemand spawn = speculative
last exit code = (never exited)
boot-service.log tail:
[12:46:22.025] INFO: Relay client stopped
[12:46:23.079] INFO: Released the managed tunnel on shutdown
[12:46:24.487] INFO: V2 orchestration shutdown reconciliation completed
2026-11-02T18:20:06.759Z Background setup failed while stopping the installed launch agent (exit code 3).
$ launchctl bootout --wait gui/<uid>/com.example.doesnotexist; echo $?
Boot-out failed: 3: No such process
3
Related issues
- [Bug]: macOS:
t3 service install,t3 service restartand a restartingt3 updaterun inside T3 have no launchd handoff, sobootoutcan kill the caller beforebootstrap#28552 (macOS install/update inside T3 has no launchd handoff). Not this case: the update ran in a normal terminal. - launchctl bootout --wait is a usage error on macOS 15, so boot-service install/update/restart fails #11995 (
bootout --waitusage error on macOS 15, exit 64). Different exit code and OS. - [Bug]: t3 update run from inside T3 (terminal or agent) stops the background service and never starts it #16374 (update from inside T3 stops the service and never starts it). Closed; same symptom, different trigger.
Fix applied or workaround
launchctl kickstart gui/$(id -u)/com.t3tools.t3code.service started the service; it has stayed up since.
Filed by
Claude Code (Claude Opus 5.5, claude-opus-5-5) via t3 triage.
Activity