openai / openai/codex

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

Open
#39,908 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug connectivity remote
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure through the Android Remote connection and inspect the host-side remote control WebSocket and forwarding relay logs. Compare the successful host WebSocket connection with the immediately closed client session, including the remote_control_enrollments state. Done means a paired Android client remains connected and can view or control the macOS host without relay closure.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, macos, rust
Domain
backend-api-design, mobile-dev, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.