[Windows Desktop] Progressive memory growth during an automated SSH research workflow makes Windows unusable after 10+ hours

Open 💬 3 comments Opened Aug 11, 2026 by Zack2006
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of the Codex App are you using?

Codex Desktop 26.803.5235.0

What subscription do you have?

ChatGPT Pro (US$200/month)

What platform is your computer?

  • OS: Windows 11 Pro 25H2, Build 26200.8973, x64
  • CPU: Intel Core Ultra 9 185H
  • RAM: 32 GB
  • Integrated GPU: Intel Arc Graphics, driver 32.0.101.8132
  • Discrete GPU: NVIDIA GeForce RTX 4070 Laptop GPU, driver 32.0.16.1074

What issue are you seeing?

I run an automated scientific research experiment workflow. The server administrators do not permit installing Codex on the server, so Codex Desktop runs only on my local Windows computer. No Codex component is installed on the remote server; all communication between local Codex and the server is performed over SSH.

I maintain a local working directory as a staging area for planning documents, experimental code, and related documentation. Based on the planning documents, Codex designs and builds the code required for the experiments, updates files in the local staging directory, and then uses SSH to synchronize or update files on the server, launch experiment commands, monitor execution, inspect results, modify the implementation, and continue iterating.

This is primarily an automated, long-running workflow rather than a single interactive SSH session. It continuously produces local file operations, SSH tool calls, terminal output, monitoring output, and persistent task history.

During this workflow, Codex memory usage grows gradually and is not adequately reclaimed. The Codex UI becomes progressively slower, followed by severe system-wide memory pressure. Closing unrelated applications temporarily creates free memory, but Codex gradually consumes the available headroom again.

Abnormal memory growth and UI latency usually become noticeable after several hours. After more than ten hours of continuous operation, Codex and Windows can become so unresponsive that normal mouse movement is no longer possible.

Read-only process measurements

Measurements collected while the problem was occurring showed:

  • The combined Codex/ChatGPT process tree retained approximately 8.9 GB of private committed memory.
  • The largest ChatGPT.exe renderer retained approximately 5.7 GB of private memory and 2.1 GB of working set.
  • The codex.exe app-server retained approximately 2.0 GB of private memory.
  • The GPU process retained approximately 0.48 GB of private memory. A short GPU sample averaged about 23% utilization and peaked around 30%.
  • Node helper processes used approximately 26 MB in total.
  • SSH client processes used approximately 29 MB in total. SSH itself was therefore not the direct multi-gigabyte memory consumer.
  • During a 15-second process sample, the large renderer remained near its 5.7 GB retained baseline. The app-server increased by approximately 8 MB.
  • Windows reported the processes as responding even though the Codex interface was noticeably delayed.
  • No git.exe process was captured during 206 high-frequency polls over 15 seconds. There was no evidence of a repeating git status or git ls-files --others loop during the sample.

Persistent storage measurements

  • Persistent local session-history files occupied approximately 9.2 GB on disk.
  • Multiple individual session files exceeded 1 GB.
  • One active session file was approximately 0.5 GB and was still growing.
  • The local logs SQLite database was approximately 0.85 GB.
  • Its WAL was approximately 6 MB and remained stable during a 15-second sample.
  • Windows Error Reporting recorded a RADAR_PRE_LEAK_64 event for codex.exe.

The session-history files and SQLite database are disk usage rather than RAM usage. However, their size may explain the app-server and renderer memory retention if large histories are repeatedly loaded, deserialized, copied, indexed, rendered, or retained after context compaction.

System-level memory measurements

A simultaneous Windows memory snapshot showed:

  • Approximately 59.3 GiB of committed memory in use out of a 71.1 GiB commit limit.
  • Approximately 5.5 GiB of physical memory remaining.
  • Approximately 17.4 GiB of paged kernel pool.
  • Approximately 3.2 GiB of nonpaged kernel pool.
  • The dominant pool tag, Vi54, accounted for approximately 13.2 GB and continued growing slowly.
  • Windows Driver Verifier was disabled and no drivers were being verified.

The Codex process tree directly accounts for approximately 9 GB of private committed memory. The unusually large Windows kernel pools account for a substantial part of the remaining system-wide pressure.

Ownership of the kernel allocation has not been established, so I am not claiming that Codex directly owns it. However, it occurs alongside the long-running Codex workload and should be investigated as a possible secondary Chromium, GPU, networking, SSH, or virtualization-related allocation path.

Technical assessment

The symptoms suggest that large task histories or tool outputs may be retained at multiple layers:

  1. persistent rollout/session storage;
  2. deserialized app-server history;
  3. serialized data transferred between the app-server and renderer;
  4. renderer-side terminal and tool-output objects; and
  5. possible secondary allocations in Windows graphics, networking, or virtualization paths.

Context compaction appears to reduce the model context but does not appear to place an effective bound on persisted history, renderer state, or app-server memory associated with the active task.

This resembles the eager full-rollout loading reported in #25215. That report describes paths that read an entire rollout before returning bounded results. This case suggests that the same class of behavior may also affect an active task, not only the resume or task-list path.

An actionable investigation would be to check rollout loading and task-history paths for:

  • whole-file reads such as read_to_string;
  • collection of the complete history into Vec<RolloutItem>;
  • repeated full-history loading after context compaction;
  • duplicate serialization between the app-server and renderer;
  • retention of completed terminal/tool output in renderer state; and
  • task-list or sidebar refreshes that hydrate more history than the UI requires.

What steps can reproduce the bug?

  1. Run Codex Desktop locally on a Windows machine with 32 GB of RAM.
  2. Create a local working directory containing experiment planning documents, code, and related documentation.
  3. Use Codex to read the planning documents and automatically construct the required experimental code.
  4. Have Codex communicate with a remote server exclusively through SSH. No Codex component is installed on the server.
  5. Repeatedly use SSH to update server files, launch experiments, monitor running commands, retrieve results, and iterate on the code.
  6. Allow the task to undergo context compaction while continuing to use it.
  7. Continue the automated workflow for several hours without restarting Codex Desktop.
  8. Switch between tasks or continue using the same task.
  9. Observe the growth of persistent session-history files and retained renderer/app-server memory.
  10. Close unrelated applications to temporarily free memory.
  11. Continue using Codex and observe that the newly available memory is gradually consumed again.
  12. After several hours, observe abnormal memory growth and increasing UI latency.
  13. Continue the workflow for more than ten hours.
  14. Observe severe system-wide responsiveness problems, eventually including heavily delayed or unusable mouse movement.

The reproduction does not require a Git polling loop, a large Node process, or high direct memory consumption by the SSH client.

What is the expected behavior?

  • Completed terminal and tool output should not remain fully materialized in renderer memory.
  • Large output should be virtualized, paged, truncated, or moved to bounded backing storage.
  • Active-task, resume, list, and compaction paths should use streaming or indexed access instead of loading an entire multi-gigabyte history into memory.
  • Context compaction should create a durable storage checkpoint so that pre-compaction records do not need to be repeatedly hydrated.
  • Large session histories should be safely segmented or rotated without losing user work.
  • Renderer and app-server memory should be released when task data becomes inactive or is no longer visible.
  • One large task should not degrade unrelated tasks or the entire desktop application.
  • A single oversized or corrupted task history should be isolated from the sidebar, task list, and other active tasks.
  • Local log retention and SQLite growth should have documented and configurable bounds.
  • Codex should warn before a task reaches a history size known to cause unsafe memory use.
  • Diagnostic counters should distinguish stored history size, deserialized app-server memory, renderer memory, GPU memory, and terminal-output retention.
  • Completed SSH commands and monitoring operations should not cause unbounded retained history or renderer objects.
  • The interaction between long-running Codex activity and abnormal Windows kernel-pool growth should be investigated.

Please investigate both:

  1. app-server rollout/history loading, deserialization, copying, indexing, and retention; and
  2. renderer-side retention of terminal/tool-output objects after command completion, context compaction, or task switching.

Additional information

Potentially related reports:

This report combines four symptoms that may share a common lifecycle problem:

  • multi-gigabyte persistent task history;
  • high app-server memory;
  • high renderer memory; and
  • system-level memory pressure while the automated task remains active.

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 16 days ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #37811
  • #37584
  • #36749

Powered by Codex Action

Zack2006 · 16 days ago

Thank you. I reviewed all three suggested issues carefully. They are related, but I do not believe #38048 should be closed as a duplicate at this stage because the reproduction path, memory topology, time scale, and failure mode differ materially.

Version and distribution clarification

This report concerns the official Windows Codex Desktop distribution installed from the Microsoft Store:

  • Microsoft Store/MSIX package: OpenAI.Codex 26.803.5235.0
  • The reported version is the Store package version, not the standalone GitHub Codex CLI release number.
  • OpenAI's documentation explicitly notes that Codex Desktop and Codex CLI can contain different Codex versions and may receive features at different times: https://learn.chatgpt.com/docs/reference/troubleshooting#feature-is-working-in-the-codex-cli-but-not-in-the-chatgpt-desktop-app
  • No Codex component is installed on the remote server.
  • No separately installed standalone Codex CLI from the GitHub release or npm package is involved in the reproduction. All measured ChatGPT.exe renderer, codex.exe app-server, session-history, and local database activity comes from the local Microsoft Store Desktop installation and its bundled runtime.
  • SSH is only the transport used by the local Desktop task to update files, start experiments, monitor commands, and retrieve results from a server that does not run Codex.

This version boundary matters because a fix present in a GitHub CLI release is not necessarily present in the Microsoft Store Desktop package or its bundled app-server/renderer stack.

SSH-specific trigger or amplifier

The current evidence does not show that the OpenSSH client itself is consuming the missing memory: all observed SSH client processes together used only approximately 29 MB. Therefore, this report should not be interpreted as a claim that ssh.exe directly leaks multiple gigabytes.

However, the SSH-driven workflow may be a specific trigger or amplifier that is not exercised by ordinary local-only Codex use. The workload repeatedly or continuously:

  • starts remote commands through SSH;
  • keeps monitoring commands active for extended periods;
  • receives terminal and status output over long-lived or repeated connections;
  • synchronizes updated experiment files;
  • records the corresponding tool calls and outputs in one active task; and
  • continues across context compactions for several hours.

That pattern may expose a lifecycle defect in Codex's handling of terminal streams, child-process state, completed tool-output objects, app-server history, or renderer state even though the SSH processes themselves remain small.

A useful isolation test would compare:

  1. a local-only workflow producing equivalent output and history;
  2. repeated short-lived SSH commands;
  3. long-lived SSH monitoring commands with continuous or periodic output; and
  4. the same SSH workload before and after context compaction or task switching.

This would distinguish an OpenSSH process leak from a Codex terminal/output/session-retention bug triggered by SSH-heavy automation.

Comparison with the suggested duplicates

Candidate issue #37811

What the candidate issue (#37811) reports
  • The same Microsoft Store/MSIX package is used.
  • After extended use, the complete process tree retains approximately 2.35 GB.
  • The app-server itself retains approximately 96 MB, with approximately 255 MB for the app-server and descendants.
  • Its largest renderer remains below 1 GB.
  • Its 15-second sample is explicitly described as a high but nearly flat retained baseline.
  • It does not report system-wide memory exhaustion.
What this report (#38048) reports
  • The complete Codex/ChatGPT tree retains approximately 8.9 GB.
  • A single renderer retains approximately 5.7 GB.
  • The app-server itself retains approximately 2.0 GB.
  • Persistent session history occupies approximately 9.2 GB on disk, with multiple individual files above 1 GB.
  • Windows recorded RADAR_PRE_LEAK_64 for codex.exe.
  • Paged and nonpaged kernel pools simultaneously reached approximately 17.4 GiB and 3.2 GiB.
  • After more than ten hours, the entire Windows session can become so unresponsive that normal mouse movement is no longer possible.
Why this report (#38048) should not be closed as a duplicate of the candidate issue (#37811) at this stage

#37811 may share a renderer-retention root cause, but it does not cover the app-server, multi-gigabyte active-history, kernel-pool, and complete system-exhaustion dimensions observed in #38048. It may represent a related lower-scale symptom rather than the same complete failure mode.

Candidate issue #37584

What the candidate issue (#37584) reports
  • The failure occurs on the same Microsoft Store/MSIX package family.
  • The UI and backend rapidly become desynchronized.
  • Project threads show infinite spinners.
  • The UI process exits silently.
  • The backend continues completing work even after the renderer stops displaying results.
What this report (#38048) reports
  • A silent crash is not required.
  • Memory grows gradually over several hours while the automated task remains active.
  • The app-server itself retains approximately 2.0 GB, so this is not a healthy low-memory backend behind a failed renderer.
  • The terminal and UI can remain technically reported as "responding" while latency continues worsening.
  • The eventual failure is system-wide memory pressure that makes Windows nearly unusable.
Why this report (#38048) should not be closed as a duplicate of the candidate issue (#37584) at this stage

The two issues may involve the same Store package, but their lifecycle and affected layers differ. #37584 is primarily a rapid UI/backend desynchronization and silent-exit failure, whereas #38048 is a long-duration renderer, app-server, history, and system-memory exhaustion condition.

Candidate issue #36749

What the candidate issue (#36749) reports
  • The platform is macOS with 8 GB of physical memory.
  • The trigger is resuming one large thread after a fresh application restart.
  • The main codex process grows from approximately 116 MB to 13.82 GB in about two minutes.
  • Renderer processes remain comparatively small.
  • The failure is concentrated in the cold resume path.
What this report (#38048) reports
  • The platform is Windows with 32 GB of physical memory.
  • The trigger is a still-active automated task, not a cold resume.
  • Growth develops over several hours while SSH-driven experiment iterations continue.
  • The largest user-space allocation is approximately 5.7 GB in one renderer, with an additional approximately 2.0 GB in the app-server.
  • Persistent local history continues growing through context compaction.
  • The failure includes correlated abnormal Windows kernel-pool pressure.
Why this report (#38048) should not be closed as a duplicate of the candidate issue (#36749) at this stage

The platform, trigger, allocation distribution, and time profile are different. #36749 demonstrates rapid main-process growth during macOS resume; #38048 demonstrates gradual multi-layer retention during an active Windows automation workflow.

Why this issue should remain independently tracked

This is not merely a high idle baseline or a transient spike. It is a progressive resource-exhaustion condition in an expected long-running automation workflow:

  1. Codex reads planning documents and constructs experimental code locally.
  2. It uses SSH to update a server, launch experiments, monitor execution, inspect results, and iterate.
  3. This continues for hours and repeatedly produces terminal/tool output and persistent task history.
  4. Abnormal memory growth becomes visible after several hours.
  5. Closing unrelated applications only provides temporary headroom; Codex gradually consumes the newly available memory again.
  6. After more than ten hours, the 32 GB Windows system can become effectively unusable.

Please keep #38048 open until maintainers determine whether this is:

  • a distinct active-session retention path;
  • an extreme-scale manifestation of #37811; or
  • a combined renderer/app-server/history lifecycle defect with an additional Windows kernel-side interaction.

If maintainers ultimately consolidate it with another issue, please preserve the following scope in the canonical issue:

  • active-session growth rather than resume-only growth;
  • Microsoft Store Desktop package 26.803.5235.0;
  • approximately 5.7 GB in one renderer;
  • approximately 2.0 GB in the app-server;
  • approximately 9.2 GB of persistent session history;
  • context compaction not bounding stored or in-memory state;
  • correlated abnormal Windows kernel-pool growth; and
  • complete system usability loss after prolonged operation.
shleder · 11 days ago

The multi-GB persisted-history shape here is useful for field validation. I’m testing codex-rescue==0.1.0a4 against large session stores and oversized rollouts, independently of the Desktop renderer memory leak itself.

If you still have the affected local state, a read-only first pass would be:

pipx install codex-rescue==0.1.0a4
codex-rescue sessions
codex-rescue doctor --json "/path/to/one-large-affected-rollout.jsonl"

It won’t repair renderer/app-server RAM retention, but it can report structural, compaction, unfinished-call, and size-related evidence in the durable transcript.

Please share only sanitized status/findings/aggregate counts; no raw JSONL, SQLite DBs, prompts, SSH/tool output, credentials, repository contents, session IDs, or private paths.