Skip to content

[macOS] Codex Desktop workspace routing times out unless HTTP_PROXY/HTTPS_PROXY are explicitly set #49921

Open

Description

@Parrotools

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

26.921.10847

What subscription do you have?

plus

What platform is your computer?

Darwin 25.6.0 arm64 arm

What issue are you seeing?

Codex Desktop on macOS fails to initialize my authenticated workspace when launched normally from Finder/Dock.

The main error is:

Sign-in failed: workspace routing discovery timed out

The application logs show account/read consistently taking about 15 seconds and then failing:

[AppServerConnection] response_routed
durationMs=15002
errorCode=-32603
method=account/read

[electron-message-handler] Request failed
durationMs=15060
error={"code":-32603,"message":"workspace routing discovery timed out"}
method=account/read

I have also observed:

Workspace routing is unavailable

with HTTP status 432 on requests including:

/settings/user
/wham/usage
/wham/tasks/list

On some login attempts, the logs also contain:

Authenticated workspace changed
account_login_completed ... success=false

My ChatGPT authentication itself is still valid.

The important A/B test is:

Normal launch

Launching Codex normally from Finder/Dock fails with workspace routing discovery timeout.

Electron proxy flag only

Launching with:

/Applications/ChatGPT.app/Contents/MacOS/ChatGPT \
  --proxy-server=http://127.0.0.1:7897

does NOT fix the problem.

account/read still takes approximately 15 seconds and fails with:

workspace routing discovery timed out

HTTP_PROXY / HTTPS_PROXY

Launching the same app with:

HTTP_PROXY=http://127.0.0.1:7897 \
HTTPS_PROXY=http://127.0.0.1:7897 \
NO_PROXY=localhost,127.0.0.1,::1 \
/Applications/ChatGPT.app/Contents/MacOS/ChatGPT

works.

Codex opens normally and immediately recognizes the already signed-in ChatGPT account.

This machine previously worked normally without manually setting these environment variables.

What steps can reproduce the bug?

  1. Run a local HTTP proxy on:
127.0.0.1:7897
  1. Confirm that ChatGPT/network access through the proxy is working.

For example:

curl -x http://127.0.0.1:7897 \
  -o /dev/null \
  -sS \
  -w 'DNS:%{time_namelookup}\nCONNECT:%{time_connect}\nTLS:%{time_appconnect}\nTTFB:%{time_starttransfer}\nTOTAL:%{time_total}\nHTTP:%{http_code}\n' \
  https://chatgpt.com/backend-api/wham/accounts/check

Example result on my machine:

DNS:0.000073
CONNECT:0.000654
TLS:0.214420
TTFB:0.470486
TOTAL:0.470563
HTTP:401

The 401 is expected because this curl request does not contain my ChatGPT authentication token. The relevant point is that the endpoint is reachable in less than one second.

  1. Launch Codex normally from Finder/Dock.

  2. Codex fails during account/workspace initialization with:

workspace routing discovery timed out
  1. Quit Codex completely.

  2. Launch with only the Electron proxy option:

/Applications/ChatGPT.app/Contents/MacOS/ChatGPT \
  --proxy-server=http://127.0.0.1:7897
  1. The same timeout still occurs.

  2. Quit Codex again.

  3. Launch with explicit proxy environment variables:

HTTP_PROXY=http://127.0.0.1:7897 \
HTTPS_PROXY=http://127.0.0.1:7897 \
NO_PROXY=localhost,127.0.0.1,::1 \
/Applications/ChatGPT.app/Contents/MacOS/ChatGPT
  1. Codex initializes successfully and the existing authenticated account is recognized.

No model request/session is reached before the failure, so token limit/context-window usage is not applicable.

What is the expected behavior?

What is the expected behavior?

Codex Desktop should restore and initialize the existing authenticated ChatGPT workspace when launched normally from Finder/Dock.

Users should not need to inject HTTP_PROXY and HTTPS_PROXY manually into the GUI application's environment.

If the Desktop application is using a proxy, the bundled Codex CLI/app-server should use a compatible proxy configuration as well.

In particular, proxy handling should be consistent between the Electron/Desktop networking layer and the bundled Codex app-server.

Additional information

This appears to be related specifically to proxy propagation/discovery between Codex Desktop and its bundled Codex CLI/app-server.

The bundled runtime is launched by Desktop from:

/Applications/ChatGPT.app/Contents/Resources/codex-cli/CodexCLI.app/Contents/MacOS/codex

The app-server initializes successfully, but account/read later waits approximately 15 seconds before workspace routing fails.

A particularly useful observation is:

--proxy-server=http://127.0.0.1:7897

alone does not fix the problem, while:

HTTP_PROXY=http://127.0.0.1:7897
HTTPS_PROXY=http://127.0.0.1:7897

does.

This suggests that the failing workspace-routing request is likely made by the bundled Codex CLI/app-server process and is not using the same proxy configuration as the Electron network stack.

This setup previously worked normally on the same Mac without manually injecting HTTP_PROXY/HTTPS_PROXY.

Activity

  1. added
    app
    on Oct 1, 2026
  2. added
    bug
    connectivity
    app-server
    auth
    on Oct 1, 2026
  3. 01Petard commented on Oct 14, 2026

    @01Petard

    I get the same thing, initially, sol 6.1 kept retrying, and I assumed it was a network issue, so I logged out and logged back in.
    However, I can't even log in, and it keeps prompting me that “workspace connection timed out”

  4. styayur commented on Nov 11, 2026

    @styayur

    Confirmed on Windows 11: explicit proxy environment variables restore Codex Desktop workspace initialization

    I reproduced a closely related issue on Windows 11 25H2 with Codex Desktop 26.1103.7773.0 and standalone Codex CLI 0.167.1.

    Symptoms

    • Codex Desktop displayed Couldn't load workspace settings and prevented new conversations.
    • Desktop logs included workspace routing discovery failed, account/read errors (-32603), and locally reported HTTP 432 responses across account and settings routes.
    • ChatGPT authentication remained valid, and standalone Codex CLI model inference succeeded.
    • Switching between Clash Verge system-proxy and TUN configurations did not resolve the Desktop failure.

    Controlled diagnostics

    Without explicit proxy environment variables:

    codex doctor --network-only --summary
    3 ok · 1 warn · 0 fail
    Responses WebSocket failed
    

    With:

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

    The same CLI reported:

    4 ok · 0 warn · 0 fail
    WebSocket connected (HTTP 101 Switching Protocols)
    

    I also verified that replacing Desktop's bundled runtime with the standalone npm CLI did not fix the workspace error.

    Confirmed recovery

    After setting the proxy variables at Windows user scope, restarting the Windows session, and launching Codex Desktop with its official bundled runtime, workspace initialization recovered and new conversations worked normally.

    This suggests an inconsistency in proxy discovery or propagation between Windows Desktop networking and the Codex app-server. The exact failing request path has not been independently isolated.

    Requested improvement

    Please investigate consistent proxy handling for workspace-routing discovery, including Windows system-proxy/TUN environments, and provide actionable diagnostics when the app-server cannot establish workspace routing.

    Related: #59344.

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

    appapp-serverauthbugconnectivity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions