Skip to content

[Bug]: A new preview tab opens on another machine's window instead of the one showing the thread #13771

Description

@mkiera

Before submitting

Area

apps/server

Steps to reproduce

  1. Run the T3 Code desktop app on machine A. The server runs there too.
  2. Open the desktop app on machine B and connect it to machine A's environment. Open any other thread there. Leave its browser panel closed.
  3. On machine A, open a thread that has no browser tab yet.
  4. Click into machine B's T3 window so it is the most recently focused window. Then return to machine A.
  5. Ask the agent in the machine A thread to open a browser tab (preview_open with reuseExistingTab: false).

Expected behavior

The tab opens in machine A's window, which is showing the thread.

Actual behavior

The tab opens on machine B, in a thread nobody is looking at. It uses machine B's network and browser profile, so local URLs such as http://127.0.0.1:<port> fail and the user's sign-ins from machine A are missing. The session then stays pinned to machine B until that client disconnects.

When no host owns a tab for the thread, the broker ranks hosts by focused and focusOrder only. Hosts do not report which thread they are showing, so the broker cannot prefer the window the user is watching.

Impact

Major degradation or frequent failure

Version or commit

T3 Code (Nightly) 0.0.43-nightly.20260925.2251

Environment

Machine A: Windows 11 x64, desktop app and server. Machine B: Windows 11 x64 VM, desktop app connected to machine A through T3 Connect. Agent provider: Claude Code.

Workaround

Click into the window showing the thread before the agent opens a new browser tab.

Activity

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