codex - 💡(How to fix) Fix Windows: memory usage spikes and Codex freezes after repeated context compactions

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

On Windows, Codex can become unresponsive after a long-running thread has gone through multiple automatic context compactions. Memory usage then climbs quickly and can exhaust available RAM.

Root Cause

On Windows, Codex can become unresponsive after a long-running thread has gone through multiple automatic context compactions. Memory usage then climbs quickly and can exhaust available RAM.

RAW_BUFFERClick to expand / collapse

Summary

On Windows, Codex can become unresponsive after a long-running thread has gone through multiple automatic context compactions. Memory usage then climbs quickly and can exhaust available RAM.

Environment

  • Platform: Windows
  • App: Codex Desktop
  • Version: not captured yet

Steps to reproduce

  1. Start a long-running thread in Codex Desktop on Windows.
  2. Continue working until automatic context compaction runs several times.
  3. Keep using the same thread after each compaction.
  4. Watch Codex memory usage in Task Manager.

Actual behavior

  • After several compactions, the UI can freeze or stop responding.
  • Codex memory usage rises rapidly.
  • The machine can get close to running out of memory.
  • Recovery usually requires killing or restarting Codex, and the same thread may remain difficult to use.

Expected behavior

Codex should stay responsive after repeated context compactions. Memory used by old thread state should be released or bounded instead of growing until the app or system becomes unusable.

Notes

This looks related to #14472 and #19381, but the trigger here is repeated context compaction in the same long-running Windows session, followed by rapid memory exhaustion.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Codex should stay responsive after repeated context compactions. Memory used by old thread state should be released or bounded instead of growing until the app or system becomes unusable.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Windows: memory usage spikes and Codex freezes after repeated context compactions