Windows Codex causes system-wide memory growth through unaccounted shared/GPU memory
What version of the Codex App are you using (From “About Codex” dialog)?
26.707.3748.0
What subscription do you have?
api
What platform is your computer?
Windows 11 64-bit on a Lenovo Legion R7000P APH8 (82Y9)
What issue are you seeing?
Summary
On Windows, leaving the Codex desktop app open for about one hour causes system memory usage to continuously increase, even when the app is idle. Eventually, Windows becomes unresponsive and Task Manager may also freeze.
The abnormal memory growth is not reflected in the private memory of the Codex processes.
Environment
- OS: Windows 11 64-bit
- Codex desktop version: 26.707.3748.0
- Device: Lenovo Legion R7000P APH8
- Physical memory: 16 GB
- CPU/GPU:
- AMD Radeon 780M integrated graphics
- NVIDIA GeForce RTX 4060 Laptop GPU
- Codex architecture: Electron desktop app with GPU acceleration
- MCP configuration: empty (
[mcp_servers]contains no servers)
Reproduction
- Start Codex on Windows.
- Leave Codex open for approximately one hour.
- Do not run any task or tool.
- Monitor Windows memory usage and system commit charge.
- The issue reproduces even when Codex is idle.
Observed behavior
Before the system became unresponsive:
- Physical memory usage reached approximately 95% to 99%.
- Available physical memory dropped to approximately 100 MB.
- Windows Explorer, Task Manager, mouse movement, and desktop switching became extremely slow or unresponsive.
- CPU, disk, and network utilization were not saturated.
The following values were captured by a 10-second system monitor:
| Metric | Initial | Before failure |
|---|---:|---:|
| System committed memory | 12.84 GB | 21.19 GB |
| Available physical memory | ~5.4 GB | ~0.1 GB |
| Total private memory of all processes | ~5.80 GB | ~5.81 GB |
| Nonpaged pool | 848 MB | 1.46 GB |
| Paged pool | 579 MB | 814 MB |
The most important observation is that system commit increased by approximately 8.34 GB, while total process private memory increased by only approximately 10.6 MB.
At the same time:
ChatGPT.exeremained around 0.9 GB.codex.exeremained around 25 MB.- No normal user-mode process accounted for the missing committed memory.
Additional evidence
The machine uses a hybrid AMD/NVIDIA graphics configuration. The AMD Radeon 780M driver was originally:
- Version:
31.0.14005.22001 - Date:
2023-11-08
After updating the AMD driver to:
- Version:
32.0.31021.5001 - AMD Adrenalin:
26.6.4 WHQL
and rebooting, physical memory usage became stable during subsequent testing.
This suggests that Codex's Electron GPU/DirectX rendering path may be triggering a shared-memory, graphics-memory, or driver-level allocation leak. However, I cannot identify the exact driver pool tag yet.
Mitigation
Updating the AMD Radeon 780M driver and rebooting significantly improved the issue. I also tested with plugins disabled and Codex cache reset, but those changes alone did not resolve the problem.
Expected behavior
Codex should not continuously increase system commit charge while idle. GPU/shared memory and kernel allocations should be released when renderer surfaces are no longer in use.
Request
Could the Codex team investigate:
- GPU process memory and shared memory allocations over time
- DirectX/DXGI resource lifetime in the Windows Electron renderer
- Interaction with hybrid AMD/NVIDIA graphics systems
- Whether renderer or GPU-process resources are released correctly while Codex is idle
- Whether a built-in memory diagnostic or automatic renderer restart could be added when memory growth is detected
I can provide the monitoring CSV files and additional diagnostic data after removing personal paths and account information.
What steps can reproduce the bug?
Reproduction
- Start Codex on Windows.
- Leave Codex open for approximately one hour.
- Do not run any task or tool.
- Monitor Windows memory usage and system commit charge.
- The issue reproduces even when Codex is idle.
What is the expected behavior?
<img width="1584" height="1028" alt="Image" src="https://github.com/user-attachments/assets/55314064-aaa4-4123-b97c-c687a5d82eb3" />
<img width="1578" height="1012" alt="Image" src="https://github.com/user-attachments/assets/a0f918c0-ab56-4e5f-b89c-930691928ad1" />
Additional information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗