Skip to content

[Bug]: Removing an environment on the T3 Connect account page leaves it linked and holding a tunnel slot; the relay DELETE removes it #38179

Not planned

Description

@joaosavi

Before submitting

Area

apps/web

Steps to reproduce

  1. On macOS, install T3 Code Nightly (desktop) with Local environment on and sign in to a free T3 Connect account. The app's local server links itself to the account as an environment (labelled with the Mac's name) and takes one of the 3 tunnel slots.
  2. Turn the Mac into a thin client: turn Local environment off and run t3 connect logout from the app's bundled CLI. The CLI warns: The relay-side environment record was not revoked. t3 connect status then shows Authorization: missing and Environment link: not provisioned, and no cloudflared runs.
  3. Open the T3 Connect page of the account at accounts.t3.codes and remove the Mac's environment.
  4. List the account's environments: GET https://relay.t3.codes/v1/environments with the bearer token of a signed-in t3 CLI on another machine.

Expected behavior

After step 3 the Mac's environment is gone from the account, and its tunnel slot is free.

Actual behavior

After step 3 the Mac's environment is still returned by GET /v1/environments, with its original linkedAt and its managed endpoint, and it keeps using 1 of the 3 tunnel slots. Its endpoint answers HTTP 530 with Cloudflare error code: 1033, because the tunnel behind it is gone.

DELETE https://relay.t3.codes/v1/client/environment-links/<environmentId> with the same CLI token removed it immediately. It was not listed again after the desktop app on the Mac was quit and reopened, and it was still absent 15 minutes later.

We did not capture the toast or the network request from the account page, so I can't say whether the page showed an error, removed the row optimistically, or sent a different request.

Impact

Minor bug or occasional failure

Version or commit

Desktop app 0.1.11-nightly.20261117.4825 (Mac). Other environments on the account run 0.1.10-nightly.20261116.4800.

Environment

macOS on Apple Silicon (darwin-arm64), T3 Code Nightly desktop app, managed cloudflared 2026.10.4.

Logs or stack traces

# Mac, after `t3 connect logout`
$ t3 connect status --base-dir ~/.t3
T3 Connect
  Exposure: disabled
  Authorization: missing
  Environment link: not provisioned
  Relay: not provisioned

# After removing it on accounts.t3.codes, GET /v1/environments still lists it (ids redacted)
{"environmentId":"<redacted>","label":"<mac name>","endpoint":{"httpBaseUrl":"https://prod-<redacted>.t3coderelay.com/","providerKind":"cloudflare_tunnel"},"linkedAt":"2026-11-17T14:18:48.834Z"}

# Its endpoint
$ curl -s -o /dev/null -w '%{http_code}\n' https://prod-<redacted>.t3coderelay.com/
530    # body: error code: 1033

# DELETE /v1/client/environment-links/<environmentId> -> success; next GET /v1/environments no longer lists it

Screenshots, recordings, or supporting files

No response

Workaround

Call DELETE https://relay.t3.codes/v1/client/environment-links/<environmentId> with the bearer token of a signed-in t3 CLI. Take the environmentId from GET https://relay.t3.codes/v1/environments.

Activity

  1. juliusmarminge commented on Nov 17, 2026

    @juliusmarminge
    Member

    @joaosavi Where exactly did you remove the Mac's environment: in the T3 Code app under the account menu → Manage account → T3 Connect → Deregister, or in Settings → Connections → 'Remove from this device…'? And what toast or message did you see afterwards?

  2. added
    needs more info
    on Nov 17, 2026
  3. github-actions commented on Nov 25, 2026

    @github-actions
    Contributor

    Closing: no reply in 7 days after we asked for more information. Comment with the missing details and we will reopen.

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

    needs more info

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions