codex icon indicating copy to clipboard operation
codex copied to clipboard

[Windows 10][26.1016.61520] In-app update loop: staged MSIX fails to register because Codex is still running

Open ermaxinc opened this issue 1 month ago • 5 comments

Related to #29172 and #38843. This is another reproduction on desktop build 21421, with Windows deployment evidence captured on October 23, 2026. Please link or consolidate this report if it has the same underlying cause.

Observed behavior and environment

I used the blue update button in the lower-left sidebar. The app closed or restarted as if it had applied the update. After opening Codex again, the update indicator returned. I repeated the update two or three times and still received the same prompt.

  • Windows 10 Pro x64, version 10.0.19045, build 19045.
  • Desktop app version 26.1016.61520, build 21421, production channel.
  • Registered and running Windows package: OpenAI.Codex_26.1016.8120.0_x64__2p2nqsd0c76g0.
  • Staged update package: OpenAI.Codex_26.1016.8622.0_x64__2p2nqsd0c76g0.

The app version and Windows package version use different version strings. Both are included to identify the affected installation.

Reproduction and expected behavior

  1. Open Codex on Windows and click the blue update indicator.
  2. Allow the update flow to close or restart the app.
  3. Open Codex manually if needed.
  4. Observe that the update indicator appears again.
  5. Repeat the update and observe the same result.

The update should complete and clear the indicator. If installation fails, the app should show the failure and explain the required action.

Verified diagnostic evidence

Local times below are for October 23, 2026, Europe/Kyiv, UTC+03:00. Windows event messages are paraphrased.

  • At 00:05:22, 12:36:20 and 12:39:49, AppXDeploymentServer event 638 reports that the packages were not updated because OpenAI.Codex_2p2nqsd0c76g0!App was still running.
  • Events 419 and 401 report registration failure 0x800700E9 and explicitly require Codex to be closed.
  • Event 404 reports deployment failure 0x80073CF9 with underlying error 0x800700E9.
  • Event 400 confirms that staging the 26.1016.8622.0 package succeeded, including at 12:36:18 and 12:39:48.
  • After relaunch, the registered package and the running ChatGPT.exe still belonged to 26.1016.8120.0.

A read-only check through the app's configured updater returned:

{
  "installedVersion": "26.1016.61520",
  "installedBuildVersion": "21421",
  "installedReleaseChannel": "prod",
  "status": "restart_required"
}

Desktop logs also report hasUpdate=true after the subsequent launches at 12:38:14 and 12:42:06.

This confirms successful staging followed by failed package registration. The specific process or package resource preventing registration has not been identified.

Please investigate shutdown, package registration and relaunch ordering, and expose deployment failures in the update UI. Repeatedly restarting the app currently gives no explanation and leaves the same update pending.

Personal paths, account identifiers, conversation content and raw logs are omitted.

ermaxinc avatar Oct 23 '26 10:10 ermaxinc

Additional user report on 2026-10-23 on Windows, with desktop app 26.1016.61520, build 21421, production channel.

The user reports that the update flow frequently fails to finish: after restarting, the same update remains pending. They have to repeat the update several times before it succeeds, and sometimes it never completes. This is recurring and particularly frustrating because the repeated restarts provide no clear explanation or reliable completion signal.

During the current session, a single read-only check through the app's configured updater returned:

{"installedVersion":"26.1016.61520","installedBuildVersion":"21421","installedReleaseChannel":"prod","status":"restart_required"}

This confirms a pending restart/update state on this affected installation. It does not independently establish the MSIX deployment cause described in the original issue: we have not reproduced another restart or collected deployment logs during this session.

Expected behavior: one update/restart cycle should complete the installation and clear the update prompt; if it fails, show a specific, recoverable error rather than repeatedly asking the user to retry the same cycle. The user explicitly requested that this feedback reach OpenAI.

Rodrigo-Villanueva avatar Oct 23 '26 10:10 Rodrigo-Villanueva

補充另一台電腦的實測證據(2026-10-23,Asia/Taipei,UTC+08:00)。使用者透過桌面版內的「更新」按鈕執行更新,卻反覆失敗。

環境:Windows 10 教育版 x64,10.0.19045;已註冊 MSIX 套件版本 26.1016.8120.0,目標版本 26.1016.8622.0。此處版本是 Windows 套件版本。

已直接檢查本機紀錄:

  • 20:40:30 與 21:08:07 的 AppXDeploymentServer event 404 均顯示外層 0x80073CF9,底層 0x800700E9,明確要求關閉 OpenAI.Codex_2p2nqsd0c76g0!App。
  • 21:08:07 的 event 400 確認新版 Stage 成功;event 638 隨後指出桌面版仍在執行,阻擋更新。event 605 顯示在進入 PackagesInUseClosed 前失敗。
  • 桌面版日誌在 20:39:43 與 21:07:17 均記錄 action=download_completed result=succeeded currentBuildNumber=21421。
  • 完整退出桌面版後,直接對已暫存新版的 AppxManifest.xml 執行 Add-AppxPackage -Register -DisableDevelopmentMode,沒有使用強制關閉參數,即成功完成更新;21:18:18 驗證已註冊版本為 26.1016.8622.0。
  • 修復前仍執行的 Codex CLI 程序經 GetPackageFullName 檢查均無套件身分;本次未要求關閉 CLI session 即完成註冊。這不代表已識別最初阻擋更新的特定程序或 handle。

使用者的核心回饋:既然已點應用程式內的更新按鈕,更新流程應自行協調完整退出、等待舊套件資源釋放、安裝及重新啟動,不應要求使用者另外手動退出並執行 PowerShell 才能完成。請調查關閉與註冊的先後順序、等待及重試機制,並在失敗時顯示可採取行動的錯誤資訊。

以上只含必要版本、時間、事件 ID 與錯誤碼;未附完整日誌、對話、個人路徑或帳號識別資訊。

Jerry990561 avatar Oct 23 '26 13:10 Jerry990561

Additional Windows reproduction with a minimal, non-destructive workaround, verified on November 19, 2026.

Symptom: The Codex/ChatGPT Windows desktop app repeatedly displayed an "Update available" indicator despite update attempts. Windows Task Manager App history showed ~24.8 GB of cumulative network usage since October 20, but that aggregate does not establish that 24.8 GB (or 1 GB/day) was spent on failed update downloads.

Evidence from Windows AppXDeploymentServer/Operational:

  • Nov 16, 2026: event 638: "Packages were not updated because affected apps are still running. Running apps: {OpenAI.Codex_2p2nqsd0c76g0!App}".
  • Nov 17, 2026: the same event 638 recurred.
  • Nov 18, 2026: event 638 recurred, alongside event 855 showing update action lists from OpenAI.Codex_26.1106.6628.0 to OpenAI.Codex_26.1111.2228.0.

Minimal user workaround that coincided with recovery:

  1. In the app, choose File → Quit ChatGPT (rather than merely closing the window).
  2. Relaunch the desktop app.
  3. Verify package registration in PowerShell: Get-AppxPackage -Name OpenAI.Codex | Format-List Name,Version,Status.
  4. Inspect AppXDeploymentServer event 638 for new app-in-use failures.

Observed verification: The registered package is now OpenAI.Codex 26.1111.2228.0, Status: Ok. A fresh check at 07:48 local time on Nov 19 found no new relevant 638/855 events after Nov 18, and the user observed no ongoing download immediately after the full quit/relaunch.

This supports that the app-in-use update deferral was resolved at the time of testing. It does not prove that all historical network traffic was updater traffic or that the issue cannot recur on a later update. No cache deletion, ACL modification, reinstall, or process termination was required for this attempt.

Product suggestion: When MSIX deployment is deferred by a running app (event 638), show a clear "Quit completely to finish updating" action or handle shutdown/restart reliably, rather than repeatedly showing an ambiguous update badge.

ImanCognitiveArch avatar Nov 19 '26 04:11 ImanCognitiveArch

Additional reproduction across November 2026 desktop packages, with a verified independent-update workaround.

The ChatGPT/Codex Windows desktop app repeatedly downloads updates successfully but fails to activate them through the normal update button.

Windows deployment logs report:

AppX Deployment operation failed with error 0x80073CF9.

error 0x800700E9: Unable to install because the following
apps need to be closed OpenAI.Codex_2p2nqsd0c76g0!App.

Observed occurrences

Date Installed Windows package Update that failed
November 11, 2026 26.1103.4239.0 26.1106.6628.0
November 20, 2026 26.1111.2228.0 26.1117.3838.0
November 21, 2026 26.1117.3838.0 26.1117.4957.0

Package family: OpenAI.Codex_2p2nqsd0c76g0. These are Windows package versions; the desktop About version uses a different version string. Exact Windows edition and build were not collected.

For the November 21 occurrence, AppXDeploymentServer/Operational showed:

  • 07:26:17 local: event 400 confirmed successful staging of 26.1117.4957.0.
  • 07:26:18–07:26:20: events 419, 401, and 404 reported the app-needs-to-be-closed failure above.
  • 07:41:52: event 400 again confirmed successful staging.
  • The registered and running package remained 26.1117.3838.0 before repair.

Times are America/New_York (UTC−05:00).

Steps observed

  1. Open the desktop app and use its normal update button.
  2. Windows successfully stages the newer package.
  3. Package registration fails because Windows considers the app still in use.
  4. The app continues running the older package, and the update remains available.

Expected behavior

The updater should coordinate application shutdown, activate the downloaded package, reopen the updated app, and confirm completion—or display an actionable error.

Workaround verified on this installation

A temporary Windows scheduled task runs independently of the app. It verifies the staged package's identity and OpenAI signature, stops the old package's app processes, and applies:

Add-AppxPackage -Register -MainPackage <staged-package-full-name> -ForceTargetApplicationShutdown

It then verifies that the target package is registered with status Ok, reopens the app through its package activation identity, checks that its window belongs to the updated executable, and removes the temporary task.

The November 20 repair verified 26.1117.3838.0 registered and reopened successfully. The November 21 repair verified 26.1117.4957.0 registered and reopened successfully at 07:43:56 local. The user confirmed the latter worked. Both used the packages Windows had already downloaded.

Investigation request

Please investigate the normal updater's shutdown and package-registration sequence, including background components that may retain the old package and whether registration starts before shutdown completes.

The evidence establishes the failure point and a working workaround. It does not identify the specific blocking process or prove the exact internal cause.

This report was submitted with the affected user's authorization. It contains no personal paths, account identifiers, conversation content, or raw diagnostic attachments.

abiodunonanuga avatar Nov 21 '26 12:11 abiodunonanuga

Another reproduction, with timing that points at the cause: the updater registers the staged package before the app's AppX container has finished tearing down, gets refused, and never retries. Same signature as #51588, #57611, #25770 and #29172.

Environment

  • Windows 10 Enterprise x64, 10.0.19045, running as a VMware VM, under heavy load (500+ processes).
  • Seen three times, on four builds: 26.930.3930.0 → 26.930.4958.0 (Oct 5), 26.1013.4894.0 → 26.1016.6573.0 (Oct 22), 26.1111.9664.0 → 26.1117.4957.0 (Nov 21).
  • Every in-app Update attempt fails; none has succeeded on its own.

Timeline, Nov 21 (local time, UTC-6)

Time Log / event What happened
15:17:19 AppXDeploymentServer 603 RegisterByPackageFamilyName started, options ForceTargetApplicationShutdownOption, RegisterHighestVersion, FailIfNeedsRemediation
15:17:20 AppXDeploymentServer 638 / 419 "Packages were not updated because affected apps are still running", 0x800700E9
15:17:20 AppModel-Runtime 217 Desktop AppX container destroyed, in the same second as the refusal
15:17:21 AppXDeploymentServer 404 Deployment failed, 0x80073CF9
15:18:09 AppModel-Runtime 201 Old build (26.1111.9664.0) relaunched
15:19:01 AppXDeploymentServer 603 → 638 / 419 Second attempt refused the same way
15:19:02 AppModel-Runtime 217 Container destroyed one second after the refusal
15:19:49 AppModel-Runtime 201 Old build relaunched again

In October the gap between refusal and container teardown measured 0.26 to 9.2 s. It grows when a turn is in progress (threadCount=1), and on a loaded VM. The register runs against an app that is still closing, and ForceTargetApplicationShutdown doesn't stop that from failing. Nothing retries or reports the failure, so the old build comes back and the update indicator reappears.

Workaround that works every time

  1. Quit the desktop app and wait until no process from the OpenAI.Codex_* package is left: the ChatGPT.exe processes and the codex.exe app-server children under %LOCALAPPDATA%\OpenAI\Codex\bin.
  2. In Windows PowerShell 5.1, not pwsh 7, where the Appx module doesn't load:
    Add-AppxPackage -Register 'C:\Program Files\WindowsApps\OpenAI.Codex_<staged-version>_x64__2p2nqsd0c76g0\AppxManifest.xml' -DisableDevelopmentMode -ForceApplicationShutdown
    
    The staged version is in AppXDeploymentServer events 638 and 400.
  3. Launch with shell:AppsFolder\OpenAI.Codex_2p2nqsd0c76g0!App. The new build runs.

Suggested fix

In the updater, wait for the package's processes and AppX container to be gone before calling RegisterByPackageFamilyName, or retry on 0x800700E9/0x80073CF9 with backoff. Also, show a failed registration in the UI instead of silently relaunching the old build.

Personal paths, account identifiers and conversation content are omitted.

layibabalola avatar Nov 22 '26 02:11 layibabalola