Skip to content

Windows desktop app hangs on reopen or new thread and gets stuck at "Reconnecting... 5/5" with "timeout waiting for child process to exit" #17610

Closed as duplicate

Description

@deepni

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?

Image

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.

Activity

  1. added
    appIssues related to the Codex desktop app
    on Apr 13, 2026
  2. added
    bugSomething isn't working
    windows-osIssues related to Codex on Windows systems
    sandboxIssues related to permissions or sandboxing
    on Apr 13, 2026
  3. github-actions commented on Apr 13, 2026

    @github-actions
    Contributor
  4. SNComrade commented on Apr 13, 2026

    @SNComrade

    I have a separate Windows repro that narrows this issue further.

    On another machine, I could reproduce a consistent shutdown-path split:

    • close via the window X -> relaunch produces no visible main window
    • File > Exit -> relaunch works normally

    In the broken no-window state:

    • the Codex-family processes remain alive
    • I observed a stable lingering process set including:
      • packaged Codex.exe
      • codex.exe app-server
      • renderer / GPU / network-service processes
      • crashpad handler
    • relaunching while those orphaned processes are still alive does not restore the visible window

    I also validated a local process-only recovery:

    1. enumerate the lingering Codex.exe / codex.exe PIDs
    2. stop those PIDs explicitly
    3. relaunch the app

    That restored a healthy visible window immediately.

    One more detail that may help narrow scope:

    • a .lock file under .codex\\tmp\\arg0\\...\\.lock was still present even when the process-only recovery succeeded

    So on this machine, the .lock file does not currently look like the primary blocker. The stronger signal is that the bad state persists while the orphaned Codex process tree survives, and clearing that process set restores a visible launch.

    Also, I am treating this as separate from the Windows sandbox firewall bug. I filed that independently as #17686 because that machine also had a distinct SetRemotePorts failed: HRESULT(0x80070057) helper failure in the elevated sandbox path.

    If maintainers think a targeted external fix would help after aligning on the intended approach, I would welcome an invitation to contribute.

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

    appIssues related to the Codex desktop appbugSomething isn't workingsandboxIssues related to permissions or sandboxingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions