[Windows CLI 0.145.0] fatal `memory allocation of 766053888 bytes failed` while packaging 100 PNG files

Open 💬 1 comment Opened Jul 25, 2026 by cocoichisan

Codex CLI version

codex-cli 0.145.0

Subscription

ChatGPT Pro

Model

gpt-5.6-sol with xhigh reasoning effort

Platform

  • Windows x64
  • Windows Terminal / Windows PowerShell
  • Native Windows project directory (not WSL)
  • Exact Windows build was not collected

Issue

The Codex CLI process terminated during a local project task with the following fatal error:

memory allocation of 766053888 bytes failed
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

The TUI immediately returned to the PowerShell prompt. The failed allocation is approximately 731 MiB.

Workload at the time of failure

The active task was processing a set of 100 PNG files for an import/package workflow. Codex had already reported that it found 100 previously unincorporated improved PNG files and was at the plan step:

Create and verify an import package for the 100 files

The crash occurred after approximately 21 seconds of work. No Rust backtrace was captured for this occurrence.

Steps that led to the observed failure

  1. Launch Codex CLI 0.145.0 in a native Windows project.
  2. Use gpt-5.6-sol with xhigh reasoning effort.
  3. Ask Codex to identify and package 100 local PNG files for import.
  4. During package creation/verification, the process aborts with the exact allocation failure above and returns to PowerShell.

This report documents one observed occurrence; repeatability has not yet been established.

Expected behavior

Codex should process the files incrementally or fail the individual operation gracefully. A large allocation request should not terminate the entire CLI session without preserving the turn or reporting actionable diagnostics.

Additional context

The same Windows machine also experienced repeated native Codex Desktop 0xc0000409 crashes after the July 24 update, tracked separately in #35179. The CLI allocation failure is being reported separately because it has a different executable path and explicit failure signature; no causal relationship is claimed.

A screenshot of the terminal failure is available if maintainers need it. Local project names and paths are intentionally omitted.

View original on GitHub ↗

1 Comment

cocoichisan · 1 month ago

Additional correlation with an affected image-heavy thread

The CLI allocation failure appears connected to the same local thread later causing severe Desktop memory growth.

Observed sequence:

  • The thread attempted to process/package 100 PNG files in one task.
  • CLI 0.145.0 terminated during that work with:
memory allocation of 766053888 bytes failed
  • Later, opening that same thread in Codex Desktop caused one codex.exe process to reach approximately 17.2 GB while total system memory reached 97%.
  • After terminating Codex and no longer opening that thread, the crashes stopped.

The local thread ID is intentionally redacted. This suggests the explicit CLI allocation failure and the later Desktop memory growth may both involve restoring or processing a large image-heavy thread, but a common root cause is not yet proven.