Codex Desktop leaves high-CPU grep and Python child processes after an interrupted task on macOS

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

Summary

A Codex Desktop task that performed broad local CSV searches was interrupted, but its shell child processes were not cleaned up. Four grep processes and one Python process remained running after the task was interrupted, each consuming approximately one CPU core.

Environment

  • macOS on Apple Silicon
  • Codex Desktop
  • Large local CSV archive

Related Codex task

  • Task: Assess zinc coulombic register
  • Task reference: 01a040b8-9e96-7dc3-9882-b51155163f99
  • Task state: interrupted

What happened

The task launched several long-running searches and a Python CSV-analysis script. After the Codex task was interrupted, the descendant processes continued running in the background.

Observed remaining workload:

  • Four recursive grep searches across large CSV and project directories
  • One Python process loading and profiling a large collection of CSV files
  • Each active process used approximately 80–95% CPU
  • The processes continued for several minutes until manually terminated

Expected behavior

When a Codex task is interrupted, completed, cancelled, or its parent process exits, all shell descendants started for that task should be terminated as a process group after a short graceful shutdown period.

Actual behavior

The owning Codex task ended, but its descendant grep and Python processes remained active and continued their scans.

Impact

  • High sustained CPU use
  • Fan activity and reduced system responsiveness
  • Orphaned work can accumulate across interrupted tasks
  • The user must inspect Activity Monitor and manually terminate the processes

Suggested fix

Launch each shell command in a tracked process group or job. On task completion, cancellation, interruption, crash, or app shutdown:

  1. Send graceful termination to the complete child process group.
  2. Wait briefly for cleanup.
  3. Force-terminate any remaining descendants.
  4. Surface a visible warning if cleanup fails.

Related reports

This appears related to existing reports of Codex child-process cleanup failures and high-CPU orphaned processes, especially #37770 and #21994.

View original on GitHub ↗

1 Comment

github-actions[bot] contributor · 1 day ago

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

  • #40972

Powered by Codex Action