Skip to content
Source
Sign inSign up

[Bug]: "This T3 home is unavailable" after reboot with no T3 server running; fixed by moving server-owner.sqlite-journal and server-runtime.json #35347

Send to my agent
Closeddenisbetsi(GitHub profile, opens in a new tab) opened this issue 3 comments

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

Not reliably reproducible. Sequence that led to it:

  1. T3 Code desktop app running normally on macOS.
  2. fseventsd started using ~15 GB of RAM and high CPU.
  3. The T3 Code process ended abruptly (it crashed, was force-quit, or was killed by the system under memory pressure). The server had no chance to shut down cleanly.
  4. Reboot the Mac. No T3 Code server or background service is running afterwards.
  5. Open T3 Code. The "This T3 home is unavailable" dialog appears (generic version, no PID or port) and the app quits.
  6. Confirm nothing holds the home: lsof ~/.t3/userdata/server-owner.sqlite prints nothing, ps aux shows no T3 processes, and there is no com.t3tools.t3code.service in launchctl or ~/Library/LaunchAgents.
  7. ~/.t3/userdata still contains server-owner.sqlite-journal (512 bytes) and a stale server-runtime.json, both left over from the abrupt exit.
  8. Quit T3 Code, move those two files out of ~/.t3/userdata, and reopen T3 Code. It starts normally.

Suspected cause: the abrupt termination in step 3 left stale ownership files that the next launch treats as a live owner.

Expected behavior

With no server holding the ownership lock and no live PID in server-runtime.json, T3 Code should start normally and ignore or clean up the stale files.

Actual behavior

The app shows "This T3 home is unavailable" with the generic message ("Another T3 Code server, such as the background service, is using this data directory...") and quits. Rebooting and running npx t3@latest service uninstall --base-dir ~/.t3 did not help. Moving the two stale files out of ~/.t3/userdata fixed it.

Impact

Blocks work completely

Version or commit

Version 0.1.7 (322f6544dfad)

Environment

MacOS 27.2.1

Logs or stack traces

State of ~/.t3/userdata while the error occurred (no T3 process running, lsof empty):

server-owner.sqlite            0 bytes
server-owner.sqlite-journal    512 bytes
server-runtime.json            269 bytes (its PID was not running)

No server log was captured from a failing launch.

Screenshots, recordings, or supporting files

No response

Workaround

  1. Quit T3 Code completely.
  2. Confirm nothing holds the home: lsof ~/.t3/userdata/server-owner.sqlite should print nothing, and ps aux should show no T3 processes.
  3. Move the stale files out of the data directory (keep a backup rather than deleting): mkdir -p ~/Desktop/t3-backup && mv ~/.t3/userdata/server-owner.sqlite-journal ~/.t3/userdata/server-runtime.json ~/Desktop/t3-backup/
  4. Reopen T3 Code.

Leave server-owner.sqlite itself in place. Only do this when no T3 server is running.

Note: rebooting and running npx t3@latest service uninstall --base-dir ~/.t3 did not fix it on their own. Reinstalling the background service on the same T3 home makes the dialog come back, since the service then holds the lock.

  1. denisbetsi(GitHub profile, opens in a new tab) added labelsneeds-triage

  2. juliusmarmingecommented

    @denisbetsi Could you share the desktop log lines from a launch that showed the dialog? Look in ~/.t3/userdata/logs/desktop.trace.ndjson (and server.trace.ndjson) for 'bootstrap found another server owning the T3 home', 'already owns', 'background service set up for', or an exit code 78 near that time. They show whether the ownership lock itself reported busy or the older-background-service check refused the launch.

  3. [Haiku 5.5][Claude Code] on behalf of shivam.

    @denisbetsi Thanks for the detailed report. You're on 0.1.7, and the startup check that shows the "This T3 home is unavailable" dialog with the owning server's PID landed after that release (first in v0.1.10-preview.20261112.4581). On current main, a stale server-owner.sqlite-journal and a dead-PID server-runtime.json alone don't block startup in our reproduction.

    Could you try a build from v0.1.10-preview.20261112.4581 or newer, and reproduce the reboot state again if you can? If the dialog still appears, please send the lines Julius asked for in his earlier comment (desktop.trace.ndjson and server.trace.ndjson around that launch). Those lines show which check refused the launch.

  4. Thanks both, and correction to my report: the stale files were a red herring.

    server-child.log shows every failed launch on 0.1.7 was ServerAlreadyRunningError with exit code=78 (times local, UTC-5):

    ServerAlreadyRunningError: A T3 Code server already owns ~/.t3/userdata. ... at acquireServerOwnership backend child process failure output end: code=78

    boot-service.log shows the background service was running across that whole window, so it survived the reboot via login. It shut down when I ran t3 service uninstall / reinstall / uninstall. After the final uninstall the app started. Moving server-owner.sqlite-journal and server-runtime.json was not what fixed it, which matches your repro.

    Root cause: I had run t3 up earlier, which installed the background service on the same T3 home the desktop app uses (~/.t3). The service starts at login and holds the ownership lock, so the desktop app refuses to start. The lock check was correct.

    What made it hard to diagnose:

    1. The 0.1.7 dialog only showed the generic message and did not say the background service owned the home, so I assumed nothing could be running after a reboot. Sounds like the 0.1.10 dialog that names the owning server covers this.
    2. I did not realize t3 up would conflict with the desktop app on the same machine. A warning in t3 up when the desktop app uses the same T3 home (or a pointer to T3CODE_HOME / pairing) would help others avoid this.

Sign in to join this conversation.