Windows remote control only works with global proxy env vars, but then all conversations fail with 403 invalid_workspace_selected
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
.envfile underC:\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-NRTrequest 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?
- Run Codex Desktop App on Windows with no global proxy environment variables set.
- Use a local proxy on 127.0.0.1:7897.
- Try to connect from phone remote control to the Windows Codex app.
- 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:
- 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
- Fully restart Codex Desktop App.
- Try phone remote control again.
- Observe that the phone can now connect to the Windows Codex app.
- Start or resume any conversation in the desktop app.
- 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_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗