codex - 💡(How to fix) Fix Windows desktop app hangs on reopen or new thread and gets stuck at "Reconnecting... 5/5" with "timeout waiting for child process to exit" [2 comments, 3 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#17610Fetched 2026-04-14 05:42:33
View on GitHub
Comments
2
Participants
3
Timeline
7
Reactions
0
Author
Timeline (top)
labeled ×4commented ×2cross-referenced ×1

Error Message

  • Windows Error Reporting (1001) More generally, child processes should shut down cleanly, reconnect should either succeed or fail with a more actionable error, and the main desktop app should not hang during app startup or new-thread initialization.

Root Cause

Because of that, this looks like more than just a configuration problem. It appears that the Windows desktop app can hang during reopen or new-thread startup, and the visible UI symptom is the reconnect loop ending in timeout waiting for child process to exit.

RAW_BUFFERClick to expand / collapse

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

26.409.20454

What subscription do you have?

plus plan

What platform is your computer?

Microsoft Windows NT 10.0.19045.0 x64

What issue are you seeing?

<img width="806" height="278" alt="Image" src="https://github.com/user-attachments/assets/524819f8-eac9-42b2-90b1-314fd734ac6b" />

When I reopen the Codex desktop app after killing the process, or when I start a new thread, the app frequently gets stuck reconnecting and eventually shows:

  • Reconnecting... 5/5
  • timeout waiting for child process to exit

I also saw the same issue earlier with:

  • Reconnecting... 2/5
  • timeout waiting for child process to exit

So the retry count seems to vary, but the failure mode looks the same.

During investigation, I found earlier sandbox-related errors in local logs:

  • helper_firewall_rule_create_or_add_failed
  • SetRemoteAddresses failed

However, later logs showed sandbox setup succeeding, for example:

  • setup refresh: processed ... errors=[]
  • runner launch: exe=...codex-command-runner.exe
  • read ACL run completed

Even after sandbox setup succeeded, Windows Event Viewer still showed app hang events for Codex.exe, including:

  • Application Hang (1002)
  • Windows Error Reporting (1001)
  • MoAppHang
  • hang type: Top level window is idle

Because of that, this looks like more than just a configuration problem. It appears that the Windows desktop app can hang during reopen or new-thread startup, and the visible UI symptom is the reconnect loop ending in timeout waiting for child process to exit.

What steps can reproduce the bug?

Reproduction steps

  1. Launch the Codex desktop app on Windows.
  2. Use the app normally.
  3. Kill the Codex process, then reopen the app.
  4. Alternatively, while the app is open, start a new thread.
  5. Observe that the app sometimes gets stuck in reconnecting and eventually shows:
    • Reconnecting... 5/5
    • timeout waiting for child process to exit

I also observed the same failure mode earlier with:

  • Reconnecting... 2/5
  • timeout waiting for child process to exit

So the retry count may vary, but the bug appears to be the same.

Actual behavior

Instead of recovering cleanly, the desktop app gets stuck reconnecting and eventually fails with timeout waiting for child process to exit.

Expected behavior

Reopening the app or starting a new thread should succeed without the app hanging or getting stuck in reconnect.

Reproducibility

This has happened repeatedly when:

  • reopening the app after killing the process
  • starting a new thread

Code snippet

This does not appear to be triggered by a specific code snippet or prompt. It looks like a desktop app lifecycle / child-process cleanup / reconnect issue rather than a model-output issue.

Session / token / context details

I do not currently have a single minimal session id or token/context usage pattern that consistently triggers it. The issue appears tied to app reopen / new-thread lifecycle on Windows, not to a specific prompt size, token limit, or context window boundary.

What is the expected behavior?

The Windows desktop app should reopen cleanly after the process is killed, and starting a new thread should work normally.

It should not get stuck at:

  • Reconnecting... 5/5
  • timeout waiting for child process to exit

More generally, child processes should shut down cleanly, reconnect should either succeed or fail with a more actionable error, and the main desktop app should not hang during app startup or new-thread initialization.

Additional information

I reproduced the same issue on three different Windows machines. That makes me think this is unlikely to be a one-off local environment problem and may be a broader Windows desktop app issue.

extent analysis

TL;DR

The Codex desktop app on Windows may be experiencing issues with child process cleanup and reconnect logic, leading to hangs and timeouts.

Guidance

  • Investigate the helper_firewall_rule_create_or_add_failed and SetRemoteAddresses failed errors in local logs to determine if they are related to the reconnect issue.
  • Verify that the sandbox setup is succeeding consistently, and check for any patterns in the Windows Event Viewer logs for Codex.exe hang events.
  • Consider adding logging or debugging statements to the reconnect logic to better understand the failure mode and identify potential fixes.
  • Test the app on different Windows machines to confirm if the issue is reproducible and not specific to a single environment.

Example

No specific code snippet is provided, but adding logging statements to the reconnect logic could look like:

try:
    # reconnect logic here
except Exception as e:
    print(f"Reconnect failed: {e}")

Notes

The issue appears to be related to the desktop app lifecycle and child process cleanup, rather than a specific code snippet or prompt. The fact that it is reproducible on multiple Windows machines suggests it may be a broader issue.

Recommendation

Apply a workaround to improve child process cleanup and reconnect logic, as the root cause is not immediately clear and may require further investigation.

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…

FAQ

Expected behavior

Reopening the app or starting a new thread should succeed without the app hanging or getting stuck in reconnect.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING