Skip to content

Windows: codex-cli 0.154.0 fatal memory allocation failure (1366784 bytes), event 0xc0000409 #46201

Open

Description

@francis-87

Summary

Codex on Windows terminated during an active, long-running agent session after displaying:

memory allocation of 1366784 bytes failed

Windows Application Error independently records a crash of codex.exe at 2026-09-17T12:07:50.446Z, exception 0xc0000409. Root cause is unknown; this report does not establish a leak, global memory exhaustion, or a specific tool as the cause.

Environment

  • Windows 11 Pro x64, version 10.0.26200.
  • Approximately 32 GB installed RAM (OS-visible 32,324,024 KiB).
  • Running the executable identified in the event with --version returns codex-cli 0.154.0.
  • Sanitized executable path: %LOCALAPPDATA%\Programs\OpenAI\Codex\bin\codex.exe.
  • An installed Store package reports OpenAI.Codex 26.908.9136.0; this is included as installation metadata, not proof that this exact UI package was the faulting process.

Activity and observed behavior

  1. A long conversation had used independent subagents, local file reads/writes, document-extraction trials, and MCP tools.
  2. The agent was recording an approved plan through an external task-management MCP, persisting an idempotency checkpoint between operations.
  3. The user saw the allocator error above and Codex closed. An in-progress orchestration/tool call was aborted.
  4. After restarting, local artifacts and the last checkpoint were still present. Read-back from the external system showed that one task creation had committed and subsequent intended creations had not. Recovery required reconciling that partial completion before resuming.

This is a reported single occurrence; no minimal reproducer or memory-growth profile is available. We did not intentionally reproduce the crash.

Sanitized Windows event evidence

Event ID: 1000
Provider: Application Error
Faulting application: codex.exe
Faulting module: codex.exe
Application/module version: 0.0.0.0
Timestamp: 0x6aa1dbcf
Exception code: 0xc0000409
Fault offset: 0x000000000ceece81
Event time UTC: 2026-09-17T12:07:50.446Z

Related WER Event ID: 1001
Event Name: BEX64
P8: c0000409
P9: 0000000000000007

A measurement after restarting showed roughly 17 GB free physical memory and 20 GB free virtual memory. This is not memory telemetry from the time of the crash and cannot rule out earlier memory pressure.

Expected behavior

The session should remain running or recover with a clear error. A fatal backend termination during an external mutation should preserve/recover the state and make the uncertain completion boundary visible.

Additional context

Searched existing issues for the exact allocation size and Windows allocation errors. Related memory reports exist, but we have not established that they share this cause. No project documents, credentials, raw conversations, or memory dumps are attached.

Activity

  1. added
    bugSomething isn't working
    CLIIssues related to the Codex CLI
    windows-osIssues related to Codex on Windows systems
    on Sep 17, 2026
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

    CLIIssues related to the Codex CLIbugSomething 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