[Windows] Quick relaunch fails with “Connection for host ID local not found”
What version of the Codex App are you using (From “About Codex” dialog)?
26.1117.31558 (Microsoft Store package 26.1117.3838.0)
What subscription do you have?
ChatGPT Pro
What platform is your computer?
Microsoft Windows NT 10.0.26300.0 x64
What issue are you seeing?
I quit the ChatGPT desktop app and reopened it a few seconds later. The first relaunch failed with the following dialog:
A JavaScript error occurred in the main process Uncaught Exception: Error: Connection for host ID local not found
The stack trace points to getConnection and createAppHost. The next launch succeeded. I observed this once. I expected the app to reopen normally or wait for the previous instance to finish shutting down.
What steps can reproduce the bug?
- Open the ChatGPT desktop app on Windows.
- Quit the app, then reopen it within a few seconds.
- The first relaunch may show Connection for host ID local not found. In my case, launching the app again succeeded. I observed this once, so the steps may be timing-sensitive.
What is the expected behavior?
The app should reopen normally or wait for the previous instance to finish shutting down before opening a new window.
Additional information
The desktop logs show that the previous process stopped its local app-server connection and then loaded a new main window about 2.4 seconds later. This suggests a race between shutdown and relaunch.
Same crash here on the same build (Microsoft Store package 26.1117.3838.0, Windows 11 x64, Ubuntu 24.04 on WSL2).
In my case it was not a one-off: after the desktop app switched me to the new WSL remote connection, quitting and reopening the app in quick succession alternated between this crash (Error: Connection for host ID local not found at getConnection / createAppHost) and a successful launch on roughly every other attempt. After the crash, the window closes on its own after a moment.
The desktop logs show both hostId=local and hostId=remote-wsl:Ubuntu-24.04 being initialized on startup, so a WSL remote host may make the shutdown/relaunch race easier to hit.
I can reproduce this on Windows 11 x64 with the OpenAI.Codex MSIX package 26.1117.3838.0. I have a more specific, repeatable timing condition than the original report.
Reproduction / A-B observation
- Launch the ChatGPT Windows desktop app normally.
- Exit the app.
- Immediately inspect Task Manager: the
ChatGPTprocess group can still contain several ChatGPT/Codex helper processes for a few seconds after the window has closed. - Relaunch while those processes are still shutting down: an Electron main-process uncaught exception occurs:
The app closes.A JavaScript error occurred in the main process Uncaught Exception: Error: Connection for host ID local not found at ...getConnection(...) at ...createAppHost(...) at ...lpcMainImpl... - Instead, wait until the processes have disappeared before relaunching: the app starts normally. A
codex-windows-sandbox-service.exeprocess may remain running; it does not appear to prevent a successful launch. - After a failed relaunch, the remaining helper processes disappear quickly, so the next launch succeeds. This explains the apparent alternating successful/failed launches.
Additional isolation
- This still happened after uninstalling, clearing local app/Codex state, and reinstalling, before restoring the old
.codexconversation data. Thus large prior session histories are not required to reproduce this startup issue. - Disabling the Chrome integration made the bundled
extension-host.exedisappear after exit; the sandbox service could remain. This distinguishes an optional extension host from the persistent sandbox service, but does not establish either as the cause. - I also encountered a separate Work new-chat Send-button-disabled problem and Work-triggered crashes. I do not claim those share this startup crash's root cause.
Expected behavior
The app should safely handle a quick relaunch during shutdown (e.g., wait for previous shutdown / reconnect to the correct local host), instead of throwing an uncaught exception in the main process.
This strongly suggests a shutdown/relaunch lifecycle race, though the exact internal fault is not established. The key difference between the failing and successful tests is whether the previous ChatGPT/Codex helper processes have finished exiting.
I hit this too on the newer Windows build, 26.1117.41037 (Microsoft Store package 26.1117.4957.0, Windows 11 x64 build 26300.10075). I got the same Connection for host ID local not found popup when reopening ChatGPT. The stack showed getConnection and createAppHost.
The logs show the old process disconnected from the local app server at 13:31:53.499, then loaded another main window at 13:31:55.872, about 2.4 seconds later. Its app-server helper was still shutting down at that point. The next ChatGPT process connected successfully at 13:32:07.532.
I’ve only seen it once so far. It looks like the old instance was still shutting down when I reopened the app. Can ChatGPT wait for it to finish before opening another window?
Consolidating the Linux reproduction from #63044 here, following the duplicate suggestion.
The trigger and process ordering match this issue: a relaunch is forwarded to a previous instance after its local app-server has begun shutting down. The old instance then exits, and the next launch succeeds.
Linux observations differ from the Windows reports: the forwarding launcher prints Opening in existing browser session. and exits with status 0, but no usable window remains. The Windows Connection for host ID local not found dialog was not observed in this Linux reproduction. A shared internal root cause has not yet been established.
Environment: native Ubuntu 24.04.5 LTS x86_64, KDE Plasma/X11, ChatGPT desktop .deb package 26.1106.51428, packaged Chromium 157.0.8103.51.
Selected events on 2026-11-21, UTC; process roles replace private identifiers:
20:56:59.489 [old] Local Work executor ... event=lifecycle_stop ... reason=disposed
20:56:59.491 [old] Stopping app-server transport connectionId=1 transport=stdio
20:57:01.606 [first] Opening in existing browser session.
20:57:04.541 Old main-process scope finishes
20:57:06.301 Second launch starts
20:57:08.849 [second] Launching app ... platform=linux packaged=true
A separate real-session pair on November 20 showed the same ordering. It was also reproduced with a fresh temporary application profile and separate CODEX_HOME/XDG_CONFIG_HOME, while signed out: invoking the stock launcher approximately 150 ms after the instance's own tray Quit action returned 0 after forwarding, and no replacement process remained after shutdown. Thus WSL, restored chats and our login-autostart helper are not required for the Linux failure.
A local launcher that waits for the exact old profile owner's process exit before relaunching passed three consecutive quit/reopen cycles; cold start, tray reopening and activation of an already open window also passed. It does not kill processes or delete Chromium locks.
The full Linux report and reproduction details remain in #63044; I am closing that issue as a duplicate to keep the investigation together. Please retain the Linux behavior as an additional regression case.
Additional affected-user report for Windows desktop package 26.1117.4957.0, investigated on 22 November 2026.
The affected user reports that, after the desktop update, reopening ChatGPT produces an uncaught main-process JavaScript error with Connection for host ID local not found, while a subsequent launch can open normally. Earlier troubleshooting recorded the getConnection / createAppHost stack signature. The current installed desktop resource path identifies package 26.1117.4957.0; the Windows version directly queried today was 10.0.26200.0 x64.
I reviewed the existing comments describing a shutdown/relaunch timing race and the workaround of waiting for the old app processes to exit. I could not complete a controlled close/wait/relaunch comparison on this machine because the attached local environment became unavailable during diagnosis. Thus this comment corroborates the user-visible symptom on the newer package; it does not confirm that the timing workaround fixes this installation or establish a shared root cause.
The same user also encounters restricted Work shell networking and Edge debugger/task-routing failures. Those are reported separately in #53278 and #59872; they should not be assumed to have the same cause as this startup error.
Please retain 26.1117.4957.0 as an affected-build data point and provide a supported startup/reconnect recovery that preserves chats and projects. No credentials, private paths, project contents, raw logs or screenshots are included.
I also saw this when restarting the ChatGPT desktop app on Windows.
The dialog showed A JavaScript error occurred in the main process and Error: Connection for host ID local not found. The visible stack included getConnection, createAppHost, and IpcMainImpl.
I expected the desktop app to reopen normally after restarting.
On Windows (Codex MSIX 26.1117.4957.0), I found five cases where the same app instance finished loading a new primary window after its local host had disconnected. One sequence from November 23 looked like this (UTC).
18:13:43.972 Local host disconnected
18:13:45.175 Same instance marked primary window #2 ready to show
18:13:48.984 App-server helper exited with code 0
This ordering fits the reported stack. In this build, createAppHost calls getConnection, which throws if the host is no longer registered.
In five shutdown tests, ChatGPT.exe processes took about 2–3 seconds to exit after the UI closed. In five separate relaunch tests, a PowerShell launcher polled every 250 ms and waited up to 30 seconds for those processes to exit. All five relaunches succeeded.
Suggested fix to test
Queue any relaunch request received during shutdown and let the next instance handle it once its local host is ready. A regression test could request a relaunch immediately after the local host disconnects and verify that exactly one usable window opens.
Additional affected-user report (November 24, 2026).
The Windows desktop app installed on this machine is Microsoft Store/MSIX package 26.1117.4957.0 (package path includes OpenAI.Codex_26.1117.4957.0_x64).
After restarting the app, the following dialog appeared:
A JavaScript error occurred in the main process
Uncaught Exception: Error: Connection for host ID local not found
The visible stack includes t2.getConnection, eV.createAppHost, and IpcMainImpl. Restarting again allows the app to open, but a separate Work issue remains: a newly created Work conversation has a grey/disabled Send button even after text is entered (reported in #62393).
Please investigate this on package 26.1117.4957.0. I cannot confirm whether the startup exception and Work composer issue share a root cause.
Severity escalation requested — Complete loss of Windows desktop application functionality
I am experiencing a significantly more severe manifestation of this issue. Unlike the original report, which describes an intermittent relaunch failure, I am completely unable to launch the ChatGPT Windows desktop application.
Environment
- Platform: Windows x64
- Microsoft Store package: OpenAI.Codex
- Installed version: 26.1120.5083.0
- Subscription: ChatGPT Business/Team
Error
- A JavaScript error occurred in the main process
- Uncaught Exception: Connection for host ID local not found
- Stack trace includes getConnection, createAppHost, and IpcMainImpl.
Troubleshooting already attempted
- Repeated attempts to launch the application.
- Forced termination of application processes.
- Checking for Microsoft Store updates.
- Repairing the application through Windows Settings.
None of these steps resolved the issue.
Business impact
As a paying subscriber who relies on the desktop application for professional work, I have completely lost access to its functionality. The browser version is not an adequate substitute for workflows that require local computer integration.
This should not be treated solely as an intermittent shutdown/relaunch problem. In my case, it is a persistent, application-blocking startup failure with no known working recovery procedure.
I would respectfully request that OpenAI:
- Escalate this issue as a high-priority, application-blocking defect.
- Investigate persistent startup failures in addition to intermittent relaunch failures.
- Provide a supported, non-destructive recovery procedure.
- Consider making a rollback to a stable release available while a permanent fix is developed.
I would appreciate acknowledgment from the development team and an indication of whether a fix is being prepared.
Additional Windows reproduction and proposed fix for #62722.
Observed on November 25, 2026, with Microsoft Store package OpenAI.Codex 26.1120.6357.0 (x64). After quitting the app and quickly reopening it, the first reopen raised Connection for host ID local not found in getConnection → createAppHost. A second launch succeeded. Waiting for the app processes to exit before opening it worked in a follow-up attempt.
In the failed attempt, the old instance logged the local app-server disconnect at 06:06:38.137 UTC, then logged a new primary window ready to show at 06:06:40.263 UTC. A fresh instance connected at 06:06:52.918 UTC. In the follow-up attempt, about five seconds elapsed between the start of local transport shutdown and the app-server utility process exit.
Suspected race. A read-only check of the installed bundle shows that the bootstrap guard on second-instance dispatch is set by Electron's quit event, while the app defers exit in will-quit to drain services. createAppHost requires the local registration synchronously, and app-host disposal removes that registration. This leaves a window in which an activation can reach an old instance during teardown. The logs establish the ordering in this incident. The exact activation delivery path is inferred from the bundle and has yet to be traced at runtime.
Proposed fix. When quit is committed, before disposing local services, enter a shared shutting down lifecycle state. At that point, stop dispatching incoming activations to the old instance's window creation path. Hand off an activation received during teardown to a launcher or successor process that waits for the old owner to exit before acquiring the single-instance lock. Deliver the original activation arguments once the new instance and local host are ready. A cancelled quit should continue to use the existing instance. As a fallback, reject a late app-host IPC connection cleanly if teardown has already removed the local registration.
Regression coverage. On Windows, hold teardown open after the local host registration is removed. While the old process still owns the single-instance lock, launch the packaged app again. Release teardown and assert that the old instance opens no new window, that the new instance opens exactly one usable window, and that the original launch intent is handled once. Repeat with a deep link, a rapid double activation, and a cancelled quit. Check that ordinary activation while the app is already running still focuses the existing window.
Update — November 25, 2026, 8:38 AM EST
I successfully updated the Windows desktop application through the Microsoft Store from version 26.1120.5083.0 to 26.1120.6357.0.
The startup failure persists, and the application remains unusable.
Please include 26.1120.6357.0 in the affected versions and provide either an emergency hotfix or a supported rollback procedure that preserves existing local data, projects, conversations, and settings.
This continues to be a complete loss of desktop application functionality for a paying Business subscriber.
Update — November 25, 2026, 2:01 PM EST
I was able to recover functionality by clicking the "Go Home" button on the error screen.
I have confirmed that I am still running version 26.1120.6357.0. No additional updates, repairs, resets, or configuration changes were performed to achieve this recovery.
The application is currently functioning normally. I intend to leave it open rather than risk another startup failure.
This may provide a useful diagnostic clue for the engineering team and a potential non-destructive workaround for other affected users. However, I cannot confirm that the underlying startup defect has been resolved.
Additional occurrence reported on November 25, 2026, in the Windows x64 Microsoft Store Codex package 26.1120.6357.0.
When launching Codex, the user received an Electron main-process error dialog:
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Connection for host ID local not found
at t2.getConnection
at eFM.createAppHost
at IpcMainImpl.<anonymous>
at IpcMainImpl.emit (node:events:514:20)
at Session.<anonymous> (node:electron/js2c/browser_init:2:80322)
at Session.emit (node:events:514:20)
The package path in the stack trace confirms OpenAI.Codex_26.1120.6357.0_x64__2p2nqsd0c76g0. This is an additional report of the same error signature on a newer package version. The exact launch/shutdown timing, reproducibility, and local app-server logs have not been verified, so a race condition remains a hypothesis rather than a confirmed root cause.
Expected behavior: Codex launches normally, or handles a missing/not-yet-ready local host connection gracefully without an uncaught main-process exception.
Reported on behalf of the affected user.
Confirmed on November 25, 2026.
Environment:
- Windows 11 x64
- OpenAI Codex MSIX package: 26.1120.6357.0
- ChatGPT Plus
The issue is reproducible after completely exiting the desktop app, including quitting from the system tray.
Immediate relaunch triggers an Electron main-process exception:
Error: Connection for host ID local not found
Stack trace includes getConnection, createAppHost, and IpcMainImpl.
The application closes after the error. A second launch succeeds.
Waiting after completely exiting the application before relaunching prevents the crash.
This behavior is consistent with a possible shutdown/relaunch lifecycle race condition, although the root cause has not been confirmed.
Please investigate and consider adding a regression test for immediate relaunch after quitting from the system tray.
Additional observation on November 26, 2026: the same Connection for host ID local not found dialog appeared on the first Windows x64 desktop launch following an updater handoff from Microsoft Store package 26.1120.5083.0 to 26.1120.6357.0. The dialog stack includes getConnection, createAppHost, and IpcMainImpl.
The desktop log records the main window loading at 03:36:15 UTC and the local app-server connection becoming connected at 03:36:21 UTC. After the dialog was dismissed, the same session was usable. The timestamp of the exception itself was not captured, and this update sequence has not been independently reproduced.
Please investigate the updater-triggered first launch as well as manual quick relaunch. A regression test could start the window before the local host connection is registered and verify that the app becomes usable without an uncaught Electron main-process exception or a second launch.
Additional user reproduction — November 26, 2026 (Windows x64, Microsoft Store package OpenAI.Codex 26.1120.6357.0).
The first launch succeeds. After exiting the desktop app, opening it again for the second consecutive launch produces this main-process error:
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Connection for host ID local not found
at getConnection
at createAppHost
at IpcMainImpl.<anonymous>
The user reports that they no longer use a local bridge, but the error still occurs. The exact shutdown timing and whether helper processes were still exiting were not captured, so the underlying cause is not confirmed.
Expected behavior: the second launch should open normally, or the app should handle local-host startup/shutdown without an uncaught exception.
Disabling the Chrome extension did not prevent the error. It also persists after reinstalling the app and regenerating a clean .codex directory. Waiting after closing has not provided a reliable workaround on my installation.
Same here. I am basically unable to use the app now. I've tried:
- Restarting PC
- Stopping all processes related to Chatgpt from the task manager
- Waiting for some time before reopening the app
- Logging out and logging back in
None have worked.
I hit the same error again on November 27 on Windows x64 (build 26300), using Codex desktop 26.1120.50957 (Microsoft Store package OpenAI.Codex 26.1120.6357.0). After quitting and reopening, the first relaunch showed Connection for host ID local not found in the Electron main process, with getConnection and createAppHost in the stack. A subsequent launch worked.
The desktop logs show the same ordering in two shutdown sequences. Times are relative to when the old instance disconnected from the local app server.
- The same desktop process marked a second primary window ready at +2.8 s and +3.3 s, respectively.
- The old app-server utility exited with code 0 at +8.2 s and +8.1 s.
- In the second sequence, a fresh instance connected to the local app server at +13.2 s.
Could the Windows launcher preserve the reopen request until the new instance can open a usable window with the local host available? The first click on the original app icon should work even if the previous instance is still shutting down.
Additional affected-user report from native Linux / Omarchy, observed on November 28, 2026. This occurrence includes the actual Electron error dialog, unlike the earlier Linux forwarding-only report in this thread.
Environment
- Desktop application:
26.1120.50957. - Distribution package:
openai-codex-desktop 26.1120.50957-1, packaged by Omarchy. - Omarchy
4.5.0-3(Arch-based), x86_64; kernel7.2.15-4-omarchy. - Hyprland
0.56.2-4, Wayland; application launched with--ozone-platform=wayland. - Package integrity check: 3,295 files checked, 0 altered files.
Observed behavior
The affected user reports that opening the desktop app shows this dialog, and only the second attempt opens successfully. The supplied screenshot shows:
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Connection for host ID local not found
at tR.getConnection (.../early-bootstrap-7-0431d7c46f63f760.js:379:17002)
at eMx.createAppHost (.../early-bootstrap-916-5cf181a62de3d3c8.js:961:49384)
at IpcMainImpl.<anonymous> (.../early-bootstrap-916-5cf181a62de3d3c8.js:1172:8419)
Selected local log evidence
Events below come from the desktop and app-server logs for the same incident. Times are relative to the old instance disconnecting its local host. Process identifiers and unrelated connection details are omitted.
-0.084 s [old main] Browser session window #1 removed
-0.004 s [old main] Local Work executor lifecycle_stop, reason=disposed
+0.000 s [old utility] local host: cause=stop_process, connected -> disconnected
+3.147 s [old main] New primary window #2 finished loading, hostId=local
+22.041 s [old main] App-server utility exited, code=0
+26.140 s [new main] Launching app, packaged=true, platform=linux
+27.295 s [new utility] local host: post_initialize_connection_state -> connected
The logs establish that the old desktop process opened another primary window after its local connection had stopped. Together with the screenshot, this is consistent with the shutdown/relaunch lifecycle race described here. The exact exception time and activation delivery path were not captured, so this does not establish the precise root cause.
A controlled quit/wait/relaunch comparison has not been performed on this machine. The user's reported recurrence has not been independently quantified, and cold-start-only behavior has not been isolated.
Expected behavior: a launch or reopen request should produce one usable window, including when the previous instance is still shutting down, without an uncaught main-process exception or a second launch attempt.
Please retain native Linux/Wayland and desktop build 26.1120.50957 as additional affected-platform/build evidence. Report submitted on behalf of the affected user; no raw logs, private hostnames, account identifiers, or home-directory paths are included.