LCU installs again on the newest Windows ChatGPT app

56 minutes ago

If you install LCU on Windows, the late October release of the ChatGPT app from the Store stopped the installer partway through. This change gets it past that point. LCU now finds the app's own computer-use host inside the app's new webpack build, extracts it, and loads it once to check it works before the install goes on. Mac and Linux installs don't change.

Ask about this presentation

Chapters

  1. 0:00LCU installs again on Windows
  2. 0:23The installer stopped
  3. 0:46Where the host lives now
  4. 1:08Find by content, copy only what is needed
  5. 1:34One derived file
  6. 1:56Load check
  7. 2:18Evidence
  8. 2:43Limits and what to do
Show transcript
  1. If you install LCU on Windows, the late October release of the ChatGPT app from the Store stopped the installer partway through. This change gets it past that point. LCU now finds the app's own computer-use host inside the app's new webpack build, extracts it, and loads it once to check it works before the install goes on. Mac and Linux installs don't change.

    Slide text

    OpenAI.Codex 26.1027 · Windows x64

    LCU installs again on the newest Windows ChatGPT app

    The app moved to a webpack build. The installer now finds the computer-use host inside it.

    verify app find host extract load check install
  2. This is the output from a real Windows 11 machine. The app's identity, publisher, signature and architecture all passed. Then the host check failed, because LCU only looked in files named main.js, and the new app ships none. The installer stopped cleanly, with nothing installed. The file name was only the first problem, though. The host itself had moved.

    Slide text

    The October app stopped the installer before it installed anything

    LCU: Verifying the registered official Windows application... LCU: Checking the original Windows native host layout... LCU Windows installer: Required Windows host layout is unavailable: no main bundle has a top-level native-pipe host factory (observed ChatGPT app 26.1027.3384.0 ...; nothing was installed)

    Windows 11 Pro x64 · reported in issue 82

    verify app find host extract load check install
  3. In the new build, the app's whole main process is one webpack module of about four and a half megabytes. The host factory LCU needs is a function inside that module. Right beside it is the code that imports Electron and starts the desktop app. LCU runs the host on the app's plain Node, which has no Electron, so it can't just load the module whole.

    Slide text

    The host now sits inside the module that starts the app

    Bundle file
    .vite/build/
    early-bootstrap-491-….js
    One webpack module, about 4.5 MB
    Host factory
    what LCU needs
    Electron + app startup
    runMainAppStartup
    verify app find host extract load check install
  4. LCU no longer cares what the file is called. It scans every build file that names all four of the host's options, and it needs exactly one match. Inside the webpack module, it treats the module's body like a whole program and copies out only the factory and what that factory uses, unchanged. Everything else the host needs is copied from the app as it is. If any of it would reach Electron, the install stops.

    Slide text

    LCU finds the host by what it contains, then copies only what it needs

    Find by content
    Any build file naming all four host options. Exactly one match, or the install stops.
    Carve the module
    The factory and the declarations it uses, copied verbatim into one generated file.
    Copy the rest unchanged
    The original chunks, plus small self-contained packages such as tslib, whole.
    verify app find host extract load check install
  5. The original chunks still need webpack's loader to run. So LCU writes one derived file. It is the app's own entry, with its last statement removed, the one that starts the app. In its place, it registers every early bootstrap chunk and exports the loader. Registering a chunk runs none of its code. If the entry has any other shape, the install stops.

    Slide text

    One file is derived: the app's entry, minus the line that starts the app

    app entry, last statement

    var o=r(N);module.exports=o // starts the app

    lcu-webpack-runtime.cjs, same place

    r.e(491);…module.exports=r // registers chunks, exports require
    verify app find host extract load check install
  6. Reading the code can only suggest the host will load. So after writing it, the installer loads it once, on the app's own Node, with any attempt to load Electron turned into an error. It never calls the factory. If loading fails, LCU deletes what it wrote and stops, early enough that the previous LCU release can still be put back.

    Slide text

    Before the install relies on the host, LCU loads it once with Electron blocked

    if (request === 'electron' || request.startsWith('electron/')) throw new Error('blocked ' + request); ... if (typeof require(generatedHost) !== 'function') throw ...

    Fails: the written host is removed and the install stops, while the previous release can still be restored.

    verify app find host extract load check install
  7. The check ran against the Windows package itself, the Linux package from the same release, and an older Mac app as a control. For each one, the host was extracted, loaded with Electron blocked, started, asked to close a turn, and shut down. A separate probe drove each host through its real socket, and the two webpack builds behaved the same. Loading took about 135 milliseconds, against 40 for the control.

    Slide text

    The host extracted and ran from both new webpack builds

    App packageLayoutGenerated charsFiles copiedResult
    Windows 26.1027.3384.0webpack33,55833Passed
    Linux 26.1027.51404webpack26,71832Passed
    macOS 26.1013.40934earlier, control10,6169Passed

    Run on macOS arm64 with each app's own Node 24.21.0 · load, start, closeActiveTurn, dispose

    verify app find host extract load check install
  8. This change has a clear limit. Nothing in it ran on Windows. The Windows named pipes, the Windows helper and a real computer-use action are still unproven, and the newer Store build couldn't be downloaded to inspect. The person who reported the bug offered to try a fix on their Windows 11 desktop. Windows support in LCU is still a candidate. If you hit this error, build the thin Windows zip from main and run the installer again. It should now get past the host check on the newest Windows ChatGPT app.

    Slide text

    None of this has run on Windows yet

    The tests ran the Windows package's code on a Mac. Named pipes, the Windows helper and a live action are untested.

    On the October app?
    Build the thin Windows ZIP from main and run install.ps1 again. A future layout change still stops it before installing.
    verify app find host extract load check install

What happened in AI today, in your inbox

One short email each evening. Read it and you’re caught up.

Built with ❤️ in New York