[Windows Desktop] Reopening chats eagerly restores every persisted in-app-browser tab, adding ~3.2 GB RAM
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- PR merge metrics
- PR metrics pending
Description
What version of the Codex App are you using?
OpenAI.Codex 26.810.6296.0 (x64)
What subscription do you have?
ChatGPT subscription. The exact tier is omitted because it does not appear relevant to the reproduction.
What platform is your computer?
- Windows 11 Home Single Language
- Version/build:
10.0.26200 - Architecture: x64
- Physical RAM: 15.69 GB
What issue are you seeing?
Reopening an existing chat that contains persisted in-app-browser tabs immediately restores and appears to hydrate every saved page, including inactive tabs that the user does not select.
Opening two existing chats with 13 persisted in-app-browser tabs in total caused a large increase in renderer, app-server, and browser-helper processes and placed a 16 GB Windows system under severe memory pressure.
Observed measurements:
| Process group | Before opening the chats | After opening the chats | Change |
|---|---|---|---|
| ChatGPT | 10 processes / 2,815.1 MB | 32 processes / 5,053.4 MB | +22 processes / +2,238.3 MB |
| Codex app server | 2 processes / 1,146.5 MB | 4 processes / 1,998.3 MB | +2 processes / +851.8 MB |
| Browser helper processes | 13 processes / 147.8 MB | 25 processes / 267.3 MB | +12 processes / +119.5 MB |
| Combined process working set | ~4.11 GB | ~7.32 GB | ~+3.21 GB |
| System physical-memory usage | 84.0% | 93.4% | +9.4 percentage points |
The combined working-set total includes shared pages and the cost of hydrating the chats themselves, so it should not be interpreted as an exact private-memory delta attributable only to browser tabs. However, the sharp increase in renderer/helper process count happens at the same time the persisted browser tab strips are restored.
The memory remained approximately stable during a short sample before reopening the chats. The problem is high eager allocation rather than a continuously increasing leak during that sample.
What steps can reproduce the bug?
- Start Codex Desktop on Windows.
- Open a chat with no restored in-app-browser tabs and record the process count/memory.
- Open an older chat that previously retained several in-app-browser tabs. In this reproduction, the first chat restored approximately 11 tabs.
- Open a second older chat with persisted browser state. The second chat restored 2 tabs.
- Do not select or interact with most of the restored tabs.
- Observe that the tab strips/pages are restored immediately and that ChatGPT renderer, Codex app-server, and browser-helper process counts increase substantially.
- Observe system memory pressure. On a 15.69 GB machine, physical-memory usage increased from 84.0% to 93.4%.
No active task needs those inactive pages at the time they are restored.
What is the expected behavior?
Persisted browser state should be restored in a resource-bounded way:
- Restore tab metadata/title/URL without eagerly hydrating every inactive page.
- Hydrate only the selected tab on demand.
- Suspend or discard inactive webviews.
- Freeze or release browser webviews belonging to chats that are no longer active.
- Apply a global inactive-tab limit or LRU policy so opening historical chats cannot exhaust memory.
What is the actual behavior?
All persisted browser tabs appear to be restored as live browser surfaces when their chat is opened. Renderer and helper processes accumulate across chats and remain resident, causing severe memory pressure.
Related issue
- #38308 reports embedded-browser tab/process accumulation and crashes during tab finalization. This report is related but distinct: the trigger here is reopening chats with persisted browser state, and the observed failure is eager restoration and memory pressure even without finishing a task or reproducing a crash.
Additional information
Screenshots, chat names, visited domains, session transcripts, and raw logs are intentionally not attached because they contain private browsing and project metadata. Sanitized measurements can be expanded if maintainers need a specific diagnostic.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing persisted browser-state restoration when an existing chat is reopened, across the Codex Desktop renderer, app-server, and browser-helper processes. Compare how inactive tabs are hydrated and retained, then verify that only the selected tab is hydrated and that inactive webviews are bounded or released without restoring chats causing severe memory pressure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop, performance
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100