Skip to content

[Windows Desktop 26.1007.9446.0] Stable app starts headlessly with no renderer or window after Store update and clean reinstall #53985

Closed

Description

@ookkssiirr

Summary

On 2026-10-14 (Asia/Macau, UTC+08:00), the Windows Microsoft Store/MSIX Codex desktop package OpenAI.Codex 26.1007.9446.0 launched background ChatGPT.exe processes but never created a visible window. Repeated Start menu/taskbar activation did nothing. This remained reproducible after a complete uninstall/reinstall and a first launch with no restored app profile. The independently installed OpenAI.CodexBeta 26.727.4816.0 opened a visible window on the same machine.

Environment

  • Windows x64, OS build 26100.7171
  • Stable package: OpenAI.Codex_26.1007.9446.0_x64__2p2nqsd0c76g0
  • Previously installed stable package: 26.1007.2314.0
  • Beta package used as a comparison: OpenAI.CodexBeta 26.727.4816.0
  • Codex CLI 0.156.1 remained usable (with separate, nonfatal arg0 access warnings)

Observed timeline (local UTC+08:00)

  1. The Store installed stable build 26.1007.9446.0 around 14:24. The older desktop run's last log entry was at 17:58:58.
  2. Around 17:59:39–40, Windows registered/activated the updated package. Subsequent launches created ChatGPT.exe processes, but no renderer and no visible window. Eight TWinUI activations between 18:00 and 18:05 reported successful activation without a window.
  3. A fresh user-data directory launched under an elevated token still showed zero visible windows over 60 seconds. An AUMID launch likewise showed zero windows over 45 seconds.
  4. At 18:56–19:01 the stable package was uninstalled and reinstalled from Microsoft Store. Its first launch with no restored profile produced five processes, zero windows, and no new desktop log directory. Restoring the saved profile did not change the result.
  5. At 19:09–19:14, Codex Beta was installed as a separate package family. Its window appeared within about 20 seconds and its desktop logs began updating.

Diagnostics and limits

  • For the stable app, the main process was present and reported Responding=True, while MainWindowHandle=0. No --type=renderer process was observed in the affected run.
  • Cold-start stderr showed an app-generated restart command line containing --no-startup-window --restore-last-session --restart, plus Command line too long for RegisterApplicationRestart. These are clues, not an established root cause.
  • A crashpad OpenProcess: Access denied (0x5) message occurred only in a restricted-token probe and disappeared under elevation; it should not be treated as the failure cause.
  • Old-package deletion errors (AppXDeployment 471/493) and pre-failure cloudflare_challenge 403 entries were also observed. The clean reinstall and no-profile reproduction prevent attributing the no-window symptom to those entries alone.
  • No new stable desktop log, CrashDump, or WER crash report was available for the no-window reproduction.

Expected behavior

The stable desktop package should create a visible window or surface a usable startup error. Please investigate the stable 26.1007.9446.0 startup/renderer path and advise on a supported workaround. The Beta build works on this machine, but stable remains installed and starts headlessly.

This report was prepared from local diagnostic notes at the affected user's request. It includes no account identifiers, credentials, conversation contents, backup archives, or raw logs.

Activity

  1. added
    bug
    app
    windows-os
    on Oct 14, 2026
  2. github-actions commented on Oct 14, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  3. zhankuian commented on Oct 17, 2026

    @zhankuian

    Root cause found: on a non-ASCII Windows username, the app resolves the user profile through an ANSI (CP936/GBK) round-trip and then works against a mangled, non-existent path

    Reproduced and fixed on a second machine. The launch failure is not a broken package,
    broken ACLs or a bad Known Folder registration — nothing on disk is wrong. The app
    computes the user profile with an ANSI code-page conversion, gets a mojibake path, and
    then tries to use that path.

    Environment

    • Windows 11 Pro 10.0.26300 x64, system ANSI code page 936 (GBK)
    • User profile directory name contains non-ASCII (CJK) characters
    • MSIX stable OpenAI.Codex_26.1013.3656.0_x64__2p2nqsd0c76g0 (Store product 9PLM9XGG6VKS)
    • Beta OpenAI.CodexBeta_26.727.4816.0_x64__2p2nqsd0c76g0 is affected too (fails one step later)

    Evidence 1 — every profile path in the app's own logs is mojibake

    %LOCALAPPDATA%\Codex\Logs\...\codex-desktop-*.log, raw bytes of the user-name segment:

    d5 bd  ef bf bd  ef bf bd  ef bf bd  ef bf bd
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  4 x U+FFFD
    

    So the app's internal string is U+057D followed by four U+FFFD — not the real name.

    Evidence 2 — that mojibake is exactly "GBK bytes decoded as UTF-8"

    The real user name is 3 CJK characters. Its GBK encoding is 6 bytes:

    d5 bd | bf fc | b0 b2
    

    Decoding those 6 bytes as UTF-8 (MultiByteToWideChar replaces each invalid byte with
    U+FFFD) yields d5 bd → U+057D, then four single-byte failures → four U+FFFD.
    Byte-for-byte identical to what the logs contain.

    Evidence 3 — the mangled directory really exists on disk, and the app populated it

    C:\Users\<mangled>\.codex\.desktop-created                     0 bytes
    C:\Users\<mangled>\AppData\Local\OpenAI\Codex\bin\<hash>\codex.exe
    C:\Users\<mangled>\AppData\Local\OpenAI\Codex\runtimes\
    

    .desktop-created is written by the packaged app itself (startup-requirements-*.js,
    mkdir(home) then writeFile(join(home, '.desktop-created'), '', { flag: 'wx' })).
    The relocated codex.exe runtime lives there too. So the app genuinely believes the
    user profile is <mangled>, not <real>.

    Evidence 4 — the failure mechanism is a permission error, not a missing path

    That tree is created directly under C:\Users, so it inherits the C:\Users ACL:
    BUILTIN\Users gets 0x1200a9 (read + execute, no write). It never receives the
    per-user Full-Control ACE that a real profile directory has. A normal-privilege process:

    > mkdir C:\Users\<mangled>\.codex\__probe
    PermissionError: [WinError 5] Access is denied
    

    Which is exactly what the beta build surfaces to the user:

    ChatGPT (Beta) failed to start.
    EPERM: operation not permitted, mkdir 'C:\Users\<mangled>\.codex\automations\3'
    

    Why this matches this issue's symptoms

    • Stable dies earlier, at app.getPath('appData') — the ANSI-derived profile leads to
      a %APPDATA% that cannot be created (SHGetFolderPath(CSIDL_APPDATA | CREATE) fails),
      so Electron raises Failed to get 'appData' path and the window never appears.
    • Beta gets past that and dies on the first mkdir under the mangled Codex home.
    • Reinstalling, re-registering, deleting the package data directory, fixing Known
      Folder registry values, and removing orphan-SID ACEs all change nothing
      — because the
      defect is the path string, not anything stored on the machine. Which is why this
      issue has survived every repair attempt reported so far.

    Verified checks on the affected machine (all correct, all irrelevant to the bug)

    Check Result
    HKLM\...\ProfileList\<SID>\ProfileImagePath correct
    HKCU\Volatile Environment USERPROFILE / APPDATA / LOCALAPPDATA correct
    User Shell Folders / Shell Folders correct
    SHGetKnownFolderPath(FOLDERID_RoamingAppData / LocalAppData / Profile) hr=0x00000000, correct paths
    package re-register / Store reinstall / delete package data dir ran clean, failure unchanged

    Working workaround (verified: the stable build now opens normally)

    Replace the mangled directory with a directory junction pointing at the real profile, so
    every path the app derives from the mangled prefix resolves into the real
    %APPDATA% / %LOCALAPPDATA% / ~/.codex:

    # elevated
    Rename-Item -LiteralPath "C:\Users\<mangled>" -NewName "<mangled>.bak"
    New-Item -ItemType Junction -Path "C:\Users\<mangled>" -Target $env:USERPROFILE

    Before: mkdir <mangled>\.codex\__probe → WinError 5; stable build exits with no window.
    After: same mkdir succeeds; the stable build shows its main window, the renderer and
    app-server handshake both complete, and no Failed to get 'appData' path is logged.

    Additional confirmation — the app writes mangled profile paths into its own config on every launch

    ~/.codex/config.toml receives 9 entries with the mangled profile every time the app
    starts. Verified by hand-correcting all 9 to the real user name (0 left), then restarting
    the app once — all 9 came back:

    [notify]
    [mcp_servers.node_repl]                          command
    [mcp_servers.node_repl.env]                      NODE_REPL_NODE_MODULE_DIRS
    [mcp_servers.node_repl.env]                      NODE_REPL_NODE_PATH
    [mcp_servers.node_repl.env]                      NODE_REPL_TRUSTED_CODE_PATHS
    [mcp_servers.node_repl.env]                      CODEX_HOME
    [mcp_servers.node_repl.env]                      NODE_REPL_TRUSTED_SERVICES
    [mcp_servers.node_repl.env]                      CODEX_CLI_PATH
    [shell_environment_policy.set]                   NODE_REPL_TRUSTED_CODE_PATHS
    

    The same file contains 50 other occurrences of the profile path written correctly, so
    only these specific code paths go through the ANSI conversion — which should narrow down
    where to look.

    Durability check

    The junction workaround was re-tested after a full machine reboot (LastBootUpTime
    advanced, brand-new app PIDs): junction intact, mkdir through it still succeeds, and the
    first post-boot startup log has zero hits for Failed to get / EPERM /
    bootstrap failed / fatal_error, with initialize_handshake_result outcome=success.

    Suggested fix on your side

    Find the ANSI-profile-path call (GetEnvironmentVariableA / SHGetFolderPathA /
    getenv on Windows, or a child process whose stdout is decoded as UTF-8) and use the
    wide (...W) / UTF-8 equivalent. A user name containing non-ASCII characters should not
    change where the app stores its data.

    No account identifiers, credentials or raw logs included; the user name is <user> /
    <mangled> on purpose.

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

    appbugwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions