Skip to content

android: pairing QR with custom URL retains existing OpenTunnel address #62901

Open

Description

@Santiago-j-s

Summary

Scanning a QR generated with pair --url in the Android app leaves the server connected through its existing OpenTunnel address instead of the supplied Tailscale address.

Environment

  • OpenCode desktop/CLI: 2.2.6, release
  • Server version displayed in Android: 2.2.6
  • Host OS: macOS, Darwin 25.5.0 arm64
  • Android app/OS versions: not yet collected
  • Terminal: xterm-256color
  • Shell: zsh
  • Active plugins: shared-context-notes, whats-new (runtime diagnostic snapshot)

Reproduction

  1. Have a server configured in the Android app using its OpenTunnel address.
  2. Expose the same server through Tailscale Serve.
  3. Generate a pairing QR on the host:
    opencode pair --url https://example.tailnet.ts.net
  4. Scan the terminal QR using the Android app.
  5. Inspect the selected server’s address.

Expected Behavior

Pairing uses the explicitly supplied Tailscale URL, including when the same server already exists under another address.

Actual Behavior

The Android app displays the OpenTunnel address and remains connected through it.

Additional Context

Manually editing the server address on Android to the Tailscale URL works. This suggests connectivity is available, but does not establish why pairing retains the OpenTunnel address. Observed once; repeatability has not been tested.

Activity

  1. opencodejr commented on Nov 9, 2026

    @opencodejr

    Thanks for the detailed report!

    It looks like the app is doing what it was built to do here, so we're treating this as a feature request. With opencode pair --url, the QR code carries only the URL you passed, so the QR itself is correct. But when you pair from an existing server's edit or sign-in screen, the app uses the QR only to get a new token. It then tries that server's saved address first and switches to the QR's address only if the saved one is unreachable. Your OpenTunnel address was still reachable, so it was kept. That also explains why editing the address by hand works.

    Your request, as we understand it: when the QR carries an explicit --url address, re-pairing an existing server should switch it to that address rather than keep the saved one. Maintainers will consider it.

    One thing would help: which screen did you scan from? Was it the existing server's edit or sign-in screen, or "add server"? If you scanned from "add server" and the server still ended up on the OpenTunnel address, that would be a bug, so please tell us.

    Related, though none of these covers this exact case:

  2. Santiago-j-s commented on Nov 9, 2026

    @Santiago-j-s
    Author

    I scanned from Add Server, not an existing server’s edit or sign-in screen.

    I already had the Mac connected through OpenTunnel and wanted to add its Tailscale address as a separate connection, then delete the OpenTunnel entry. Scanning the QR generated with pair --url <tailscale-url> still selected OpenTunnel.

    I then deleted the existing OpenTunnel entry and scanned again through Add Server. It still connected using the OpenTunnel address.

    Manually editing the address to the Tailscale URL worked.

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