VS Code extension: codex app-server memory grows unbounded, exhausts ~54 GB swap, and crashes twice

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

What version of the IDE extension are you using?

26.727.40816 (openai.chatgpt, Darwin arm64)

What subscription do you have?

ChatGPT Pro

Which IDE are you using?

Visual Studio Code 1.131.0

What platform is your computer?

  • macOS 26.5.2 (build 25F84)
  • Darwin 25.5.0, arm64
  • MacBook Pro with Apple M4 Pro, 14 cores, and 24 GB RAM

What issue are you seeing?

The Codex VS Code extension's background codex app-server process exhibited runaway memory growth during a long-running session and caused two crashes on the same day.

Timeline (America/Toronto):

  1. Around 4:15 p.m. on July 31, 2026, VS Code was opened and the Codex extension launched normally.
  2. At 12:05:14 a.m. on August 1, macOS reached critical memory pressure and its kernel-level low-memory mechanism terminated processes. The macOS diagnostic identified Codex as the largest process at that point.
  3. VS Code's extension host and helper processes restarted automatically between approximately 12:04 and 12:08 a.m.
  4. The replacement Codex process (PID 89222) was then observed growing again in real time from approximately 1.4 GB to more than 3 GB RSS while allocated swap climbed to 53.9 GB out of 54 GB.
  5. The second failure displayed the message Codex stopped unexpectedly; Codex's crash handling terminated the process.
  6. Immediately after Codex exited, free RAM rose to approximately 8.4 GB and allocated swap dropped from approximately 54 GB to 8 GB total, with 6.7 GB used.

The repeated growth after restart and the immediate recovery following process termination strongly indicate process-specific memory retention consistent with a memory leak. The precise internal allocation source has not been isolated.

What steps can reproduce the bug?

  1. Open a local repository in VS Code with the Codex extension enabled.
  2. Continue using one long-running Codex conversation with background-agent and tool activity for several hours.
  3. Allow tasks and tool calls to complete while continuing in the same thread.
  4. Monitor the codex app-server process RSS and system swap usage.
  5. Observe that RSS continues to grow instead of returning to a stable baseline.
  6. Continue until macOS reaches critical memory pressure or Codex terminates unexpectedly.

A short minimal reproduction is not yet available, but the growth repeated after the VS Code extension host restarted during the same working session.

What is the expected behavior?

The extension's background process should keep memory bounded and release memory associated with completed agents, tool output, and thread state. It should not exhaust physical memory and swap, trigger a macOS low-memory termination, or crash and restart the extension.

Additional information

  • In-product /feedback session ID: unavailable at the time of filing.
  • Sanitized VS Code/Codex logs, extension-host logs, screenshots, and the macOS memory-pressure diagnostic can be provided privately on request.
  • No raw logs are attached here because they may contain local paths, repository details, or conversation content.
  • Possibly related issues: #24048, #20781, and #29510.

View original on GitHub ↗

1 Comment

github-actions[bot] contributor · 27 days ago

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

  • #35750
  • #35269

Powered by Codex Action