Skip to content

Remote Control stuck on "connecting" with environmentId null on macOS #38534

Open

Description

@limenglong032-commits

What version of the Codex App are you using (From “About Codex” dialog)?

26.803.61601

What subscription do you have?

ChatGPT Plus

What platform is your computer?

Darwin 25.6.0 arm64 arm

What issue are you seeing?

macOS Codex Remote Control fails to establish a connection.

Codex CLI: 0.147.0
Authentication: Logged in using ChatGPT

codex remote-control start --json:
status: connecting
environmentId: null
timedOut: true

Error:
Remote control is enabled on MacBook-Pro-10.local but the connection is errored.

codex remote-control pair --json:
timed out waiting for remoteControl/pairing/start response
deadline has elapsed

Already tested:

  • Latest Codex CLI
  • Logout/login
  • Restart ChatGPT Desktop
  • Restart remote-control daemon
  • Multiple VPN/proxy nodes
  • HTTP/HTTPS proxy environment variables
  • Shadowrocket global proxy
  • Shadowrocket forced routing/tunnel mode

Feedback ID:
no-active-thread-019fff78-c4bc-75b0-ae5f-bd1276fda31e

What steps can reproduce the bug?

Feedback ID: no-active-thread-019fff78-c4bc-75b0-ae5f-bd1276fda31e

What is the expected behavior?

No response

Additional information

No response

Activity

  1. added
    bugSomething isn't working
    CLIIssues related to the Codex CLI
    connectivityIssues involving networking or endpoint connectivity problems (disconnections)
    on Aug 14, 2026
  2. limenglong032-commits commented on Aug 14, 2026

    @limenglong032-commits
    Author
    1. Open ChatGPT/Codex Desktop on macOS.
    2. Sign in with ChatGPT Plus.
    3. Enable Remote Control.
    4. Run: codex remote-control start --json
    5. Remote remains stuck on "connecting", environmentId stays null, and the request times out.
  3. github-actions commented on Aug 14, 2026

    @github-actions
    Contributor

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

    Powered by Codex Action

  4. limenglong032-commits commented on Aug 14, 2026

    @limenglong032-commits
    Author

    已解决,根因为 MFA + 重复实例

  5. jdcodes1 commented on Aug 18, 2026

    @jdcodes1

    Two things worth knowing from the code here.

    The status you can see is deliberately lossy: on every failed connect the daemon publishes only the bare enum RemoteControlConnectionStatus::Errored — the actual cause (HTTP status, cf-ray, error kind) goes exclusively to a tracing warn! in the daemon log (https://github.com/openai/codex/blob/1f41cc5d92/codex-rs/app-server-transport/src/transport/remote_control/websocket.rs#L775-L799). That's why --json gives you status: connecting/errored with no reason. environmentId: null just means enrollment never completed (it's only published after a successful enrollment, desired_state.rs#L168), and the pair timeout is downstream of the same dead connection — three symptoms, one failed WebSocket connect.

    So the real diagnosis is in your log: look for connecting to app-server remote control websocket followed by the warn line with error / error_kind in $CODEX_HOME/log/. Given the VPN/proxy environment, a blocked or MITM'd WSS upgrade is the most likely culprit — the connect-error formatter already captures HTTP status and body when the edge rejects it.

    Fix suggestion for the repo: carry a last_error: String alongside the status enum and print it in remote-control start --json, so users don't need log spelunking to see a connectivity cause.

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

    CLIIssues related to the Codex CLIappIssues related to the Codex desktop appbugSomething isn't workingconnectivityIssues involving networking or endpoint connectivity problems (disconnections)remote

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions