codex - 💡(How to fix) Fix [Desktop + CLI] New thread first turn waits on WebSocket retries before falling back to HTTPS [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#19994Fetched 2026-04-29 06:23:58
View on GitHub
Comments
2
Participants
2
Timeline
10
Reactions
0
Author
Timeline (top)
labeled ×4commented ×2renamed ×2closed ×1

Error Message

The CLI gives this error message, after the Reconnecting loop: ⚠ Falling back from WebSockets to HTTPS transport. timeout waiting for child process to exit 2026-04-28T12:14:23.072Z error [electron-message-handler] Received turn/started for unknown conversation conversationId=019dd403-0ad3-74e1-9bd3-fc5cbb1017ff 2026-04-28T12:12:26.309Z error [electron-message-handler] Received turn/started for unknown conversation conversationId=019dd401-42a0-7a10-ad79-e90fee18d497

Code Example

2026-04-28T12:14:22.413Z info [electron-message-handler] Conversation created conversationId=019dd403-0812-7451-9051-5ba7cc8aaeb2
2026-04-28T12:14:22.419Z info [AppServerConnection] response_routed ... method=turn/start conversationId=019dd403-0812-7451-9051-5ba7cc8aaeb2
2026-04-28T12:14:23.072Z error [electron-message-handler] Received turn/started for unknown conversation conversationId=019dd403-0ad3-74e1-9bd3-fc5cbb1017ff
2026-04-28T12:14:53.072Z warning [electron-fetch-handler] Failed to generate thread title errorMessage="Timed out waiting for structured result."

2026-04-28T12:12:25.626Z info [electron-message-handler] Conversation created conversationId=019dd400-ab23-7ff3-9ff0-15a302770219
2026-04-28T12:12:25.634Z info [AppServerConnection] response_routed ... method=turn/start conversationId=019dd400-ab23-7ff3-9ff0-15a302770219
2026-04-28T12:12:26.309Z error [electron-message-handler] Received turn/started for unknown conversation conversationId=019dd401-42a0-7a10-ad79-e90fee18d497
2026-04-28T12:12:56.310Z warning [electron-fetch-handler] Failed to generate thread title errorMessage="Timed out waiting for structured result."

---

transport="responses_websocket" websocket.warmup=false
close time.idle=15.0s
stream disconnected - retrying sampling request (1/5 ...)
...
stream disconnected - retrying sampling request (5/5 ...)
codex_core::client: falling back to HTTP
transport="responses_http"
RAW_BUFFERClick to expand / collapse

This is happening in both the CLI and the Desktop app

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

Desktop: Version 26.422.62136 (2180) CLI: v0.125.0

What subscription do you have?

ChatGPT Pro 20x

What platform is your computer?

macOS 25.3.0 arm64 arm

What issue are you seeing?

Starting today, new threads hit a WebSocket reconnect loop on the first turn before falling back to HTTPS. In Desktop, one visible symptom is that thread title generation times out and the title remains equal to the first message.

When the first message is sent, Codex creates the thread and initially uses the first user message as the thread title. Normally, the title service should later replace that with a shorter generated title. In my case, that replacement never happens: the thread title stays equal to the first message.

At the same time, the UI shows Reconnecting... 2/5 through 5/5.

The CLI gives this error message, after the Reconnecting loop: ⚠ Falling back from WebSockets to HTTPS transport. timeout waiting for child process to exit

This basically creates a ~100s delay for each new thread I start

Relevant logs for the Desktop App:

2026-04-28T12:14:22.413Z info [electron-message-handler] Conversation created conversationId=019dd403-0812-7451-9051-5ba7cc8aaeb2
2026-04-28T12:14:22.419Z info [AppServerConnection] response_routed ... method=turn/start conversationId=019dd403-0812-7451-9051-5ba7cc8aaeb2
2026-04-28T12:14:23.072Z error [electron-message-handler] Received turn/started for unknown conversation conversationId=019dd403-0ad3-74e1-9bd3-fc5cbb1017ff
2026-04-28T12:14:53.072Z warning [electron-fetch-handler] Failed to generate thread title errorMessage="Timed out waiting for structured result."

2026-04-28T12:12:25.626Z info [electron-message-handler] Conversation created conversationId=019dd400-ab23-7ff3-9ff0-15a302770219
2026-04-28T12:12:25.634Z info [AppServerConnection] response_routed ... method=turn/start conversationId=019dd400-ab23-7ff3-9ff0-15a302770219
2026-04-28T12:12:26.309Z error [electron-message-handler] Received turn/started for unknown conversation conversationId=019dd401-42a0-7a10-ad79-e90fee18d497
2026-04-28T12:12:56.310Z warning [electron-fetch-handler] Failed to generate thread title errorMessage="Timed out waiting for structured result."

Relevant logs for the CLI:

transport="responses_websocket" websocket.warmup=false
close time.idle=15.0s
stream disconnected - retrying sampling request (1/5 ...)
...
stream disconnected - retrying sampling request (5/5 ...)
codex_core::client: falling back to HTTP
transport="responses_http"

What steps can reproduce the bug?

  1. Open Codex Desktop on macOS.
  2. Start a new thread by sending a first message.
  3. Observe that the thread is created and the sidebar title is initially set to the first message.
  4. Wait for the automatic title-generation step.
  5. The UI shows Reconnecting... attempts.
  6. The sidebar title never gets replaced by a generated title and remains the first message.

This started happening today and reproduced across multiple new threads.

What is the expected behavior?

After a new thread is created, Codex should start the first user message immediately. Thread title generation should happen asynchronously in the background.

The first message/turn should not wait for title generation to complete. If title generation fails or times out, the conversation already continued normally and the thread can keep the initial first-message title until a generated title is available.

Additional information

This may be related to #18471, but my reproducible symptom is specifically around new-thread title generation. The thread is created successfully, but title generation times out and the initial first-message title is never replaced.

The repeated log line is:

Failed to generate thread title errorMessage="Timed out waiting for structured result."

extent analysis

TL;DR

The issue can be mitigated by investigating and resolving the WebSocket reconnect loop that occurs when starting new threads, which causes the thread title generation to timeout.

Guidance

  • Investigate the cause of the WebSocket reconnect loop, which may be related to the electron-message-handler and AppServerConnection components.
  • Verify that the conversationId is correctly handled and matched between the turn/start response and the subsequent turn/started event.
  • Check the server-side implementation of the title generation service to ensure it is not causing the timeout.
  • Consider increasing the timeout value for the title generation service or implementing a retry mechanism to handle temporary failures.

Example

No code snippet is provided as the issue seems to be related to the interaction between multiple components and services, and a specific code change cannot be suggested without further information.

Notes

The issue may be related to #18471, but the specific symptom of new-thread title generation timeout suggests a distinct problem. The provided logs indicate a timeout waiting for a structured result, which could be caused by a server-side issue or a client-side problem with handling the response.

Recommendation

Apply a workaround by investigating and resolving the WebSocket reconnect loop, as this seems to be the root cause of the issue. This may involve updating the client-side code to handle the reconnect loop more robustly or working with the server-side team to resolve any issues with the title generation service.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix [Desktop + CLI] New thread first turn waits on WebSocket retries before falling back to HTTPS [2 comments, 2 participants]