openai / openai/codex

Codex Renderer is consuming excessive memory

Open
#38,176 4 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug performance
Dominant language
Rust
Stars
125k
Forks
19.5k
PR merge metrics
PR metrics pending

Description

What version of the Codex App are you using (From “About Codex” dialog)?

26.803.41515

What subscription do you have?

ChatGPT Pro 20x

What platform is your computer?

arm64

What issue are you seeing?

The Codex Renderer processes are consuming an excessive amount of memory.

This may be related to conversations becoming very large over time. A long conversation contains a significant amount of scrollable content, and it appears that too much of this content may remain loaded or rendered in memory. Implementing more efficient list virtualization, lazy rendering, or pagination could potentially reduce the memory usage of long conversations.

I am also not sure why two separate Codex Renderer processes are running at the same time, or whether both processes are contributing to the excessive memory consumption.

Codex Renderer processes consuming excessive memory
What steps can reproduce the bug?
  1. Open or continue using a conversation that contains a large number of messages.
  2. Scroll through the conversation or continue adding messages.
  3. Check the application's memory usage in the system process monitor.
  4. Observe that the Codex Renderer processes consume an excessive amount of memory.

The exact conditions that trigger the issue are currently unclear.

What is the expected behavior?

Memory usage should remain within reasonable limits, even when a conversation contains a large number of messages. Content that is not currently visible should not remain fully rendered in memory unnecessarily.

Additionally, the application should not run multiple renderer processes unless they are required.

Additional information

The issue appears to become more noticeable as the conversation grows longer.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with a conversation containing many messages, then monitor Codex Renderer processes and memory usage in the system process monitor while scrolling and adding messages. The exact renderer entry point and tests are not identified in the issue. Done means memory remains within reasonable limits for long conversations and unnecessary renderer processes are not running.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.