Skip to content

[Windows] Quick relaunch fails with “Connection for host ID local not found” #62722

Open

Description

@sd68515

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?

  1. Open the ChatGPT desktop app on Windows.
  2. Quit the app, then reopen it within a few seconds.
  3. 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.

Activity

  1. added
    app
    on Nov 20, 2026
  2. added
    bug
    windows-os
    app-server
    on Nov 20, 2026
  3. LookAsPelc commented on Nov 20, 2026

    @LookAsPelc

    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.

  4. bolsheunion commented on Nov 21, 2026

    @bolsheunion

    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

    1. Launch the ChatGPT Windows desktop app normally.
    2. Exit the app.
    3. Immediately inspect Task Manager: the ChatGPT process group can still contain several ChatGPT/Codex helper processes for a few seconds after the window has closed.
    4. Relaunch while those processes are still shutting down: an Electron main-process uncaught exception occurs:
      A JavaScript error occurred in the main process
      Uncaught Exception:
      Error: Connection for host ID local not found
        at ...getConnection(...)
        at ...createAppHost(...)
        at ...lpcMainImpl...
      
      The app closes.
    5. Instead, wait until the processes have disappeared before relaunching: the app starts normally. A codex-windows-sandbox-service.exe process may remain running; it does not appear to prevent a successful launch.
    6. 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 .codex conversation data. Thus large prior session histories are not required to reproduce this startup issue.
    • Disabling the Chrome integration made the bundled extension-host.exe disappear 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.

  5. jiangyuShiro commented on Nov 21, 2026

    @jiangyuShiro

    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?

  6. neverblued commented on Nov 21, 2026

    @neverblued

    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.

  7. Kirito-lab221 commented on Nov 22, 2026

    @Kirito-lab221

    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.

  8. mapmap5214 commented on Nov 23, 2026

    @mapmap5214

    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.

  9. augustus-schwan commented on Nov 23, 2026

    @augustus-schwan

    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.

  10. mierdgoo-lab commented on Nov 24, 2026

    @mierdgoo-lab

    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.

  11. mdarney-bit commented on Nov 24, 2026

    @mdarney-bit

    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.

    Screenshot 2026-11-24 123608
  12. DSplay123 commented on Nov 25, 2026

    @DSplay123

    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.

  13. mdarney-bit commented on Nov 25, 2026

    @mdarney-bit

    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.

  14. 2 remaining items

  15. lukasklauda-max commented on Nov 25, 2026

    @lukasklauda-max

    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.

  16. ZZH1266 commented on Nov 26, 2026

    @ZZH1266

    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.

  17. a78947520-max commented on Nov 26, 2026

    @a78947520-max

    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.

  18. Rozuu2 commented on Nov 26, 2026

    @Rozuu2

    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.

  19. hqkhan commented on Nov 26, 2026

    @hqkhan

    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.

    image
  20. yunxi-c commented on Nov 27, 2026

    @yunxi-c

    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.

  21. charsouzasilva commented on Nov 28, 2026

    @charsouzasilva

    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; kernel 7.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.

  22. bigzzzx commented on Nov 28, 2026

    @bigzzzx

    I reproduced this on Windows with Microsoft Store package OpenAI.Codex 26.1120.6357.0 (x64). Shortly after closing Codex, reopening it showed a main-process JavaScript error: Connection for host ID local not found (getConnection → createAppHost). I saw this more than once. When I waited a bit after closing the app before reopening it, it launched normally. I did not measure the exact delay or check when the background processes exited.

  23. zme479 commented on Nov 28, 2026

    @zme479

    I found independent Windows evidence that the old desktop instance can create a new primary window after its local app-server transport has stopped.

    Environment. Windows 11 Pro 25H2 x64, build 26200.6584. Microsoft Store package OpenAI.Codex 26.1120.6357.0, desktop 26.1120.50957 (build 30866), Owl 158.0.8127.89, Primary Runtime 26.1123.915.0, and local app-server 0.171.0-alpha.13.2.

    Confirmed from local logs. On 2026-11-28 UTC, the old app-server utility logged hostId=local disconnected at 21:32:03.619 after stopping its stdio transport. The same desktop main process created another primary window and logged ready-to-show at 21:32:05.205, 1.586 s later. A fresh main process reported local connected at 21:32:35.615. In an earlier session, the old main process logged the exact Connection for host ID local not found error from a background refresh 2.585 s after local disconnected. The reported dialog had the getConnection → createAppHost → IpcMainImpl stack, but its exact timestamp was unavailable.

    Bundle inspection and likely cause. In .vite/build/early-bootstrap-7-04ae72fad1d22c3a.js:1024, the second-instance dispatch guard flips on the final quit event. In early-bootstrap-916-47f4a741fd176386.js:1201, will-quit defers exit for asynchronous cleanup. In that same bundle, eFM.dispose() removes the host registration with removeConnection(t) at :990:103062. The separate createAppHost() method looks up the local host at :990:49498 (generated line and column). The connect-app-host IPC handler invokes createAppHost() synchronously before its later Promise error handler, so the registry lookup can throw directly. This strongly supports a teardown/reactivation race. The activation event that opened the old window was not traced.

    Fix and regression coverage. Gate activation at committed quit, preserve the activation for the successor instance, and return a recoverable IPC error if the local host is unavailable. Test tray quit and updater handoff with activation injected immediately after host disposal. Assert that exactly one usable window opens, the activation is delivered, and no uncaught exception is raised. Also verify that cancelling quit leaves activation working.

  24. lynnelittell-dot commented on Nov 29, 2026

    @lynnelittell-dot

    Additional affected-user report (November 29, 2026):

    • Platform: Windows; Microsoft Store Codex package 26.1120.6357.0.
    • The user reports an app update on November 26, followed by a desktop error.
    • Error dialog: A JavaScript error occurred in the main process / Error: Connection for host ID local not found. Stack frames include getConnection and createAppHost.
    • Restarting Windows and using Windows Settings > Apps > Repair did not resolve the issue.
    • Confirmed scope: ordinary Chat works; cloud Work works; existing Work conversations can continue; new local Work conversations cannot be started because the Send button is disabled. A newly created cloud Work conversation cannot be switched to local in the affected UI.

    User-discovered working workaround: Start a local Codex conversation, stop the running task, and then switch that conversation to GPT Work. The user reports that this restores access to local Work. This may help isolate an execution-host or new-thread initialization issue; the mechanism has not been verified.

    Expected: new local Work conversations should initialize normally without requiring a Codex conversation first. Please investigate and provide a supported non-destructive recovery procedure that preserves local sessions, skills, MCP configuration and credentials.

    Microsoft Store separately reports an initialization failure; whether this is related is unknown. This report intentionally omits personal identifiers, local paths, project details, account information, credentials and raw logs. Exact Windows build and root cause remain unverified.

  25. OIRANGEISHA commented on Nov 30, 2026

    @OIRANGEISHA
    codex-clipboard-d1cfdf0d-516c-44f3-8d34-90a4d903cfb3

    I hit this intermittent startup crash on November 30 with the Windows x64 Microsoft Store package OpenAI.Codex 26.1120.6357.0. The main-process dialog reports Error: Connection for host ID local not found, with getConnection → createAppHost → IpcMainImpl in the stack. The app closes after the dialog.

    The desktop logs show this sequence, with times relative to the old instance disconnecting:

    • +0.000 s — The old instance stopped its local app-server connection.
    • +2.415 s — The same desktop process marked its second local window ready to show.
    • +19.656 s — A fresh instance finished initializing its local app-server connection.

    This matches the shutdown/relaunch ordering reported here. I have not tested a controlled fast versus delayed relaunch on this PC. A relaunch should open a usable window even when the previous instance is still shutting down.

  26. bbblue6333-creator commented on Nov 30, 2026

    @bbblue6333-creator

    Additional reproduction on Windows 11 Pro 25H2 (build 26200.9974), with Microsoft Store package OpenAI.Codex 26.1120.6357.0 (x64). The app frequently shows an uncaught main-process exception when opening: Connection for host ID local not found. The dialog stack includes getConnection, createAppHost, and IpcMainImpl.

    Near one observed occurrence, the desktop logs recorded a stop_process state change for hostId=local. A window for the same host logged ready-to-show 1.664 seconds later. The logs show four instances of this sequence, with the window ready 1.44–2.55 seconds after the stop event. The specific activation trigger remains unconfirmed.

  27. CUPLCLASS commented on Nov 30, 2026

    @CUPLCLASS

    Same error here, and I found a reproducible trigger that may help.

    Version: OpenAI.Codex 26.1120.6357.0 (Microsoft Store / MSIX), Windows 11

    Symptom: Every cold start (including after reboot) showed
    Error: Connection for host ID local not found at getConnection → createAppHost → IpcMainImpl.
    Clicking OK and launching again always worked.

    What fixed the cold-start crash for me:

    • In one thread, the right panel had a tab that kept flashing (looked like it was failing to load and retrying).
    • .codex-global-state.json had a persisted thread-tab-routes-v1:* entry with a workspace-file route using "hostId": "local" for that file.
    • After closing that tab in the UI, fully quitting, and waiting for all Codex processes to exit, cold start no longer crashes.

    Still reproducible: quitting Codex and relaunching immediately (while background processes are still exiting) still triggers the same error.

    Suspected cause: restoring a persisted file tab bound to host local on startup calls getConnection("local") before the local connection is established (or while the previous instance's connection is shutting down).

    Not using WSL. Adding respect_system_proxy = true to config.toml did not help.

    屏幕截图 2026-11-30 200727
  28. dovvnloading commented on Dec 1, 2026

    @dovvnloading

    Additional affected-user report — Windows x64, package 26.1120.6357.0

    I encountered the same uncaught Electron main-process exception in the Windows desktop application. I am adding this report here to consolidate evidence rather than open a duplicate issue.

    Environment (confirmed from the error dialog)

    • Platform: Windows x64
    • Application package: OpenAI.Codex
    • Installed package version: 26.1120.6357.0
    • Package family: 2p2nqsd0c76g0
    • Exact Windows build and in-app About version: not captured

    Observed behavior

    The application displayed a native error dialog titled “A JavaScript error occurred in the main process,” containing the following exception and stack trace. The application bundle paths are truncated in the original dialog; the visible function names and offsets are preserved below.

    Uncaught Exception:
    Error: Connection for host ID local not found
        at t2.getConnection (...:20547)
        at eFM.createAppHost (...:49531)
        at IpcMainImpl.<anonymous> (...:8419)
        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 visible installation path begins with:

    C:\Program Files\WindowsApps\OpenAI.Codex_26.1120.6357.0_x64__2p2nqsd0c76g0\app\
    

    Expected behavior

    The desktop application should handle an unavailable local host connection gracefully. It should defer host-dependent initialization until the connection is ready, or present a recoverable error and retry path rather than allowing an exception to escape into the Electron main process.

    Triage and suggested regression coverage

    The stack signature is consistent with the reports in this thread and #64186, which also affects package 26.1120.6357.0. Please investigate whether createAppHost can be invoked while the local connection is not yet registered or has already been removed, including during startup, rapid relaunch, and shutdown. This is a hypothesis based on the stack and existing reports, not a confirmed diagnosis for my installation.

    Suggested regression coverage: delay local-host registration, simulate a local-host disconnect during window creation, and exercise rapid quit/relaunch. In each case, verify that the desktop app either establishes a valid connection or displays a recoverable state without an uncaught main-process exception.

    Evidence limitations: The error dialog confirms the exception, package version, and call stack. The exact triggering sequence, frequency, recovery behavior, and local app-server logs have not yet been captured. I am not claiming a verified reproduction sequence or that any specific workaround succeeds.

    Please include this occurrence in the Windows desktop/app-server triage and provide a supported recovery path that preserves local conversations, projects, and settings. Thank you.

  29. Lpaper-0110 commented on Dec 2, 2026

    @Lpaper-0110

    Additional affected-user report (December 2, 2026):

    I’m also affected by this issue. It has been occurring for approximately one week.

    Environment (confirmed from the error dialog and local installation metadata):

    • Platform: Windows x64
    • Windows version: 25H2, OS build 26200.9974 (from the local Windows registry)
    • Application version: 26.1120.50957 (from the installed owl-app.ini; the About dialog was not captured directly)
    • Application package: OpenAI.Codex
    • Installed MSIX package version: 26.1120.6357.0
    • Package publisher ID shown in the installation path: 2p2nqsd0c76g0

    Error:

    A JavaScript error occurred in the main process
    
    Uncaught Exception:
    Error: Connection for host ID local not found
        at t2.getConnection (...:20547)
        at eFM.createAppHost (...:49531)
        at IpcMainImpl.<anonymous> (...:8419)
        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 application paths above are abbreviated because they are truncated in the error dialog.

    Additional symptoms:

    • After multiple restart attempts, I can access the ChatGPT Work interface.
    • However, I either cannot submit prompts, or, when submission succeeds, the time to first token (TTFT) is extremely long.
    • Switching networks does not resolve these issues.

    I cannot confirm whether the prompt submission failures, excessive TTFT, and local-host connection error share the same root cause, but these symptoms are affecting normal use.

    Expected behavior:

    The application should open normally without an uncaught main-process exception, allow prompts to be submitted in ChatGPT Work, and begin responding without excessive delays.

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

    appapp-serverbugwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions