Skip to content

[Bug]: T3 Connect keeps the environment label from the first link; renaming the Mac is not reflected until the environment identity is recreated #21270

Closed as duplicate

Description

@timharris707

Claude Opus 5.5 via Claude Code, writing on behalf of Tim Harris:

Summary

After renaming a Mac, T3 Connect keeps showing the environment under its old name on the iOS app and on another desktop client. A server restart, t3 connect link again, and even t3 connect unlink + t3 connect link (which prints "Revoked the relay-side environment record") all leave the old label in place. The only thing that changed the label was giving the machine a brand-new environment identity, which then broke connections until a fresh t3 connect logout + t3 connect link sign-in.

Setup

  • T3 Code 0.1.0: desktop app ("T3 Code (Beta)") hosting the local environment on one Mac (macOS 27), and t3 serve under the launchd service on a second Mac. Relay: https://relay.t3.codes, managed tunnels, cloudflared 2026.10.x.
  • iOS app 2.0.0, same T3 Connect account on all clients.

Steps

  1. Link both machines with t3 connect link. The iOS app lists them under each Mac's computer name (scutil --get ComputerName), as resolveServerEnvironmentLabel resolves it.
  2. Rename both Macs in System Settings > General > About > Name.
  3. Restart the servers (desktop app quit/relaunch; t3 service restart on the other). The server trace shows the new label (environment.label attribute on the local environment) and the live connection announces the new name to another client (" disconnected" appears in that client's trace), yet:
    • iOS "+ Add environment" > "Or use the managed relay" still lists the old labels (fresh fetch; "Could not load T3 Connect environments" appears when the fetch fails, so this is not a cached list).
    • T3 Account > T3 Connect > Registered servers still shows the old labels.
    • The other desktop client's Settings > Connections entry keeps the old label.
  4. t3 connect link --headless again (stored credential, "Authorized as …"), restart: old labels.
  5. t3 connect unlink ("Revoked the relay-side environment record"), t3 connect link --headless, restart: old labels, even after deleting the phone's saved entries and force-quitting the iOS app.
  6. Delete ~/.t3/userdata/environment-id and ~/.t3/userdata/secrets/cloud-link-ed25519-key-pair.bin, t3 connect link --headless, restart: the new labels appear everywhere, but every client then gets RelayEnvironmentConnectNotAuthorizedError with reason environment_link_not_found ("Relay has no active link for this environment", e.g. trace ID 17e7903f57d32d55cddc89a649b5d7f9) although t3 connect status reports the link provisioned, the managed tunnel has 4 ready connections, and environment.cloud.activateManagedTunnel succeeded.
  7. t3 connect logout + t3 connect link (fresh sign-in) + restart: the iOS app now shows a second entry per machine marked "Available · Relay online"; switching the stale entries off and the new ones on connects fine.

Expected

A server restart (or at the latest t3 connect link again) should update the label the relay returns for an environment with the same identity. Alternatively a way to set the label explicitly (as asked in #5623).

Observed

The relay returns the label captured at the first link for as long as the environment identity exists; the only way to change it is a new identity, which also requires a fresh CLI sign-in before clients can connect again.

Notes

  • Both machines ended up with the correct names after step 7; this is a report, not a request for help.
  • Happy to share trace IDs or run a debug build if useful.

Activity

  1. juliusmarminge commented on Oct 18, 2026

    @juliusmarminge
    Member

    Note

    Grok responding on behalf of Julius.

    Thanks for the detailed write-up. This is the same bug as #15683, which already tracks both stale copies of the label: the client's saved target and the relay's environment_label, which isn't refreshed when an already-linked host restarts. I'm closing this as a duplicate so the discussion stays in one place.

    Your finding that t3 connect link again, and even unlink + link, still leaves the old label is a useful extra data point for #15683. The open PR #18924 (host display name setting) also changes how the relay label gets persisted. Setting the label explicitly is tracked in #13057.

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

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions