Repository navigation
Description
What version of the Codex App are you using (From “About Codex” dialog)?
Codex Desktop 26.1007.30912, build 20156 (read from the installed app's Info.plist).
Bundled CLI/app-server: codex-cli 0.162.0-alpha.17.2.
What subscription do you have?
Not included in this public diagnostic report.
What platform is your computer?
macOS 15.5, Apple silicon, 16 GiB RAM.
uname -mprs: Darwin 24.5.0 arm64 arm.
What issue are you seeing?
Completed, idle chats retain separate local tool runtimes for a long time while the Mac is already under yellow memory pressure. Opening historical chats also initializes additional helper batches. Users cannot easily distinguish active work from retained idle runtimes or release one idle chat's resources while keeping its history and normal sidebar position.
This report is deliberately about expensive idle retention and safe reclamation, not a proven unbounded memory leak. Automatic cleanup DID occur during observation.
Measurements on 2026-10-12
Initial system snapshot:
- Activity Monitor: about 13.7 GB used out of 16 GB, yellow memory pressure.
- Compressed memory: about 6.4–7.5 GiB across samples.
- Swap initially about 665–673 MiB; later about 4.0 GiB during a period that included browsing historical chats. Other apps were also running, so this is not attributed exclusively to Codex.
- Codex-owned executable processes: roughly 6.5–7.0 GiB summed physical-footprint accounting initially.
A representative breakdown:
- 13 renderer processes: approximately 3.3 GiB.
- 9 code-review service instances: approximately 781 MiB.
- 9 desktop app-tools service instances: approximately 379 MiB.
- Other computer-use/REPL helpers: approximately 1 GiB.
- Most tool helpers showed negligible CPU-time changes in a 35-second sample.
By correlating process creation times, parent/child relationships, thread start/resume logs, and live thread status, two completed idle chats could be associated with:
- Chat A: 8 tool/runtime processes, approximately 423 MiB.
- Chat B: 5 tool/runtime processes, approximately 164 MiB.
Both chats' most recent turns were completed. A separate active task and the diagnostic chat were deliberately preserved; no processes were killed and the app was not restarted.
Cleanup evidence and limits
- After the user closed two embedded pages, renderer count fell from 13 to 11 and old renderer PIDs disappeared. Thus not all renderers were leaked, and renderer count is not equivalent to visible tab count.
- Logs later recorded successful
thread/unsubscribeoperations for some idle chats; their helper groups exited. - Chat B subsequently became
notLoadedand all 5 associated helpers were absent. Chat A still retained approximately 422 MiB in 8 helpers at the last check. - The helper exits establish lifecycle cleanup, not an equivalent measured drop in system-wide physical RAM.
- During historical-chat browsing, new helper batches aligned with
thread/resumeevents. Codex process footprint rose substantially during that interval, but ongoing activity prevents treating this as an isolated A/B measurement.
Read-only inspection of this installed build's frontend bundle found an inactive-thread unsubscriber with a 10,800,000 ms (3-hour) idle TTL and a cap of 10 eligible inactive owner threads. Active views, stream followers and running work are excluded. This is an implementation clue, not proof that every retained process is abandoned or that all memory-pressure handling is absent.
What steps can reproduce the bug?
Observed workflow, rather than a clean-room minimal reproduction:
- Use several local chats with bundled desktop tools/code-review and computer-use/REPL facilities.
- Finish work in some chats while leaving another task running.
- Switch away from completed chats; inspect their helper process groups and live thread status.
- Open several historical chats without starting new user tasks.
- Observe new helper batches correlated with thread resume, and idle groups remaining resident.
- Close embedded pages separately and compare renderer exit behavior with tool-runtime retention.
- Observe eventual automatic unsubscribe and helper exit without terminating active work.
What is the expected behavior?
- Bound retained idle runtime memory, especially on a 16 GiB machine under memory pressure.
- Start tool servers lazily or safely reuse them where appropriate.
- Reclaim eligible idle runtimes more promptly under pressure.
- Provide a supported “Release idle runtime” action that preserves chat history AND normal sidebar placement, and refuses to unload running tasks or live dependencies.
- Show chat-to-process/resource ownership so users can understand what will be released.
- Avoid requiring whole-app restart, forced process termination, or chat archival merely to reclaim idle resources.
Additional information
Related: #44996 and #51649. This newer macOS report adds observed successful cleanup, measured per-idle-chat groups, and a specific retention-policy/release-control concern; it does not claim the same unbounded failure mechanism as those reports.
Memory methodology: macOS proc_pid_rusage with RUSAGE_INFO_V2 / ri_phys_footprint, plus ps, vm_stat, sysctl, Activity Monitor and sanitized app lifecycle metadata. Summed footprints are process accounting (including compressed-memory charges), not a promise of uniquely reclaimable resident RAM.
Private chat titles/IDs, project paths, credentials, full transcripts and raw logs have been omitted. No heap dump, forced-GC test, controlled restart comparison or exhaustive UI audit was performed. The available automation tools exposed archival but no standalone runtime-release operation; that alone does not prove no such action exists anywhere in the UI.
Activity
github-actions commentedon Oct 12, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
scefali commentedon Oct 21, 2026
[Codex Assisted] Related evidence from my report #53562, now on ChatGPT/Codex 26.1013.40934 (build 20770), macOS with 64 GiB RAM: an October 21 snapshot showed 46
Codex (Renderer)processes totaling about 11 GiB RSS, with the largest at about 2.73 GiB. The bundled Codex CLI was separately about 3.49 GiB RSS. This does not identify which processes belong to idle chats, and summed RSS can count shared pages more than once. My earlier report verified one visible window during similar renderer accumulation. I support a safe, non-archiving way to release eligible inactive chats' runtimes, plus a supported chat-to-process/resource view. I cannot establish that this has the same root cause as the helper retention documented here.erikhhansen commentedon Oct 22, 2026
macOS: expensive completed-helper retention under memory pressure
Additional macOS measurements from 21–22 October 2026, submitted with the user's authorization. Related to #51649. Times below are CAT (UTC+02:00).
Environment
Observed behaviour
Completed delegated helpers retain separate tool environments while the application remains running. The original app and backend process identities stayed unchanged throughout the measurements.
On 21 October, disabling composer predictions through the app's setting and allowing four tracked temporary cohorts to retire naturally coincided with a Codex-family footprint change from 12.497 GiB / 218 processes to approximately 9.675 GiB / 156 processes and pressure returning from warning to normal. Other work continued, so the entire net change is not an isolated causal estimate.
On 22 October, four completed delegated helpers still had identifiable tool-process cohorts. Their last recorded turns had completed earlier, but server logs showed them resumed without active turns at approximately 08:18 CAT. We cannot identify which client owned that connection or the exact retention condition.
With explicit user approval, each child was archived separately after verifying idle/completed status and no registered shell work or recorded descendants:
The final measured state at 09:24 CAT had normal memory pressure and no new swap-outs during the approximately two-minute final batch observation. Pressure was already normal before the last three archives, so that improvement is not attributed to those three actions.
Interpretation and limits
These measurements establish resource retention tied to loaded sessions, not a proven unbounded leak. Native macOS
proc_pid_rusage/phys_footprintwas used, with process start identities to guard against PID reuse. Footprints include compressed/swapped accounting and are not unique resident RAM. Other concurrent process activity was excluded from the claim about the 64 tracked processes.We understand the documented 30-minute no-subscriber/no-activity grace period and found an additional three-hour eligible inactive-owner timer in the installed desktop. The archival checks occurred roughly an hour after the recorded resumes; we are not claiming that a three-hour timer was exceeded or that every subscriber was gone.
The public source tag matching the installed backend includes PR #52081 (ancestry comparison). These observations therefore concern a version whose matching source lineage already includes that fix; this is version/ancestry evidence, not a reproducible binary attestation.
Requested maintainer clarification
Aggregate evidence and sanitized lifecycle extracts are available. No private chat titles, conversation identifiers, project paths, credentials, raw transcripts, or full command lines are included here.