Skip to content

mobile: iOS app cannot connect through pair --remote #54627

Closed as not planned
Closed as not planned

Description

@heymaaz

Summary

I was working with the OpenCode iOS app and it disconnected suddenly. I then tried opencode pair --remote multiple times, but every attempt failed to connect.

Environment

  • opencode version: 2.0.26
  • iOS app version: 0.1.0 (278)
  • OS: Linux x86_64
  • Terminal: Ghostty
  • Shell: Bash
  • Install/channel: Latest release
  • Active plugins: None configured

Reproduction

  1. Start OpenCode on Linux.
  2. Run:
    opencode pair --remote
  3. Open the generated pairing link or scan the QR code using the OpenCode iOS app.
  4. Repeat with newly generated pairing links.

Expected Behavior

The iOS app should connect to the running OpenCode server through the generated remote pairing link.

Actual Behavior

The iOS app repeatedly displays:

OpenCode connection error
Phase: Pair
Couldn’t reach the OpenCode server

The terminal prints a valid-looking HTTPS pairing URL and QR code, but the app cannot reach the server.

Additional Context

  • The issue is reproducible with multiple newly generated pairing links.
  • opencode pair without --remote generates a local 127.0.0.1 URL successfully.
  • The local OpenCode service is running and listening normally.
  • The generated remote hostname resolves, but HTTPS requests to it time out or fail during TLS connection.
  • opencode service stop followed by retrying did not help.
  • Pairing URLs and remote hostnames have been omitted to avoid exposing temporary credentials.

I have also submitted a feedback via testflight:
image

Activity

  1. opencode-agent commented on Oct 11, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed report! I tried this on 2.0.26 on Linux x86_64 with a fresh config at about 21:35–21:40 UTC today. I couldn't reproduce it: opencode pair --remote printed the link and QR code, the tunnel hostname completed the TLS handshake with a valid certificate, and both the one-time connect link and /global/health answered right away. A second try after opencode service stop also worked. I couldn't test the iOS app itself, but the HTTPS requests to the tunnel hostname that time out for you worked from here.

    Some related cases:

    Could you check:

    1. Does it still happen now? If it does, try opencode service restart and then opencode pair --remote.
    2. From the Linux machine and from the phone's network, what does curl -v https://<your-tunnel-host>/global/health print? Please mask the hostname. It helps to know whether it fails at DNS, connect or TLS, and the exact error.
    3. Are you on a VPN, a proxy, a DNS filter such as Pi-hole or NextDNS, or a restricted network on either device? Roughly which region are you in?
    4. Please share any errors from opencode pair --remote --print-logs, with links and codes removed.
  2. heymaaz commented on Oct 13, 2026

    @heymaaz
    Author

    It's fixed now :)

  3. opencode-agent commented on Oct 13, 2026

    @opencode-agent
    Contributor

    Thanks for letting us know, glad it's working again! Since the tunnel also worked when I tested it, this was most likely a temporary problem with the opentunnel.xyz service (like the one in #54596) rather than a bug in OpenCode. If it happens again, opencode service restart followed by opencode pair --remote is worth trying first. If that doesn't help, please open a new issue with the output of curl -v https://<your-tunnel-host>/global/health (hostname masked). The bot will close this issue in about a day.

  4. opencode-agent commented on Oct 14, 2026

    @opencode-agent
    Contributor

    Closing this, since you confirmed that opencode pair --remote works again and I couldn't reproduce the problem on 2.0.26. It was most likely a temporary problem with the opentunnel.xyz service (see #54596). If the iOS app can't reach the server again, try opencode service restart and then opencode pair --remote. If that doesn't help, please open a new issue with your OpenCode version and the output of curl -v https://<your-tunnel-host>/global/health (hostname masked). Thanks for the report!

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