What version of the Codex App are you using (From “About Codex” dialog)?
Version 26.422.30944 (2080)
What subscription do you have?
Pro
What platform is your computer?
Darwin 25.4.0 arm64 arm
What issue are you seeing?
Possibly related to the high resource usage being reported:
During extended use (~4 hours, ~7 sessions without restarting Codex), a Python process spawned by Codex grew to extremely high memory usage (~135 GB in Activity Monitor), causing heavy swap usage (~25 GB) and system degradation (UI lag, audio crackling).
Restarting Codex immediately resolved the issue, suggesting the process was not being cleaned up or was accumulating state over time.
It's unclear whether this is:
- a memory leak in a long-running Python process
- multiple Python runtimes not being terminated between sessions
- or unbounded in-memory data accumulation during agent execution
Environment:
- macOS 26.4.1
- Codex: GPT-Codex 5.3 (Medium)
- Project located in OneDrive (high file churn, though .git has been externalised)
- Continuous usage without restart
Additional notes:
- I attempted to reproduce by re-running Python3 tasks in a fresh session, but memory usage remained stable.
- This suggests the issue may be tied to long-lived processes or cumulative session state rather than a single execution.
Happy to provide logs if someone can point me to the relevant locations (Python subprocess logs, Codex agent logs, etc).
Steps to reproduce
Session ID: 019dbfe9-110f-78a0-8ba7-c23328b7063e
Context: ~149K / 258K token window
Duration: ~4 hours, ~7 sessions without restarting Codex
Prompt issued:
"Can you go through the CORE code as all CORE pages are broken and no longer show the models, data etc; this happened after the ML learn profiles were made."
Notes:
- "CORE" refers to a relatively small internal module responsible for aggregating and displaying data from other modules / SQLite DBs.
- It is not a large codebase or memory-intensive component.
Codex executed:
$ python3 -m py_compile engine/core/elora_core/service.py engine/admin/elora_core/pages.py engine/api/admin_routes/elora_core.py engine/api/routes_admin.py 2>&1 | sed -n '1,200p
Observed behaviour:
- After this command (and subsequent Python3 calls), memory usage from a Python process increased continuously.
- Memory eventually reached ~135GB, with ~25GB swap usage.
- System became unstable (UI lag, audio crackling).
- No additional tasks were running at the time.
Additional context:
- System had already been under load from earlier Codex activity (high CPU usage and slowdown observed prior).
- Activity Monitor became difficult to use during the spike, suggesting cumulative resource exhaustion over the session.
- Re-running similar Python commands after restarting Codex did NOT reproduce the issue, suggesting it is tied to long-lived session state rather than the command itself.
Expected behaviour
- Python subprocesses should use minimal and bounded memory for compilation commands like
py_compile.
- Memory usage should be released after execution.
- No unbounded growth should occur from repeated or sequential Python calls.
Additional information
- This behaviour does not occur on the same codebase when run outside Codex (e.g. on a live server).
- No Python errors were thrown during execution.
- Suggests possible memory leak, uncollected subprocess state, or accumulation across Codex sessions.
Happy to provide logs or process samples if directed to the correct locations. - Edited to add more information.
What version of the Codex App are you using (From “About Codex” dialog)?
Version 26.422.30944 (2080)
What subscription do you have?
Pro
What platform is your computer?
Darwin 25.4.0 arm64 arm
What issue are you seeing?
Possibly related to the high resource usage being reported:
During extended use (~4 hours, ~7 sessions without restarting Codex), a Python process spawned by Codex grew to extremely high memory usage (~135 GB in Activity Monitor), causing heavy swap usage (~25 GB) and system degradation (UI lag, audio crackling).
Restarting Codex immediately resolved the issue, suggesting the process was not being cleaned up or was accumulating state over time.
It's unclear whether this is:
Environment:
Additional notes:
Happy to provide logs if someone can point me to the relevant locations (Python subprocess logs, Codex agent logs, etc).
Steps to reproduce
Session ID: 019dbfe9-110f-78a0-8ba7-c23328b7063e
Context: ~149K / 258K token window
Duration: ~4 hours, ~7 sessions without restarting Codex
Prompt issued:
"Can you go through the CORE code as all CORE pages are broken and no longer show the models, data etc; this happened after the ML learn profiles were made."
Notes:
Codex executed:
$ python3 -m py_compile engine/core/elora_core/service.py engine/admin/elora_core/pages.py engine/api/admin_routes/elora_core.py engine/api/routes_admin.py 2>&1 | sed -n '1,200p
Observed behaviour:
Additional context:
Expected behaviour
py_compile.Additional information
Happy to provide logs or process samples if directed to the correct locations. - Edited to add more information.