Repository navigation
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/web
(The bug is in packages/client-runtime, which all clients share — web, desktop and mobile — plus infra/relay.)
Steps to reproduce
- Link a Mac whose
ComputerNameisJL-Mac-Studio-M3-Ultrato T3 Connect, then add it as an environment on a client. - Move to a new Mac with Migration Assistant. It copies
~/.t3/userdata/environment-id, so theenvironmentIdstays the same. The new machine is namedJL-Mac-Studio-M5-Ultra. - Start T3 Code on the new Mac. In the client from step 1, open Settings → Connections → Environments and check the environment chip in the composer.
Expected behavior
The environment is shown as JL-Mac-Studio-M5-Ultra. That is the name the server reports in its descriptor, and the name a fresh T3 Connect discovery list shows.
Actual behavior
Settings → Environments and the composer environment chip still show JL-Mac-Studio-M3-Ultra, next to "T3 Connect · Connected". A T3 Connect environment that has not been saved on the client yet shows the new name.
The host itself is fine. scutil --get ComputerName, scutil --get LocalHostName, scutil --get HostName and hostname all return JL-Mac-Studio-M5-Ultra. The server reads its label from scutil --get ComputerName every time it starts (apps/server/src/environment/ServerEnvironmentLabel.ts).
Impact
Cosmetic issue
Version or commit
Desktop 0.0.46-nightly.20261004.2648; main @ 4ee6bfd
Environment
macOS 27.0.1, Apple M5 Ultra, T3 Code (Nightly) desktop, T3 Connect
Logs or stack traces
No response
Screenshots, recordings, or supporting files
Workaround
From reading the code (not tested): remove the saved environment and add it again from T3 Connect. The label is copied from discovery again when the environment is added.
Root cause
Two copies of the label are stored, and neither one is ever updated:
- The client's saved target keeps the label it had when it was added. When an environment is added,
RelayConnectionTarget.labelis copied from the discovery record. This happens inapps/web/src/components/cloud/CloudEnvironmentConnectList.tsx,apps/mobile/src/features/connection/useConnectionController.ts, and the legacy migration inapps/desktop/src/app/DesktopConnectionCatalogStore.ts. Settings and the composer chip display that catalog entry. On every connect,ConnectionResolver.authorizeinpackages/client-runtime/src/connection/resolver.tsfetches the liveExecutionEnvironmentDescriptor, but it only comparesenvironmentIdand discardsdescriptor.label. Discovery results are never written back into saved targets either. Bearer and SSH saved environments storelabelthe same way, so they probably have the same problem. - The relay link row is only updated on an explicit re-link.
relay_environment_links.environment_labelis written only byEnvironmentLinks.upsertininfra/relay/src/environments/EnvironmentLinks.ts. That runs when the environment is linked through desktop T3 Connect linking ort3 connect. A server boot does not refresh it, so discovery also shows the old name if the host is renamed without re-linking.
Suggested fix
- Smallest fix: once
authorizesucceeds, comparedescriptor.labelwithtarget.label. If they differ, write the new label to the catalog entry. The descriptor is already fetched on every connect, so this adds no request, and it fixes relay, bearer and SSH environments together. - Optional: when relay discovery refreshes, sync the labels of saved relay targets so that offline environments also get the new name.
- Relay: refresh
environment_labelwhen the server re-establishes its managed endpoint. - If Manage T3 Connect environment names and registrations #13057 adds custom names that apply across the account, the rule should be "follow the advertised machine name unless the user renamed it". That keeps it to one label instead of adding a second label field.
Related
- Manage T3 Connect environment names and registrations #13057 (Manage T3 Connect environment names and registrations). That issue requests custom naming and asks to "refresh names without interrupting active connections". This issue is the concrete bug behind the stale names.


Activity
Screenshots for stale T3 Connect environment label issue (pingdotgg#1…
jlipworth commentedon Oct 4, 2026
Screenshots, taken on the client after the host was renamed to
JL-Mac-Studio-M5-Ultra:Composer environment chip: still shows the old name
Settings → Environments: old name, connected through T3 Connect
juliusmarminge commentedon Oct 4, 2026
Note
Grok responding on behalf of Julius.
Triage
Thanks for the thorough report, @jlipworth. The Migration Assistant detail and the root-cause notes lined up well with the code.
What I found
Confirmed on
mainat4ee6bfd50e. This is separate from #13057.entry.target.label). That label is copied once, when the environment is added: inCloudEnvironmentConnectList, in the mobile connect path, and in the desktop catalog migration.ConnectionResolver.authorizeloads the liveExecutionEnvironmentDescriptoron every connect and checksenvironmentId, then discardsdescriptor.label. Relay auth and discovery health also read the descriptor, but neither writes the name back to the saved target.EnvironmentRegistry.registerreplacestarget.label, which matches the workaround you suggested.resolveServerEnvironmentLabelrunsscutil --get ComputerNameonce per process, so a restart is what picks up the new name.environment_labelis written only byEnvironmentLinks.upsert. Startup calls that only whenmanagedTunnelStartupActionreturnsreconcile_link, so an already-linked host that comes backreadykeeps its old relay label. Your unsaved T3 Connect row showing the new name suggests the link was refreshed during the migration, which points to the saved catalog as the stale copy here.labelthe same way, so they're probably affected too. The local primary and desktop-local backends already rebuild from the descriptor.Likely fix area
authorize, update the catalog entry's label wheneverdescriptor.labeldiffers. That needs no extra request and covers relay, bearer, and SSH targets alike.environment_labelfor already-linked hosts on startup.A maintainer will decide on the fix direction.
timharris707 commentedon Oct 18, 2026
Claude Opus 5.5 via Claude Code, responding on behalf of Tim Harris:
Adding a data point from #21270, which was closed as a duplicate of this issue. On 0.1.0, running
t3 connect linkagain, and event3 connect unlinkfollowed byt3 connect link, did not refresh the relay'senvironment_label. The old name kept showing in a fresh discovery list and under T3 Account > T3 Connect > Registered servers, not only in saved entries.So a fix that only updates the client's saved label after
authorizewould not cover this case. The relay seems to keep the label from the first link for as long as the environment identity exists.#21270 also describes a separate problem this issue doesn't cover: after creating a new environment identity, every client got
environment_link_not_founduntil a fullt3 connect logoutand sign-in. Happy to file that on its own if it's useful.juliusmarminge commentedon Oct 22, 2026
Checked current main at b5a226e49c in an isolated Linux worktree. Ran
vp run dev, opened the web client, then Settings → Connections → Add environment. This development build offers only host/code pairing, with no T3 Connect discovery, so I could not run the saved-relay rename sequence. The real-data snapshot also failed migration, so this attempt used empty state. This is not a successful reproduction or evidence that the bug is fixed.Can you confirm on the latest nightly whether restarting the renamed host leaves (1) its saved environment label and (2) its fresh T3 Connect discovery label stale? Include the client and host versions. The later comment reports both labels staying stale, whereas the original report says fresh discovery has the new name.
YasserDRIF commentedon Oct 26, 2026
Another repro on the current release, for the "saved label stale after host restart" case.
Host: macOS (arm64), T3 Code server
0.1.2Steps
Yasser's MacBook Pro (2)toYasser - Suture(scutil --setforComputerName,LocalHostName, andHostName).Result
label: "Yasser - Suture"with the sameenvironmentIdas before.Yasser's MacBook Pro (2)for this environment after a full restart of both the host and the app.So (1) the saved environment label on the mobile client stays stale even though the restarted host advertises the new name. I haven't checked (2), the fresh discovery list, yet. I'll add the mobile app version and the discovery result when I have them.
Hormold commentedon Nov 6, 2026
+1, hit this today on 0.1.8 nightly. got 2 macs paired and they show up as "MacBook Pro" and "MacBook Pro 4" lol. renamed the second one in macos, its server already returns "Old Mac" from /.well-known/t3/environment but the desktop app still shows MacBook Pro 4
only way i found to fix it is remove from this device -> new pairing code -> pair again. thats too much for a name change
can you just add Rename to the ... menu in Settings > Connections? local name only, nothing on the server. and if i didnt set a custom name just take the label from the server on reconnect, that would fix this issue too
jacobcorbett commentedon Nov 6, 2026
Additional reproduction on stable 0.1.7 (6 November 2026): native Windows 11 host, macOS desktop client, T3 Connect.
After renaming the Windows machine, the same environment identity advertised its new name through
/.well-known/t3/environment. Both the saved client environment row and the fresh T3 Connect discovery row continued to show the old name. The peer-linked environments section already showed the new name.What we checked:
t3 connect unlink,t3 connect link --headless, and restarting the host caused startup link reconciliation. The macOS discovery/saved row then showed the new name.The unlink operation initially reported
upstream_unavailable; subsequent startup reconciliation succeeded. The descriptor retained the same environment ID. We did not create a new identity.The relink also caused a separate client-side outage matching #27250: the tunnel was connected, but the client's recursive DNS chain cached NXDOMAIN for its hostname while a public resolver returned valid records. HTTPS to the exact environment descriptor endpoint succeeded when resolved to the public address. A domain-specific DNS resolver override restored normal client connectivity. This reinforces the value of refreshing the advertised name without unlinking/relinking.
PR #27542 addresses saved client labels; this reproduction also needs the relay discovery label refreshed for an already-linked host. No claim of reproduction on the latest nightly or current main.
moultonpoint commentedon Nov 12, 2026
Reproduced on T3 Code 0.1.9 with an Ubuntu host and macOS client. The server and cloud registration reported “Ubuntu Mac,” but the client retained the original name. Updating the saved connection label through T3’s internal bridge and reloading the window fixed it. A user-facing Rename action would avoid this workaround.
test(client-runtime): saved environments keep a stale label after the…
afurgal commentedon Nov 16, 2026
Confirming on T3 Code 0.1.9 (macOS, desktop host): after changing the host's ComputerName, I needed both steps, in this order, before clients showed the new name:
Either step alone left the old label. That fits there being two stale copies: re-linking refreshes the relay's stored label, and re-adding refreshes the client's saved label (which is only copied when the environment is added). It may also explain the mixed reports above on whether re-linking alone works.
scuba78 commentedon Nov 18, 2026
Claude Opus 5.5 via Claude Code, posting on behalf of @scuba78:
Another repro on v0.1.9 (host and client), answering the question above. Whether it stays stale depends on how the host is linked.
Setup: a Linux host (Incus container,
t3 servewith a CLI-desired T3 Connect link) was renamed fromt3-agenttoMAYA. Two Windows hosts, whose servers run inside the desktop app, were renamed fromCasperTwotoCASPER-3and fromDESKTOP-V6RDGP6toBALTHASAR-2. All were restarted or rebooted, and each server's descriptor now reports the new label.Update after further investigation (corrects my first version of this comment, which said all hosts stayed stale):
GET /v1/environments):MAYAis updated.CasperTwoandDESKTOP-V6RDGP6are still the first-link labels. The client UI shows exactly these, so removing and re-adding a host through T3 Connect discovery gives the new name for the Linux host and the old one for the Windows hosts. (Adding the Linux host as a new environment on a second client also showedMAYA.)descriptorinsidemakeCloudLinkProof→POST /v1/client/environment-links. Tunnel register/recover proofs, publish and link-preference requests carry no label, and the client sends none of its own. Health responses include the descriptor, but the relay label didn't change from those alone.releaseManagedTunnelOnShutdowndeletes the relay tunnel and local runtime config. Next start:registerManagedTunnelRecovery→not_linked→managedTunnelStartupAction→reconcile_link→ fresh link proof with the current hostname. Logs from the restart:Released the managed tunnel on shutdown, thenT3 Connect desired link reconciled on startup. Afterwards the relay label wasMAYA.linkedAtwas left unchanged.ready, and the relay keeps the first-link label indefinitely.linkEnvironmentToCloudonly runs when!linked || linkRevoked || managedTunnel mismatch, so the client just re-reads the stale relay record. This matches the earlier report that unlink/link didn't help for some setups.Possible fix directions: let the relay refresh
environment_labelfrom the signed health descriptor, or re-send the link proof (or a label-only update) when the descriptor label differs from the relay record. A user-facing rename, as in #13057, would also cover it.One more data point: each Windows client labels itself correctly (the local environment shows
BALTHASAR-2andCASPER-3respectively), but labels the other Windows host with its relay label.CASPER-3appears asCasperTwoon BALTHASAR-2, andBALTHASAR-2appears asDESKTOP-V6RDGP6on CASPER-3. The Linux host shows asMAYAeverywhere. So the local environment label is rebuilt from the live descriptor, and the stale value lives only in the relay record that remote clients read.benjamin-di commentedon Nov 21, 2026
Confirming this still reproduces on 0.1.11 (Ubuntu 26.04 host using
/etc/machine-infoPRETTY_HOSTNAME, iOS and desktop clients):PRETTY_HOSTNAMEwere changed from the default installer name (user-System-Product-Name).PRETTY_HOSTNAME, but both the desktop and iOS clients kept showinguser-System-Product-Name.t3 connect unlink,t3 connect link, and restartingt3code.servicerefreshed the relay record, and removing + re-adding the environment in the iOS app picked up the updated name.aswansyahputra commentedon Nov 23, 2026
Another data point on 0.1.11, macOS desktop host + two clients. This one has a clear before/after and confirms the host itself was correct the whole time.
Environment
bumina→macbook(ComputerName,LocalHostName,HostName).T3 Connect · mobile/desktop.Symptom
After the rename and a full restart of T3 Code on the host, the server descriptor already reported the new name:
but every client kept showing
bumina— the desktop client, the Android app, and the host's own "Linked environments" header on the other machine. Not a per-device cache: three surfaces, one stale name.What fixed it
Two separate writes were needed, in this order.
1. Re-link T3 Connect on the host. Settings → Sharing & access → pick the renamed environment → T3 Connect switch off, then on. The server trace shows the fresh link rather than a recovery:
The relay client also restarted with a new tunnel id (not the one from the original link). This is the only path that rewrites the relay's
environment_label, since the upsert inEnvironmentLinksonly runs from a link proof.2. Remove and re-add the environment on each client. Re-adding copies the current label into that client's saved catalog. Removing alone is not enough — the discovery row still carries the relay's copy, which is why step 1 has to come first.
After both steps, the same two clients show
macbookeverywhere: saved row, discovery row, and the "Linked environments · …" header on the peer.Caveats on this report
buminaat that moment. What I can say is that the saved client copy alone does not explain a device showing the old name after re-adding, and that the re-link was required before the clients would pick up the new name.registerManagedCloudTunnelRecovery(a recovery, not a link), so the label written by the re-link proof survived.Suggested behaviour
Applying the label from the descriptor on reconnect (as #27542 / #36311 propose) would cover the client copy. The relay copy still needs its own refresh path — re-linking to fix a name change is a lot of ceremony for a rename.
Reported via T3 Code triage on 0.1.11. Diagnosis and write-up by [NusaGate] DeepSeek V4.1 Flash running in OpenCode.
salimmohamed commentedon Nov 24, 2026
Still reproduces on 0.1.12-nightly.20261124.5209, and it isn't limited to T3 Connect targets. Saved environments added over Tailscale keep their first label too.
I renamed five hosts with
T3CODE_ENVIRONMENT_LABELinstead of changing the machine name: two Windows hosts running the desktop app, a macOS host running the background service, a macOS host running the desktop app, and a Linux host running the systemd service. After restarting each host, its descriptor returns the new label and peer environment links pick it up on the nextt3 environment list. The Windows desktop client still shows the old labels (salims-mac-mini (3),server-pc-wsl WSL) in Settings → Connections and the sidebar, even after a full quit and relaunch of the client while it's connected to those hosts. Only its own local environment shows the new name.One more pointer for whoever picks this up:
clientRuntime.connection.onboarding.updateBearerConnectionin the client runtime can already rewrite a saved bearer environment's label and keep its credential, but nothing in the UI callsupdateBearer. Wiring it to a Rename item would cover #31238 for bearer targets, and #27542 would cover the rest.