What version of Codex CLI is running?
0.106.0
What subscription do you have?
Azure OpenAI
Which model were you using?
gpt-5.1-codex
What platform is your computer?
Linux 5.14.0-503.22.1.el9_5.x86_64 x86_64 x86_64
What terminal emulator and version are you using (if applicable)?
No response
What issue are you seeing?
When running the codex-cli in non-interactive mode, memory used by the process is not reclaimed after shutdown.
In our case it's running inside a Debian-based Docker container (hosted on a RHEL VM) and repeating the process eventually exhausts memory and causes the sandbox container to be killed by OOM.
This appears to be a memory leak.
What steps can reproduce the bug?
Run codex-cli in non-interactive mode multiple times (example command):
codex exec --json --dangerously-bypass-approvals-and-sandbox {prompt}
What is the expected behavior?
After each codex-cli invocation exits, memory usage should return to the baseline (previous) free memory level.
Repeated runs should not accumulate unreleased memory.
Additional information
No response
What version of Codex CLI is running?
0.106.0
What subscription do you have?
Azure OpenAI
Which model were you using?
gpt-5.1-codex
What platform is your computer?
Linux 5.14.0-503.22.1.el9_5.x86_64 x86_64 x86_64
What terminal emulator and version are you using (if applicable)?
No response
What issue are you seeing?
When running the codex-cli in non-interactive mode, memory used by the process is not reclaimed after shutdown.
In our case it's running inside a Debian-based Docker container (hosted on a RHEL VM) and repeating the process eventually exhausts memory and causes the sandbox container to be killed by OOM.
This appears to be a memory leak.
What steps can reproduce the bug?
Run codex-cli in non-interactive mode multiple times (example command):
codex exec --json --dangerously-bypass-approvals-and-sandbox {prompt}What is the expected behavior?
After each codex-cli invocation exits, memory usage should return to the baseline (previous) free memory level.
Repeated runs should not accumulate unreleased memory.
Additional information
No response