Skip to content

[Bug]: Remote loopback dev server fails in Desktop local browser while environment browser succeeds #27625

Closed

Description

@timofey-TK

Before submitting

Area

apps/desktop

Steps to reproduce

  1. Connect T3 Code Desktop to a remote environment.
  2. Start an HTTP application bound to loopback in that environment. In this incident, a NiceGUI application printed NiceGUI ready to go on http://127.0.0.1:56795.
  3. Open that address in a user-created built-in T3 browser tab.
  4. Compare with opening the same address through the agent's environment browser.

For an independent minimal reproduction, an HTTP server such as python3 -m http.server 56795 --bind 127.0.0.1 should exercise the same addressing problem; this replacement fixture was not run in this investigation.

Expected behavior

When opening a development server from a remote environment, there should be a clear way to reach that environment's loopback service with local rendering. If this requires forwarding or is unsupported, the browser should explain that requirement and offer the appropriate action rather than leaving the user with a connection-refused page.

Please triage the remote-loopback navigation and missing guidance. An authenticated HTTP/WebSocket forwarding route would address the workflow, but this report does not claim that automatic port forwarding was implemented by #17316.

Actual behavior

The user-created local tab fails with ERR_CONNECTION_REFUSED, while the application is healthy on the remote host. Opening the identical URL in the agent's environment browser succeeds, but returns to streamed rendering. The user reports severe interaction lag with the streamed browser, making that fallback impractical for normal work.

Impact

Major degradation or frequent failure. Local preview cannot reach the remote development server; the working streamed fallback is too laggy for the reporting user.

Version or commit

Remote T3 Code server: 0.1.5, verified through t3_environment_read. Desktop client version was not independently verified.

Environment

Remote host: Linux x64. Client: T3 Code Desktop connected to that remote environment. Client OS and connection transport were not independently verified.

Logs or stack traces

Only the relevant observed values are included:

Remote application startup:
NiceGUI ready to go on http://127.0.0.1:56795

Remote listener:
LISTEN 127.0.0.1:56795 (python)

HTTP request made on the remote host:
HTTP 200; connect 0.000159s; first byte 4.944385s

User-created browser tab, reported by t3_preview_list:
navStatus: LoadFailed
url: http://127.0.0.1:56795/
code: -102
description: ERR_CONNECTION_REFUSED

Agent environment browser, same URL:
available: true
title: static-params-and-secrets-editor
loading: false

The tab-state API does not explicitly identify this user's tab runtime. Its local placement is inferred from its absence from the environment browser's automatable tabs, the successful server-side controls, and the user-tab behavior documented in #17316.

Workaround

Opening the page in the environment browser succeeds; this was verified. A manual SSH tunnel is another possible workaround, but was not set up or tested in this incident.

Related reports and scope

If maintainers consider this entirely a feature request rather than a navigation/discoverability defect, please redirect it to Ideas Discussions. No implementation approval is assumed.

Filed by

Prepared by OpenAI Codex (gpt-6.1-sol, high reasoning effort) through T3 Code, at the reporting user's explicit request. This was not run through t3 triage.

Activity

  1. juliusmarminge commented on Oct 30, 2026

    @juliusmarminge
    Member

    Duplicate of #26890. Both reports have the same symptom on the same surface: a dev server bound to the remote environment's loopback refuses connections from a Desktop browser tab that renders on this computer. Both also ask for the same fix, which is forwarding that port to the client. Closing here so it is tracked in one place.

    What main does today (checked in the code at 6575ce3):

    • A browser tab you open yourself for a remote environment renders on this computer, so http://127.0.0.1:<port> connects to the client machine, not the remote host.
    • When that tab fails to load, the "This site can't be reached" page offers Open in 's browser, which reopens the tab in the environment's browser, where its loopback is reachable. That button was added in #17316.
    • Forwarding remote loopback ports to locally rendered tabs isn't implemented yet. The code refers to it as a planned authenticated preview gateway.

    Until forwarding lands, three things work: that button, a manual ssh -N -L <port>:127.0.0.1:<port> <host>, or binding the dev server to an address the client can reach (for example the Tailscale address).

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