macOS Desktop: completed recurring automations retain CUA node_repl workers
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 28/100
Research direction
Start by reproducing the recurring-automation process count with the supplied ps command and inspect the private CUA spawn site in the ChatGPT Desktop bundle. Consult the public code-mode host runner and app-server integration for lifecycle context. Done means job-owned workers exit and are reaped on every terminal path, or a shared runtime proves its instance count remains bounded and reused.
Written by the indexing model from the issue text.
Description
Summary
Completed recurring automations leave
/Applications/ChatGPT.app/Contents/Resources/cua_node/bin/node_repl
workers alive for hours. These are not zombies: they remain sleeping (S) and
are direct children of one codex app-server.
Environment and evidence
- macOS, ChatGPT Desktop bundle
- Parent command:
/Applications/ChatGPT.app/Contents/Resources/codex -c features.code_mode_host=true app-server --analytics-default-enabled - Observed during investigation: 284
node_replworkers, allS, all direct
children of the same app-server PID - Worker elapsed times ranged from about one to eight hours
- Earlier observation: 268 workers and 806 automation session records that day
- Worker creation times correlated with recurring-automation executions
- The executable is a private Desktop resource:
/Applications/ChatGPT.app/Contents/Resources/cua_node/bin/node_repl
Public Codex repository investigation
The public openai/codex checkout has no cua_node or node_repl source
reference. Its generic code-mode host runner can accept an external host path,
but it is designed to reuse one live host connection per ThreadManager and
already has child kill + wait/reap handling when that shared connection is
dropped.
That model does not account for hundreds of direct node_repl children under
one app-server. The concrete CUA executable selection and per-automation
lifecycle appear to be in the Desktop bundle/private CUA runtime.
This is adjacent to #12491, but it should not be assumed to be fixed by #19753:
#19753 explicitly addresses stdio MCP server shutdown, whereas the observed
workers are cua_node/bin/node_repl direct app-server children.
Reproduction
- Restart Desktop and record the baseline
node_replcount. - Run a short recurring automation repeatedly and wait for each run to report
completion. - After each completion, record:
ps -axo pid,ppid,state,etime,command | rg '/Applications/ChatGPT\.app/Contents/Resources/cua_node/bin/node_repl' - Wait at least one hour and compare with the baseline.
- Expected: no job-owned worker remains after its run reaches a terminal state.
Actual: the count rises and completed-run workers remain sleeping.
Requested owner investigation
Please route to ChatGPT Desktop / CUA runtime owners, with Codex app-server
code-mode maintainers consulted for integration.
Instrument the private CUA spawn site with:
- automation job/run ID, spawned PID, parent PID, and spawn call site;
- terminal reason: complete, cancel, error, channel close, or app-server stop;
- terminate result and wait/reap result;
- a bounded per-job registry count.
Do not use global pkill. If workers are job-owned, add a regression test that
runs several short jobs and asserts each owned process exits and is reaped on
all terminal paths. If the runtime is intentionally shared, assert a bounded
single-instance count and prove it is reused rather than recreated per run.
Related
- #12491
- #19753
- #24510
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
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.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·