Windows Desktop remote SSH sessions freeze during app-server reconnect/list/resume
Windows Desktop remote SSH sessions freeze during app-server reconnect/list/resume
Summary
Codex Windows Desktop becomes unresponsive for tens of seconds when using a remote Linux workstation over SSH. The strongest evidence points to the remote app-server reconnect/recovery path: after the SSH-proxied app-server transport drops or reconnects, Desktop performs expensive thread/list and thread/resume work across multiple long conversations. During these freezes, system CPU/RAM/disk/GPU are not saturated.
This looks related to remote SSH/app-server code=1006 reports, but the failure mode is slightly different: the remote app-server/proxy can successfully start and report version 0.132.0, yet Desktop still freezes during recovery and long-thread resume/list work.
Environment
- App: Codex Windows Desktop
- Desktop package versions observed:
OpenAI.Codex_26.519.2081.0, laterOpenAI.Codex_26.519.2736.0 - Remote: Linux workstation over Windows OpenSSH
- Remote app-server version reported by Desktop logs:
0.132.0 - Usage pattern: multiple Codex Desktop windows/chats connected to the same remote host, including long conversation histories
- Local Windows chats do not show the same freezes
Observed Pattern
Representative sequence from Desktop logs:
app_server_connection.closed code=1006
ssh_websocket_v0.proxy_command_failed ... signal=SIGTERM
app_server_connection.reconnect_started
ssh_websocket_v0.ensure_remote_app_server
codex_version_probe
app_server_bootstrap
proxy_command_starting
Current reported app-server version: 0.132.0
websocket_reconnect_marked_threads_needing_resume
thread/resume
maybe_resume_success
Common repeated warnings/errors in the same windows:
Failed to resolve git root: Failed to locate git executable in PATH
unsupported feature enablement `auth_elicitation`
goals feature is disabled
Codex app-server is not available
Remote app-server log also showed:
Error: app-server control socket is already in use at ~/.codex/app-server-control/app-server-control.sock
Capture Evidence
I have local capture bundles available if useful. Highlights:
Capture A
- Caught two remote websocket drops:
app_server_connection.closed code=1006app_server_connection.closed code=1006- Recovery included long resumes:
- 128-turn chat:
thread/resumeabout 19.5s, later about 50.4s - 200-turn chat:
thread/resumeabout 19s - Resource state during freeze:
- Codex private memory peak: about 7.1 GB
- Codex working set peak: about 5.5 GB
- System CPU peak: about 21.9%
- Free RAM minimum: about 33.8 GB
- Disk peak: about 2.7%
- Codex GPU peak: about 13.6%
- DWM GPU peak: about 8.0%
- Capture-window counts:
thread/resume: 5maybe_resume_success: 5websocket_reconnect_marked_threads_needing_resume: 12websocket_reconnect_recovery_start/done: 6 / 6
Capture B
- Caught one drop:
app_server_connection.closed code=1006- SSH app-server proxy failed with
SIGTERM - reconnect started
- app-server version reported as
0.132.0 - reconnect marked 2 streaming threads needing resume
- Pre-drop sluggishness:
thread/listabout 8.9sthread/listabout 9.3s- Recovery included:
- 130-turn chat: resume about 2.4s, then another about 16.0s
- 201-turn chat: resume about 19.0s
- Resource state:
- System CPU peak: about 17.9%
- Free RAM minimum: about 32.9 GB
- Disk peak: under 1%
- Codex GPU peak: about 7.5%
- DWM GPU peak: about 5.4%
Capture C
This was after the Desktop package updated to OpenAI.Codex_26.519.2736.0. It did not catch another explicit code=1006, but it caught the same expensive remote recovery/list/resume shape:
app_server_bootstrap succeeded
proxy_command_starting
app-server version 0.132.0
websocket_reconnect_recovery_start
websocket_reconnect_marked_threads_needing_resume conversationCount=19 markedCount=0
thread/resume durationMs=23545 for a 204-turn conversation
thread/list durationMs=17142
thread/list durationMs=14932
thread/list durationMs=25191
thread/list durationMs=11819
maybe_resume_success markedStreaming=true turnCount=204
Later in the same capture:
thread/resume durationMs=468, turnCount=1
thread/resume durationMs=2706, turnCount=132
thread/list durationMs=8312
thread/list durationMs=10246
Resource state in this capture:
Codex private memory peak: about 845.8 MB
Codex working set peak: about 964.9 MB
System CPU peak: about 21.0%
Free RAM minimum: about 35.5 GB
Disk peak: about 0.58%
GPU sample peak: about 1.83%
Expected Behavior
Codex Desktop should remain responsive while reconnecting to a remote SSH app-server. Reconnect should not trigger duplicated or UI-blocking thread/resume / thread/list work across multiple long conversations.
Actual Behavior
When the SSH-proxied app-server websocket closes or the remote connection recovers, Desktop can become unresponsive while it performs long thread/list and thread/resume calls. These calls can take 19-50s for long chats, and multiple list/resume calls appear clustered during recovery.
Suspected Area
- Remote SSH websocket reconnect/recovery path in Codex Desktop
- Deduplication/scheduling of
websocket_reconnect_marked_threads_needing_resume - UI responsiveness during long
thread/resumeandthread/list - Diagnostics around proxy
SIGTERMand app-server control socket reuse
4 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Thanks for the duplicate suggestions. I reviewed these and agree this is closely related to #23235 and #22411, especially around slow
thread/list/thread/resume.I am going to leave this open for now because the distinguishing part here is the remote SSH app-server reconnect/recovery path: captures show
app_server_connection.closed code=1006, SSH app-server proxy termination withSIGTERM, reconnect/recovery, and then clustered longthread/list/thread/resumecalls across multiple long remote conversations. The Desktop UI becomes unresponsive even though CPU/RAM/disk/GPU are not saturated.If maintainers prefer one tracking issue, I am happy for this to be closed as a duplicate of the most appropriate one, but I wanted to preserve the remote SSH reconnect evidence since it may point to a separate scheduling/recovery issue on top of the general slow list/resume behavior.
Update: freezing improved after the thread-list/index workaround, but one freeze remains
After applying the #24510-style workaround on the remote host, freezing is noticeably better. In the latest freeze capture, the old
thread/listpath does not look like the direct trigger anymore.New capture:
C:\Users\mseebold\codex-freeze-capture-20260526-114733C:\Users\mseebold\codex-freeze-capture-20260526-114733.zipOpenAI.Codex_26.519.5221.0Windows logged a real app hang:
2026-05-26 11:47:48 AM MDTWindows Error ReportingEvent Name: AppHangTransientP1: Codex.exeThe Desktop log has a matching 24.259 second gap:
Immediately after the app became responsive again,
thread/listwas relatively fast:So I think the index workaround helped the
thread/listissue, but this remaining freeze may be a separate Desktop/browser-use/sidebar lifecycle path. The hang starts immediately after:for a large/old browser-use conversation:
Other notes from the same capture:
state_5.sqliteis small: ~848 KB, 13 threads.logs_2.sqliteis large: ~490 MB.2026-05-23.app_server_connection.closed code=1006or websocket reconnect occurred at the actual hang time.giton PATH, despite Git being installed.Current hypothesis: #24510-style indexing mitigates the slow
thread/listfreeze, but there is still a residual freeze path around browser-use route cleanup / sidebar lifecycle for large conversations.Interesting report 👀
What stands out is that the machine itself doesn't appear resource-saturated during the freeze.
That makes this feel less like a raw performance problem and more like a recovery/scheduling orchestration issue during reconnect.
Especially these patterns:
Feels possible the recovery path is doing too much synchronous or duplicated work after transport restoration.
The “resume storm” effect after reconnect is probably worth investigating separately from the websocket disconnect itself.
Also interesting that local chats don't reproduce it — that strongly points toward the SSH/app-server recovery layer rather than rendering/UI alone.
Very detailed diagnostics here 👍