Codex Desktop: opening a large thread causes sustained 100%+ CPU until app restart
Summary
In Codex Desktop, opening a large existing conversation/thread can cause the Codex main process to stay at 100%+ CPU. Switching away to another conversation does not recover CPU usage; only fully restarting Codex clears it.
Version
- Codex Desktop version:
26.527.31326 (3390) - Platform: macOS
Reproduction
- Start Codex Desktop.
- Open a new/empty conversation: CPU remains normal.
- Open an existing large conversation/thread.
- Observe Codex main process CPU spikes to roughly
100%-200%. - Switch to another conversation, including smaller conversations.
- CPU remains high until Codex Desktop is fully restarted.
Observed Details
The problematic thread file is around 501 MB and contains many saved tool results, not just regular chat text. Local inspection showed the size was mostly from persisted tool output records:
function_call_output: about228 MBmcp_tool_call_end: about171 MB- assistant/user messages are much smaller by comparison
Cleaning the local logs database did not fix the issue. The active thread itself was small in another test case, but opening this large thread first made the whole app remain slow until restart.
Sampling the Codex Desktop main process while CPU was high showed activity concentrated around Electron/Node IPC paths, including libuv stream -> JS callback -> Buffer/memmove style work. The renderer also showed V8/renderer work during the spike.
Expected Behavior
Opening a large thread should not permanently peg CPU. If the large thread is expensive to load, Codex should either:
- lazily load/virtualize thread history,
- truncate or summarize persisted tool outputs in the UI,
- avoid loading full tool output payloads unless expanded,
- cancel/release parsing and rendering work when switching away from the thread,
- and release memory/CPU pressure after navigating to another conversation.
Actual Behavior
After the large thread is opened once, CPU remains high even after switching away. A full app restart is required to recover.
Impact
Large long-running agent threads with many tool calls become effectively unsafe to open in Codex Desktop, because one open can make the whole app sluggish until restart.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗