Skip to content

Windows remote control only works with global proxy env vars, but then all conversations fail with 403 invalid_workspace_selected #29233

Open

Description

@xiahy1211

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

26.616.5445.0

What subscription do you have?

ChatGPT Plus

What platform is your computer?

Microsoft Windows NT 10.0.26100.0 x64

What issue are you seeing?

I am seeing a proxy-related issue with the Codex Windows desktop app remote control feature.

My setup

  • Windows desktop app
  • Local proxy at 127.0.0.1:7897
  • I want to use phone remote control to connect to Codex running on Windows

Reproduction

I can reliably reproduce two mutually exclusive states.

1. Without global proxy environment variables

  • Desktop conversations work normally
  • Phone cannot connect to the Windows Codex app
  • The desktop UI says remote control cannot be enabled

2. With global proxy environment variables

I tested both:

  • a .env file under C:\Users\<user>\.codex\.env
  • Windows user env vars via setx

Example values:

HTTP_PROXY=http://127.0.0.1:7897
HTTPS_PROXY=http://127.0.0.1:7897
ALL_PROXY=http://127.0.0.1:7897
NO_PROXY=localhost,127.0.0.1,::1

With these set:

  • Phone can connect to the Windows Codex app
  • But then all conversations fail
  • Every conversation returns:
unexpected status 403 Forbidden: {"detail":{"code":"invalid_workspace_selected"}}, url: https://chatgpt.com/backend-api/codex/responses

Captured example

  • cf-ray: a0eb9712ff1ddedf-NRT
  • request id: 391e384f-9169-43fd-8944-8ec9a20746fa

Additional notes

  • I also configured WinHTTP proxy to 127.0.0.1:7897
  • Without global proxy env vars, the phone still cannot connect
  • With global proxy env vars, the phone connects, but conversation requests always fail with 403 invalid_workspace_selected

Suspected cause

This looks like the Windows app remote-control path does not correctly use proxy settings by default, but forcing global proxy env vars changes the runtime/session context and breaks workspace selection for normal conversations.

What steps can reproduce the bug?

  1. Run Codex Desktop App on Windows with no global proxy environment variables set.
  2. Use a local proxy on 127.0.0.1:7897.
  3. Try to connect from phone remote control to the Windows Codex app.
  4. Observe that desktop conversations work normally, but phone remote control cannot connect and the desktop UI says remote control cannot be enabled.

Then reproduce the second state:

  1. Set global proxy environment variables for the Windows user, for example:
    setx HTTP_PROXY http://127.0.0.1:7897
    setx HTTPS_PROXY http://127.0.0.1:7897
    setx ALL_PROXY http://127.0.0.1:7897
    setx NO_PROXY "localhost,127.0.0.1,::1"

    Alternatively, create C:\Users<user>.codex.env with:
    HTTP_PROXY=http://127.0.0.1:7897
    HTTPS_PROXY=http://127.0.0.1:7897
    ALL_PROXY=http://127.0.0.1:7897
    NO_PROXY=localhost,127.0.0.1,::1

  2. Fully restart Codex Desktop App.

  3. Try phone remote control again.

  4. Observe that the phone can now connect to the Windows Codex app.

  5. Start or resume any conversation in the desktop app.

  6. Observe that all conversations fail with:
    unexpected status 403 Forbidden: {"detail":{"code":"invalid_workspace_selected"}}, url: https://chatgpt.com/backend-api/codex/responses

Captured example:
cf-ray: a0eb9712ff1ddedf-NRT
request id: 391e384f-9169-43fd-8944-8ec9a20746fa

Additional note:

  • I also configured WinHTTP proxy to 127.0.0.1:7897
  • With WinHTTP proxy alone, the phone still could not connect
  • The problem appears specifically when global proxy environment variables are applied to the Codex app process

This is reproducible on my machine and consistently results in:

  • no proxy env vars -> desktop chat works, phone remote control fails
  • global proxy env vars -> phone remote control works, but all conversations fail with 403 invalid_workspace_selected

What is the expected behavior?

No response

Additional information

No response

Activity

  1. added
    appIssues related to the Codex desktop app
    on Jun 20, 2026
  2. added
    bugSomething isn't working
    windows-osIssues related to Codex on Windows systems
    connectivityIssues involving networking or endpoint connectivity problems (disconnections)
    on Jun 20, 2026
  3. gaopengbin commented on Jul 14, 2026

    @gaopengbin

    I reproduced the mobile-to-Windows connection problem and built a small workaround: https://github.com/gaopengbin/chatgpt-proxy-launcher

    It launches ChatGPT/Codex with process-scoped HTTP_PROXY/HTTPS_PROXY, without changing the global Windows proxy. In my test, mobile could then connect to the desktop Codex session.

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

    appIssues related to the Codex desktop appbugSomething isn't workingconnectivityIssues involving networking or endpoint connectivity problems (disconnections)remotewindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions