Repository navigation
[Feature] Use the Desktop app as a UI for an existing local T3 Code server #8114
Replies: 9 comments 4 replies
|
Same setup here (Linux, Workaround that keeps the desktop's local environment (unlike disabling it per #9194, which loses "Open in editor" / "Reveal in file explorer"):
Caveat: the desktop then has two environments (its own local one and the service), so threads stay split across them, which is the gap this proposal would close. Posting in case it helps others hitting the error before this lands. |
|
Another Linux data point, plus one gap I think is worth closing even before full auto-attach lands. Use case: T3 on my dev workstation is my primary agent tool, and I want to reach it from the mobile app at any time, including when the desktop app is not open. So I installed the background service ( Result (desktop AppImage 0.1.0 + service 0.1.0, Ubuntu): the desktop app cannot start at all. On every launch its primary backend exits with The gap: the supported setup from #20250 (turn off Local environment per #9194, then add the service as an environment) is unreachable from that state. The toggle lives in Settings → Connections, but the app quits before any window opens. The only ways in are:
So installing the service and then opening the desktop app leaves you with a desktop app that will not open and no in-app way out. With the manual edit, the app starts normally ( Smallest fix that would unblock this, short of the full proposal above: when The remaining rough edge in that mode is Open in / Reveal taking the remote path for a same-machine service (#18515, #21661). |
|
Note 🤖 gpt-6.1-terra responding on behalf of James When a background service already owns the T3 home, desktop users may expect to connect to it instead of having to work out why desktop cannot start its local environment. The single-owner lock is intentional; the maintainer-described workaround is to disable desktop's local environment and connect to the existing service as an environment. Building on the smaller startup-recovery suggestion here, would maintainers prefer an explicit recovery action over full automatic attachment? What should establish that it is the right service, how should pairing and version mismatches work, and who owns startup, shutdown, and failures? The lock should remain authoritative. Could improving the ownership error be a separate first step? Existing discussion: #8114. Background: #20250 (comment), #22820, and closed PR #26547. The PR requested prior approval of the automatic-attachment and lifecycle scope before a fresh submission. |
|
Linux data point, plus a design sketch for how this could work. Setup: CachyOS, Most of what's needed already exists:
What's missing is a model where the desktop app is a client of whichever process hosts the T3 home. Here are the principles I'd build it on. 1. Hosting and UI are separate roles. Today the desktop app does two jobs. It's the UI: the renderer plus OS integration such as Open in, Reveal, notifications and capture. It's also the host: it owns the T3 home and runs agents. The lock already decides who hosts, so the desktop app shouldn't decide it a second time. When it finds that another process holds the lock, it should attach to that process, not show a dialog and quit. 2. Find the server through the lock owner's own record, not by probing ports. At startup, read 3. Authenticate the same user through the filesystem. Anyone who can read 4. Whether something is local depends on the machine, not on who started the server. If a connected environment's 5. Control of the server's lifecycle never moves without the user asking. A desktop app that attached to the service doesn't stop it when it quits. That rules out the kind of orphan described in #22983. Managing the service (status, restart, update, channel) becomes an admin-scoped server RPC, so web and mobile get it as well. An update that restarts the server runs outside the service's own process group (on Linux, a transient systemd unit), so the restart doesn't kill the request that triggered it. 6. Version skew is not a new problem. An attached desktop app runs its bundled UI against whatever server version is hosting. The mobile app and app.t3.codes already handle that. On a mismatch, show it and offer to update. The smallest end state is one way to host. "Local environment" in the desktop app would mean "run the background service": systemd on Linux, launchd on macOS. Only Windows, which has no service support, would keep the embedded server process. Then each machine has exactly one host and every surface is a client, so startup order stops mattering. The trade-off is that some people want the server to stop when they quit the app. That fits as a service setting ("Stop when T3 Code quits") and doesn't need a second architecture. A possible order, each step shippable alone:
Drafted with Claude Code (Claude Opus 5.5), after reading the current |
|
Additional controlled reproduction on stable 0.1.7, Linux x64 AppImage host and a Windows desktop SSH client:
We verified the SSH launcher PID record, runtime PID, command line, and live POSIX ownership lock all identified the same process. The systemd service was absent. This reproduces without a reboot, update, or stale database lock. The ownership guard is correct. The gap is the desktop's inability to use the healthy same-machine owner while preserving the normal local desktop experience. Client-only mode works, but it changes that experience and turning Local environment on returns to the failure. Removing the SSH route is a deployment workaround, not a product resolution. Before preparing another PR, could a maintainer approve or reject this narrower direction?
This would address the SSH-started-owner case in #21423 as well as service ownership. I have read the scope decisions on #20250, #8115 and #26547. #30333 covers access to client-only recovery, and #21661 covers local integrations for a saved service connection; neither is a claim of approval for this attachment behavior. This is a request to agree on direction and lifecycle scope, not an implementation or a claim that a fix has shipped. Prepared with Codex from a locally verified reproduction; no personal runtime logs or credentials are included. |
|
I hit the same "This T3 home is unavailable" error on Linux (Omarchy) with 0.1.7, running a background service plus the desktop app. This fixed it for me while keeping the service as the main server:
Projects, threads and remote access stay on the service, and other devices connect to it as before. This is a workaround, not an official recommendation. |
|
Note 🤖 Claude Opus 5.5 responding on behalf of Braden Another Linux case on today's nightly, with one consequence I haven't seen covered here. Setup: Omarchy 4.5 (Arch, Hyprland). The desktop app is the self-updating AppImage; Omarchy 4.5's The consequence: the dialog's last suggestion, a separate +1 to the incremental order kvnloo laid out above. Step 1 is #30333 ("Disable local environment and restart", which also drops the separate-home advice). Step 2 is same-machine detection by environment id. An attach that treats the service as this machine's environment would leave one |
Uh oh!
There was an error while loading. Please reload this page.
Problem
T3 Code can run as a background service without the Desktop UI, which is useful for keeping one environment available to web and mobile clients. Opening the Desktop app on that same machine currently starts another backend instead of using the server that is already running.
That creates a second local environment with separate threads and connection settings. In my use case, the background server is the durable environment I reach remotely, while Desktop should be another client for that same environment.
Proposed behavior
For packaged Desktop launches:
t3 serveprocess on the same machine.If a server is detected but secure pairing fails, Desktop should not silently start another backend. It should retry transient failures first, then offer Try Again, Start Separate Backend, Open in Browser, or Quit. The separate-backend option should use isolated state for that launch.
If an attached service restarts or changes port, Desktop should rediscover it and reconnect automatically before asking the user.
Why this shape
This keeps one machine represented by one durable T3 environment across desktop, web, and mobile while preserving an explicit escape hatch. Discovery remains local, authentication uses a short-lived process-scoped grant, development stays independent, and Desktop never takes lifecycle or network-exposure ownership away from an externally launched server.
I have a working implementation and will link the pull request here as a starting point for review.
All reactions