Skip to content

[Bug]: t3 connect link tells users to run t3 serve even when the background service or server is already running #42893

Done

Description

@SmithLabsLLC

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Install and start the T3 Code background service locally without T3 Connect enabled (for example t3 service install, or t3 up --no-connect --no-lan). Confirm the server is already running on 127.0.0.1:3773.
  2. Run t3 connect link in a terminal and complete browser authorization.
  3. Observe the Next command printed at the end of t3 connect link.

Expected behavior

When an installed background service (or live T3 server for the same --base-dir) is already running, t3 connect link should instruct the user to restart it (for example t3 service restart, matching the wording in t3 connect status and t3 connect publish) rather than starting a second foreground t3 serve instance.

Actual behavior

connectLinkCommand in apps/server/src/cli/connect.ts unconditionally resolves resolveHostCliHint("serve", flags.baseDir) and prints:

✓ Authorized as <account>

Next
  Start the server with `/path/to/t3 serve` to make this machine reachable.

If the background service is already running on port 3773, running that t3 serve command collides with the running server while the background service stays at Environment link: pending server startup until restarted via t3 service restart (or the OS service manager).

Impact

Minor bug or occasional failure

Version or commit

t3 v0.1.11 (also verified in apps/server/src/cli/connect.ts on main @ aacdaba1)

Environment

Ubuntu Linux x86_64, systemd user service (t3code.service), cloudflared 2026.10.4

Logs or stack traces

✓ Authorized as <redacted>

Next
  Start the server with `/path/to/t3 serve` to make this machine reachable.

Immediately afterward, t3 connect status reports:

T3 Connect
  Exposure: enabled
  Authorization: stored credential
  Environment link: pending server startup
  Relay: not provisioned

Workaround

Restart the running background service (t3 service restart or systemctl --user restart t3code.service) instead of running the printed t3 serve command, then verify with t3 connect status.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions