FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

Resolved 💬 4 comments Opened Feb 7, 2026 by smileBeda Closed Feb 27, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

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

Version 260206.1448 (565)

What subscription do you have?

PRO

What issue are you seeing?

Sporadic crashes - lately basically after a few minutes, mid-work.

When opening the app with /Applications/Codex.app/Contents/MacOS/Codex I can see the error and it says:

...
...
[electron-message-handler] Received app server result: 30805ea9-89a8-40c9-97f3-64b71746ee12 object(keys=1)

<--- Last few GCs --->

[51691:0x134037b0000]   101497 ms: Mark-Compact (reduce) 3996.8 (4003.6) -> 3996.8 (4003.6) MB, pooled: 0.0 MB, 57.65 / 0.00 ms (average mu = 0.002, current mu = 0.000) last resort; GC in old space requested
[51691:0x134037b0000]   101553 ms: Mark-Compact (reduce) 3996.8 (4003.6) -> 3996.8 (4003.6) MB, pooled: 0.0 MB, 55.16 / 0.00 ms (average mu = 0.001, current mu = 0.000) last resort; GC in old space requested

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----

 1: 0x1102971a4 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 2: 0x110f7bbf0 v8::PropertyDescriptor::set() const [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 3: 0x110f7bb7c v8::PropertyDescriptor::set() const [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 4: 0x111061af4 v8::CppHeap::CollectGarbageInYoungGenerationForTesting(cppgc::EmbedderStackState) [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 5: 0x10f2f6330 v8::Isolate::LowMemoryNotification() [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 6: 0x10ea662e4 rust_png$cxxbridge1$Reader$has_actl_chunk [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 7: 0x10e2908b8 v8::internal::compiler::CompilationDependencies::DependOnNoSlackTrackingChange(v8::internal::compiler::MapRef) [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 8: 0x10e290644 v8::internal::compiler::CompilationDependencies::DependOnNoSlackTrackingChange(v8::internal::compiler::MapRef) [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 9: 0x157eb5854 
10: 0x157e0a9bc 
11: 0x157e0a2b8 
12: 0x150200b24 
13: 0x1503e7e10 
14: 0x1502073c4 
15: 0x1501b8ae4 
16: 0x1501a5544 
17: 0x1501ae460 
18: 0x150198fe8 
19: 0x157e0e38c 
20: 0x157e0e38c 
21: 0x157e4e404 
22: 0x157f2ddd8 
23: 0x157e3cfa8 
24: 0x157e0b274 
25: 0x10d64e488 v8::Function::NewInstanceWithSideEffectType(v8::Local<v8::Context>, int, v8::Local<v8::Value>*, v8::SideEffectType) const [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
26: 0x10d662010 v8::MicrotasksScope::~MicrotasksScope() [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
27: 0x10d661fb0 v8::MicrotasksScope::~MicrotasksScope() [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
28: 0x10d661bf8 v8::BackingStore::~BackingStore() [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
29: 0x1101a7f64 node::InternalCallbackScope::Close() [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
30: 0x1101a82d4 node::InternalMakeCallback(node::Environment*, v8::Local<v8::Object>, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*, node::async_context, v8::Local<v8::Value>) [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
31: 0x1101b78e0 node::AsyncWrap::MakeCallback(v8::Local<v8::Function>, int, v8::Local<v8::Value>*) [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
32: 0x110229988 node::HandleWrap::OnClose(uv_handle_s*) [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
33: 0x10ff4f194 uv_run [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
34: 0x1101a8c20 node::SpinEventLoopInternal(node::Environment*) [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
35: 0x1103e4448 node::worker::Worker::Run() [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
36: 0x1103ea200 _register_external_reference_worker(node::ExternalReferenceRegistry*) [/Applications/Codex.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
37: 0x191f59c08 _pthread_start [/usr/lib/system/libsystem_pthread.dylib]
38: 0x191f54ba8 thread_start [/usr/lib/system/libsystem_pthread.dylib]
[0207/173651.660955:WARNING:third_party/crashpad/crashpad/util/process/process_memory_mac.cc:94] mach_vm_read(0x16d24c000, 0x8000): (os/kern) invalid address (1)
[0207/173651.924005:WARNING:third_party/crashpad/crashpad/util/numeric/in_range_cast.h:38] value -634136515 out of range
zsh: abort      /Applications/Codex.app/Contents/MacOS/Codex

What steps can reproduce the bug?

Open app, communicate, wait for AI, crash.
It is a longer thread, so it might be connected to that.

What is the expected behavior?

NO crashes.

Additional information

_No response_

View original on GitHub ↗

4 Comments

ConnorColyer · 6 months ago

Reproducible crash on macOS: Codex desktop app OOMs (V8 JS heap) ~20–120s after launch.

What I did:

  • Clean uninstall (removed /Applications/Codex.app + ~/Library Support/Preferences/Caches/Logs + any VS Code extension app-server leftovers)
  • Reinstalled fresh + signed in
  • Still crashes consistently

How to reproduce (for me):
1) Launch Codex normally (or run binary from terminal)
2) Within ~20–120 seconds it crashes

Useful signal:

  • Crash occurs shortly after Skills/list + [git-repo-watcher] Starting git repo watcher
  • Multiple git rev-parse code=128 messages appear before the OOM

Terminal launch command:
/Applications/Codex.app/Contents/MacOS/Codex

Observed failure:
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
GC shows ~3883MB old-space at last resort.

Attached: terminal.log with stack trace.
System:

  • macOS: <version>
  • Chip: Apple Silicon (arm64)
  • Codex version/build: <if visible in About, or app version>

terminal.log

energiberegner-jonathan · 6 months ago

I’m seeing this on Windows using the Codex VS Code extension (WSL workspace). VS Code reports:
Window terminated unexpectedly (reason: 'oom', code: '-536870904')
and in my case it sometimes causes a full system reboot.

I checked Windows Event Viewer and found a Resource-Exhaustion-Detector (Event ID 2004) at the crash time showing the system hit total commit exhaustion:

  • Physical RAM: ~16GB
  • System commit charge: ~65GB (at commit limit)
  • Largest process: PLANET9DA.exe (~44.8GB commit)
  • Code.exe was only ~0.48GB commit

This happened while Codex was producing/rendering a very large diff (even though I asked it to avoid monolithic changes).
PLANET9DA.exe appears to be related to Acer Planet9/NitroSense; I’m going to disable/uninstall it and retest, and I’ll report back if the issue persists.

etraut-openai contributor · 6 months ago

@smileBeda , @ConnorColyer , we think we've addressed this in new versions of the app. Please let us know if you see it again.

@energiberegner-jonathan, we haven't released a version on Windows yet. Are you using a version that you cobbled together from the Mac app?

ConnorColyer · 6 months ago

Issue appears to be resolved on my side now 👍

After fully removing the Codex desktop app and clearing leftover configs/cache, the crashes stopped and I’m no longer hitting the heap-limit / out-of-memory error. The app had been consistently crashing after a few minutes of use before this.

Not 100% sure whether the root cause was corrupted local state or something persisting between launches, but a clean reinstall + wiping local data fixed it.

Note: The latest update alone didn’t immediately resolve the issue for me — I had to fully remove all local Codex files before it stopped occurring.

Thanks for looking into this — happy to provide more logs if needed.