Skip to content

Android Remote connects to macOS host, then immediately closes every client session #39908

Open

Description

@Sogl

What version of the ChatGPT / Codex app are you using?

  • macOS ChatGPT desktop: 26.818.31338
  • Bundled app-server: codex-cli 0.148.0-alpha.9
  • Android ChatGPT: 1.2026.223 (20)

What platform are you using?

  • Host: Intel MacBook running macOS Sequoia 15.7.8 (24G824)
  • Controller: Android 16, OnePlus 13 / CPH2653

What issue are you seeing?

ChatGPT Remote pairing succeeds, and the Android device appears under:

Settings → Connections → Control this Mac

The Android app shows the Mac host (MBP-Artyom.local), but selecting it always fails with:

Could not connect to ChatGPT for desktop

The host Remote WebSocket connects successfully and remains connected:

remote control websocket status changed
previous_status=Connecting next_status=Connected

connected to app-server remote control websocket
websocket_url=wss://chatgpt.com/backend-api/wham/remote/control/server

However, every attempted Android Remote connection reaches the host relay and is immediately closed:

forwarding remote control connection closed transport event connection_id=...

There are no host-side 401, 403, 409, TLS, timeout, or Remote WebSocket disconnect errors.

What I tried

  • Updated both macOS and Android ChatGPT apps.
  • Revoked the Android device on the Mac and paired again with a new QR code.
  • Cleared ChatGPT app data on Android, signed in again, and paired again.
  • Reset the host-side remote_control_enrollments state and created a fresh pairing.
  • Confirmed the host app is open, awake, online, and Remote Control is enabled.
  • Reproduced the same failure on multiple independent mobile network paths.

Expected behavior

After pairing, the Android Remote screen should connect to the macOS host and allow viewing or controlling its chats/projects.

Actual behavior

The Android app recognizes the host but cannot open it. The Remote client connection reaches the host relay and closes immediately.

Additional context

This does not appear to be a local routing or general WebSocket problem:

  • The macOS host has a stable connected Remote WebSocket to OpenAI.
  • Android maintains normal ChatGPT/OpenAI connections.
  • The same failure reproduces across unrelated mobile network paths.

Activity

  1. added
    bug
    app
    connectivity
    on Aug 21, 2026
  2. github-actions commented on Aug 21, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  3. FVEFWFE commented on Aug 22, 2026

    @FVEFWFE

    I can reproduce the same failure with a Windows host.

    Host:

    • Windows laptop
    • ChatGPT/Codex Desktop version: 26.818.3698.0
    • Bundled app server: 0.149.0-alpha.4
    • Controller: ChatGPT Android

    Pairing succeeds and the desktop Remote WebSocket connects to OpenAI. When Android tries to open the host, the desktop log records:

    forwarding remote control connection closed transport event connection_id=...

    The Android app then shows Transport unavailable or Failed to connect to ChatGPT desktop.

    I confirmed:

    • Both devices use the same ChatGPT account.
    • The desktop host is awake and online.
    • The desktop authentication token is current.
    • The desktop can connect to ChatGPT over port 443.
    • Tailscale is disabled on both devices.
    • I signed out and back in.
    • I fully restarted the desktop app.
    • I removed the pairing and paired again with a new QR code.

    The host WebSocket remains connected. Each Android client transport reaches the host relay and closes within seconds. This appears to reproduce the same Android Remote transport failure on Windows.

  4. Dakota53 commented on Nov 2, 2026

    @Dakota53

    I encountered similar symptoms and found a workaround. Hopefully this is helpful for anyone else encountering sudden infinite reconnect loops.

    Symptoms

    Android showed the Mac as connected and listed chats, but opening a chat or creating one triggered a reconnect loop. Sometimes it displayed:

    The host disconnected before the task was created.

    Re-pairing, restarting both apps, clearing Android cache/data, changing networks, and archiving three large chats did not resolve it.

    What fixed it

    We found one oversized, blocked queued message in the Mac’s ~/.codex/.codex-global-state.json, under queued-follow-ups. Its pausedReason was:

    Input exceeds the maximum length of 1048576 characters.
    

    The message was duplicated in its saved prompt/context and accounted for approximately 11.6 MB of the 13.5 MB state file.

    We fully quit the desktop app and removed only that blocked queued entry, preserving the chat and other settings. Editing while the app was running did not stick—it restored the entry from memory.

    After restarting, the state file was approximately 1.94 MB, and Android Remote immediately worked again.

    Diagnostic clues and limitations

    The original host logged repeated client connection closures roughly every five seconds, during startup requests and before opening a chat. A separate diagnostic host with a small chat catalogue worked during our comparison tests.

    This strongly implicates the oversized queued entry in my case. I didn't establish whether the underlying failure is transfer size, parsing, a timeout, or another state-handling bug, or whether it explains everyone’s report.

    Versions

    • Android ChatGPT: 1.2026.293 (19)
    • Mac desktop app: 26.1027.61615
    • Bundled CLI: 0.166.0-alpha.5.1

    The workaround was targeted removal of a single blocked queued message; a full desktop-state reset was unnecessary.

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

    appbugconnectivityremote

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions