openai / openai/codex

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

Open
#46,201 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug CLI performance windows-os
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file, test, or entry point is named. Start by reviewing the Windows Event 1000/1001 evidence and the allocator failure details, then determine whether a reproducible memory or crash pattern can be established; done means an identified cause with a targeted fix or actionable recovery and diagnostics.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, operating-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.