What happened?
After upgrading Pi from v0.70.0 to v0.74.0, OpenAI Codex requests no longer go through my HTTP proxy. Then I downgraded to lower versions one by one and confirmed that the issue starts with v0.72.0 (v0.71.1 still works without issue).
NOTE: I install and run Pi with Bun.
Side issue: since v0.72.0, pi --model openai-codex/gpt-5.5 --print <prompt> hangs (normally it should exits) after the response is printed, even when run with Node.js v24.
It might be related to #4083 where the transport: "auto" starts to prefer WebSocket.
Steps to reproduce
- start an HTTP proxy with log viewer (mitmproxy works fine)
export https_proxy=http://127.0.0.1:<proxy-port>
pi --model openai-codex/gpt-5.5 --print HELLO -> issue happens
- set
"transport": "sse" in settings.json -> issue resolves
- set
"transport": "websocket" -> happens again
Expected behavior
Should see requests to https://chatgpt.com/backend-api/codex/responses in proxy log viewer.
When run with Node.js, it does go through the proxy as expected (I can see the WebSocket upgrade request). But pi --print hangs instead of exiting cleanly (I can create a separate issue for this if it makes sense).
Version
0.74.0 (also v0.72.0)
What happened?
After upgrading Pi from v0.70.0 to v0.74.0, OpenAI Codex requests no longer go through my HTTP proxy. Then I downgraded to lower versions one by one and confirmed that the issue starts with v0.72.0 (v0.71.1 still works without issue).
NOTE: I install and run Pi with Bun.
Side issue: since v0.72.0,
pi --model openai-codex/gpt-5.5 --print <prompt>hangs (normally it should exits) after the response is printed, even when run with Node.js v24.It might be related to #4083 where the
transport: "auto"starts to prefer WebSocket.Steps to reproduce
export https_proxy=http://127.0.0.1:<proxy-port>pi --model openai-codex/gpt-5.5 --print HELLO-> issue happens"transport": "sse"insettings.json-> issue resolves"transport": "websocket"-> happens againExpected behavior
Should see requests to
https://chatgpt.com/backend-api/codex/responsesin proxy log viewer.When run with Node.js, it does go through the proxy as expected (I can see the WebSocket upgrade request). But
pi --printhangs instead of exiting cleanly (I can create a separate issue for this if it makes sense).Version
0.74.0 (also v0.72.0)