Skip to content

Windows app repeatedly freezes on launch while synchronously hashing bundled executables on the main thread #32076

Open

Description

@Rawalanche

What version of the Codex App are you using (From “About Codex” dialog)?

26.707.31428

What subscription do you have?

Plus

What platform is your computer?

Windows 11 25H2

What issue are you seeing?

Every time I launch the Windows Codex app, the UI repeatedly freezes for roughly the first 30 seconds before becoming usable. The freezes occur in bursts of about 0.6–1.4 seconds.

A 32-second Chromium performance trace attributes the stalls to synchronous relocation validation of executables bundled under C:\Program Files\WindowsApps. Codex repeatedly reads and SHA-256 hashes the bundled source files and their cached copies on CrBrowserMain.

The sampled stack is:

mcp-codex-config → buildMcpCodexConfig → runtime path resolution → wM → _M → NM → PM/LM → RM → fs.readFileSync → crypto.createHash("sha256").update(...)

The bundled executable set being validated is approximately 405 MB (codex.exe is 341 MB, plus code-mode, sandbox, and command-runner helpers). A successful validation hashes both source and cached destination, roughly 810 MB per resolver invocation. The resolver is invoked repeatedly during startup and MCP/browser configuration.

Trace totals:

  • 8.4 seconds inside synchronous bundled-executable hashing on the browser/main thread
  • 30 main-thread microtasks longer than 100 ms, totaling 12.2 seconds
  • At least 11 major hash-related blocking bursts
  • Another 1.63 seconds comparing relocated Node/runtime files
  • Renderer idle for 28.1 of the 32 captured seconds

This appears deterministic in the Windows Store/MSIX build and is not project-specific.

What steps can reproduce the bug?

  1. Install/open the Codex Windows Store app.
  2. Enable normal Codex features/plugins. Browser/Chrome control are enabled in my setup.
  3. Fully close the app.
  4. Launch Codex again.
  5. Try to interact with or move the window during the first ~30 seconds.

Result: the app repeatedly stops responding in 0.6–1.4 second bursts before eventually becoming usable.

I reproduce this on every launch. I captured a performance trace using Help → Start Performance Trace and stopped it during the freeze period.

What is the expected behavior?

Codex should become responsive immediately after the window appears.

Relocated runtime validation should be cached per app version/process or performed off the browser/main UI thread. Starting the app should not repeatedly read and hash hundreds of megabytes of bundled and cached executables.

Additional information

The renderer is not the bottleneck: it was idle for 28.1 of the 32 captured seconds. GPU, layout, Git, and network activity do not account for the freezes. One ~1.0 second renderer pause in the trace is caused by starting the CPU profiler itself and is unrelated.

The blocking implementation path appears to validate WindowsApps relocation by hashing both source and destination on every resolver call, with no process-level memoization. mcp-codex-config alone accounts for two ~1.2 second stalls in the capture.

Suggested fix: memoize relocation validation for the current app/runtime version, use file metadata/version stamps where safe, and move any full-file hashing off CrBrowserMain.

I retained the 383 MB trace locally and can provide it if needed.

Activity

  1. added
    appIssues related to the Codex desktop app
    on Jul 10, 2026
  2. Rawalanche commented on Jul 10, 2026

    @Rawalanche
    Author

    Additional finding: the same freeze occurs when creating new conversations

    Further investigation with a second 35.7-second performance trace shows this problem is not limited to application startup. The same main-thread blocking repeatedly occurs when opening a fresh conversation, both inside a project and as a projectless task.

    Opening the new-conversation composer prewarms a thread through:

    prewarmConversation/startThread → buildNewConversationParams → buildThreadCodexConfig → mcp-codex-config

    With Browser/Chrome control enabled, this rebuilds the browser runtime configuration and synchronously revalidates the bundled Codex CLI and Node runtime by reading and SHA-256 hashing both the WindowsApps source files and their relocated cached copies on CrBrowserMain.

    The second trace captured:

    • Six mcp-codex-config builds
    • 8.04 seconds inside configuration building
    • 8.01 seconds spent hashing bundled executables
    • Individual main-thread blocks lasting 1.21–1.65 seconds
    • Renderer idle for 31.54 of the 35.62 captured seconds

    The trace directly correlates keyboard latency with this hashing. Captured keypresses were delayed by 984 ms, 1,140 ms, and 1,375 ms, and completed within approximately 0.4–12 ms of the corresponding hashing operation ending. Normal renderer-side keyboard handling never exceeded 24.5 ms.

    This confirms that the visible typing freeze is caused by the same synchronous executable-relocation validation, not React, layout, rendering, Git, or network activity.

    The resolver should be memoized per application version/process, duplicate Node runtime validation should be eliminated, and any unavoidable full-file hashing should run off CrBrowserMain.

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

    Papercuts 2026appIssues related to the Codex desktop appbugSomething isn't workingperformancewindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions