Summary
When running codex-web on a remote Linux server behind HTTPS, I encountered two related problems:
- The UI could remain stuck on the loading screen after the backend WebSocket disconnected and reconnected.
- In the Create project dialog, clicking Add a folder ChatGPT can read and edit did nothing, so there was no way to select a directory that exists on the server.
This report is for a remote/server-hosted setup, where the browser must select a path on the server rather than a path on the client computer.
Environment
- codex-web:
0.0.1
- Upstream base commit:
8cc728d
- Extracted Codex Desktop assets:
26.707.30751
- Codex CLI used by the service:
codex-cli 0.144.0-alpha.4
- Electron dependency:
41.2.0
- Node.js:
22.23.1
- Server: Linux, systemd service, HTTPS reverse proxy
- Client used for verification: Google Chrome
Reproduction
Remote workspace picker
- Start codex-web on a remote server.
- Open the web UI in Chrome.
- Open Create project.
- Click Add a folder ChatGPT can read and edit.
- Nothing happens, and no server-side directory can be selected.
Loading after reconnect
- Open the web UI and establish a backend IPC WebSocket connection.
- Restart or temporarily interrupt the backend service.
- Wait for the WebSocket to reconnect.
- The UI may stay in a loading state because the old message ports were closed and the renderer state was not recreated.
Root cause
The current Codex Desktop webview no longer uses only the legacy message:
electron-add-new-workspace-root-option
It now sends:
electron-pick-workspace-root-option
and expects the result through a renderer event with:
workspace-root-option-picked
The browser shim handled the legacy message but did not handle the newer picker message/response contract.
There were two additional UI issues in the remote directory dialog:
- A browser cannot use Electron's native file picker to select a directory on the remote server, so a server-side path selector and direct path input are required.
- Pointer/focus events from the custom dialog propagated to the parent Create project dialog, which could close the parent dialog unexpectedly.
For the loading problem, the WebSocket reconnect logic recreated the socket but did not recreate the renderer/message-port state after those ports had been closed.
Workaround / fix implemented
I implemented the following changes in a fork:
- Handle both
electron-add-new-workspace-root-option and electron-pick-workspace-root-option.
- Emit
workspace-root-option-picked with the selected server path for the current message contract.
- Preserve the legacy add-workspace behavior.
- Add direct server-path input and validate the directory through the server before accepting it.
- Place the custom dialog above the Desktop UI and stop
click, focusin, mousedown, and pointerdown propagation so the parent dialog remains open.
- Reload the page after a successful WebSocket reconnect when active renderer message ports were closed.
- Respect an externally supplied
CODEX_CLI_PATH and listen on 0.0.0.0 for a systemd/server deployment.
- Disable Statsig logging through the existing webview patch to avoid unnecessary network/logging activity in this environment.
Verification
npm run build:browser: passed
npm run build:server: passed
git diff --check: passed
- Browser verification passed:
- Opened Create project
- Opened the server directory picker
- Entered
/home/glory/app/git/myapp
- Added the directory
- Confirmed the parent Create project dialog remained open
- Confirmed the selected source was displayed as
myapp
Reference implementation
I am opening this issue first to document the compatibility problem and the tested workaround. I am not opening a pull request at this time.
Summary
When running
codex-webon a remote Linux server behind HTTPS, I encountered two related problems:This report is for a remote/server-hosted setup, where the browser must select a path on the server rather than a path on the client computer.
Environment
0.0.18cc728d26.707.30751codex-cli 0.144.0-alpha.441.2.022.23.1Reproduction
Remote workspace picker
Loading after reconnect
Root cause
The current Codex Desktop webview no longer uses only the legacy message:
It now sends:
and expects the result through a renderer event with:
The browser shim handled the legacy message but did not handle the newer picker message/response contract.
There were two additional UI issues in the remote directory dialog:
For the loading problem, the WebSocket reconnect logic recreated the socket but did not recreate the renderer/message-port state after those ports had been closed.
Workaround / fix implemented
I implemented the following changes in a fork:
electron-add-new-workspace-root-optionandelectron-pick-workspace-root-option.workspace-root-option-pickedwith the selected server path for the current message contract.click,focusin,mousedown, andpointerdownpropagation so the parent dialog remains open.CODEX_CLI_PATHand listen on0.0.0.0for a systemd/server deployment.Verification
npm run build:browser: passednpm run build:server: passedgit diff --check: passed/home/glory/app/git/myappmyappReference implementation
codex/glory-web-customizations518caa1I am opening this issue first to document the compatibility problem and the tested workaround. I am not opening a pull request at this time.