Repository navigation
Description
What happened
I run T3 Code as the background service (t3 service) and use the desktop app (.deb package, Linux) only as a client: Local environment is off, and the app connects to the service as a saved environment. That keeps the server independent of the desktop app, so app updates and restarts do not stop it.
When I try to set up guest links, Settings → Sharing & access only shows "No environment selected — Connect an environment to view its settings and access.", even though the service is connected and working. There is no way to link the machine to T3 Connect from the UI (or to unlink it), so guest links can't be used.
The Labs → Guest links row says "Needs T3 Connect: sign in and link this machine in Sharing & access", which points to this empty page.
The "Share with guest" dialog says "Guest links need a running T3 Connect tunnel." but doesn't say how to get one in this setup.
Diagnosis
Read from source at ce66aab1. main has the same code as of 2026-10-28.
apps/web/src/state/primaryEnvironment.ts:primaryEnvironmentIdAtomreturns only a catalog entry whose target isPrimaryConnectionTarget, which is the backend the desktop app spawns itself. With Local environment off there is no such entry, so the primary environment id isnull, even when a service on the same machine is connected.apps/web/src/components/settings/ConnectionsSettings.tsx(~L1457): theconnections-environmentsection branches onprimaryEnvironmentId !== null. Thenullbranch renders the "No environment selected" placeholder. Theaccessview (if (showsAccess) return …primarySettings) renders only this section, with no way to pick a saved environment.- In that branch,
CloudLinkRowrenders only whencanReadRelay || canManageRelay, and both are scopes of the (null) primary environment, so the T3 Connect link/unlink control never appears. - Server side,
GuestShareService.createfails withconnect_unavailablewhen no T3 Connect connector hostname exists (apps/server/src/guest/GuestShareService.ts~L342). So "Share with guest" can't work until the machine is linked, and the UI gives no way to link it in this setup. LabsSettingsPanel.tsxGuestLinksRowlinks users to/settings/accessto do the linking.
Possible fixes: treat a connected service on the same machine as "This machine" when Local environment is off, or let Sharing & access pick any connected environment the user has access/relay scopes on.
Steps to reproduce
- Install and start the background service with
t3 service install. It runst3 serveon 127.0.0.1:3773. - In the desktop app, turn off Local environment and connect to the service as a saved environment.
- In Settings → Labs, turn on Guest links.
- Open Settings → Sharing & access.
- Expected: the service's settings, including T3 Connect link/unlink. Actual: "No environment selected", with no T3 Connect row.
- Open a thread on the service and choose Share with guest → Create link. It fails with "Guest links need a running T3 Connect tunnel." (
connect_unavailable).
Version
0.1.4-nightly.20261028.3814 (desktop app and background service, same build)
Environment
Linux x64 (PikaOS, kernel 7.2.4), Node v26.12.1, desktop .deb package (t3code 0.1.4~nightly.20261028.3814) + systemd user service
Evidence
# desktop-settings.json
"localEnvironmentEnabled": false
# server-runtime.json (service)
"serviceManaged": true, "port": 3773, "serverVersion": "0.1.4-nightly.20261028.3814"
# server settings
"guestSharingEnabled": true
# t3 connect status
T3 Connect
Exposure: disabled
Authorization: missing
Environment link: not provisioned
Relay: not provisioned
Relay client: not installed
# after `t3 connect link` + `t3 service restart`
Environment link: provisioned
Relay: https://relay.t3.codes
✓ Other devices can reach this machine · Tunnel connected · 4 connections · QUICRelated issues
#17013 (closed): the same "No environment selected" branch hid the Local environment toggle. That was fixed by moving the toggle to "This app". The Access page and T3 Connect controls for a non-primary environment are still unreachable.
Fix applied or workaround
Verified working from the CLI:
t3 connect link(authorizes and stores the link;t3 connect statusthen shows "Environment link: pending server startup").t3 service restart. After about 30 seconds,t3 connect statusshows "Environment link: provisioned · Tunnel connected", and Create link works.
Nothing in the UI points to this route. The tunnel also starts some seconds after the server, so a share attempt right after the restart still fails with the same error.
Filed by
claude (claude-opus-5-5) via t3 triage
Activity
goncaloMgomes commentedon Oct 31, 2026
I have exactly the same setup on 3 machines and i would also like to manage the server from the UI on the share and access page or other way. I currently have no way to access t3 connect management through the UI (Revoke tunnels, etc...)
Also this setup(running a t3 service alongside the t3 code desktop could be improved) when starting the server the application won't start (I want the server to own .t3 folder) and I can't find a way to star a server from the application that runs when the application is closed.