macOS: MallocStackLogging: can't turn off malloc stack logging because it was not enabled. appears when running Codex v0.118.0
What version of Codex CLI is running?
v0.118.0
What subscription do you have?
pro
Which model were you using?
gpt-5.4
What platform is your computer?
Darwin 24.6.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
Terminal.app
What issue are you seeing?
codex(3912) MallocStackLogging: can't turn off malloc stack logging because it was not enabled.
What steps can reproduce the bug?
- Open Terminal.app on macOS
- Launch Codex
- Observe repeated log output:
``text``
codex(...) MallocStackLogging: can't turn off malloc stack logging because it was not enabled.
- Leave Codex running for a short time
- Terminal becomes filled with the repeated warning messages
What is the expected behavior?
expected behavior: I shouldn't see the repeated flooding of the error.
Codex should not continuously emit malloc logging warnings during normal use.
If malloc stack logging is not enabled, Codex should not repeatedly attempt to disable it or surface this warning to the user.
Additional information
- Version: v0.118.0
- Platform: macOS
- Running via: Terminal.app
- Reproducibility: every launch
- Restarting Codex does not fix it
- Checked Terminal environment with:
``bash``
env | grep -i malloc
No malloc-related environment variables were present.
This suggests the repeated warning is not caused by user-set shell environment variables such as MallocStackLogging or MallocStackLoggingNoCompact.
The issue appears to be caused by Codex or one of its macOS runtime components repeatedly attempting to disable malloc stack logging when it is not enabled.
8 Comments
Yes been having this issue too for a while
This appears to be a side effect of the attempt to fix https://github.com/openai/codex/issues/11555.
Encountered this issue as well
Still seeing this class of warning on current latest Codex CLI, so this does not appear fixed by the releases after
0.118.0.Environment:
codex-cli 0.125.0@openai/codexlatest:0.125.0/opt/homebrew/bin/codex -> ../lib/node_modules/@openai/codex/bin/codex.js26.4.1(25E253), Darwin25.4.0, arm64Observed warning pattern in an interactive Codex session:
Local checks I ran:
env | sort | rg -i 'malloc|stack|guard|zombie|dyld'-> no malloc-related environment variableslaunchctl getenv MallocStackLogging,MallocStackLoggingNoCompact,MallocScribble,NSZombieEnabled-> blank~/.zshenv,~/.zprofile,~/.zshrc,~/.bash_profile,~/.bashrc) -> noMallocStackLogging*referencescodex --versionandenv -i HOME=$HOME PATH=/opt/homebrew/bin:/usr/bin:/bin TERM=xterm-256color codex --versionboth printcodex-cli 0.125.0cleanly, so I only see the flood in the interactive TUI path rather than a simple non-interactive launchThis matches the report here, with the main difference that the affected version is now
0.125.0rather than0.118.0.Still see this in codex-cli 0.130.0
Seems it happens when the warning message " Selected model is at capacity. Please try a different model." start to show up.
Happens repeatedly in codex-cli 0.130.0, to the point that the UI becomes unusable.
I'm facing the same with
codex-cli 0.130.0<img width="333" height="103" alt="Image" src="https://github.com/user-attachments/assets/6525300c-fda4-44ca-abe9-3a7a4c045baa" />
Resize the terminal window sometime helps
Me too, Codex CLI: codex-cli (v0.133.0)
codex(24754) MallocStackLogging: can't turn off malloc stack logging because it was not enabled.