Skip to content

[Bug]: Background service never starts on Linux because service-state.json is missing, and t3 status / t3 doctor report healthy #43712

Done

Description

@zeapsu

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

I don't have a deterministic repro for how the file went missing. This is what happened on one Linux host:

  1. The background service was installed on Nov 23 (~/.config/systemd/user/t3code.service, enabled, Linger=yes, launcher 0.1.11). The T3 Code desktop AppImage is also installed on the same machine and was updated on Nov 25.
  2. Reboot the machine.
  3. t3code.service exits within milliseconds on every start, five times in a row, and then systemd stops retrying (start-limit-hit).
  4. Run t3 status and t3 doctor --dry-run on the host.

The second half should be reproducible directly (I have not re-run it, to avoid taking the host down again): with the unit installed, delete ~/.t3/runtime/service-state.json and restart the service. The launcher fails with the error below, and t3 status and t3 doctor still report everything healthy.

Expected behavior

One of these:

  • The service launcher recovers on its own when service-state.json is missing, for example by recreating it from the version in its own ExecStart path.
  • Or t3 status / t3 doctor notice the problem and offer the fix (t3 service install).

Actual behavior

~/.t3/runtime/service-state.json was missing, and the launcher fails on startup:

[service-launcher] ENOENT: no such file or directory, open '~/.t3/runtime/service-state.json'

This happened on every boot since at least Nov 25 (3 boots, 11 failed starts in total). The server never came up headless. Remote access only worked while the desktop app happened to be open.

The health checks didn't show it:

  • t3 status reported Service installed · [email protected]
  • t3 doctor --dry-run reported Nothing to repair.

The runtime directory before the fix had no state file:

~/.t3/runtime/
  desktop-update-restart   (empty, Nov 25 16:06, same time as the AppImage update)
  launchers
  versions/0.1.11/

Running t3 service install recreated it ({"protocol": 4, "activeVersion": "0.1.11"}), and the service has been running normally since.

I can't tell what removed the file, or whether it was ever written. The service was installed on Nov 23 but didn't start on that boot. The first start attempt I can find (Nov 25 01:25) already failed. The empty desktop-update-restart marker from the AppImage update is the only other T3 file in that directory, so a desktop update or handoff path that rewrites runtime/ is my main suspect.

Impact

Major degradation or frequent failure

Version or commit

Service launcher and CLI t3 v0.1.11; desktop AppImage updated Nov 25 2026 (exact version unknown)

Environment

Omarchy (Arch Linux), kernel 7.2.15, systemd 262.1, systemd user unit with lingering enabled, accessed over Tailscale

Logs or stack traces

# journalctl --user -u t3code.service (boot on Nov 26)
11:25:52 systemd: Started T3 Code server.
11:25:52 systemd: t3code.service: Failed with result 'exit-code'.
11:25:57 systemd: Started T3 Code server.
11:25:57 systemd: t3code.service: Failed with result 'exit-code'.
...                        (5 attempts, RestartSec=5)
11:26:17 systemd: t3code.service: Start request repeated too quickly.
11:26:17 systemd: t3code.service: Failed with result 'start-limit-hit'.
11:26:17 systemd: Failed to start T3 Code server.

# ~/.t3/userdata/logs/boot-service.log (the only output from each attempt)
[service-launcher] ENOENT: no such file or directory, open '~/.t3/runtime/service-state.json'

# Same pattern on the two earlier boots
2026-11-25T01:25:20 t3code.service: Failed with result 'exit-code'.
2026-11-25T13:13:12 t3code.service: Failed with result 'start-limit-hit'.

Workaround

t3 service install

This rewrites service-state.json and restarts the unit. It keeps the existing access settings (T3 Connect and LAN) and a custom drop-in in t3code.service.d/.

Related but different: #37705 covers the launcher staying pinned to an old version after remote updates. In this report, the launcher can't start at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions