Codex-created launchctl restart job becomes a keepalive loop that repeatedly terminates ChatGPT
What version of Codex CLI is running?
codex-cli 0.144.1
What subscription do you have?
ChatGPT subscription (the exact tier is not exposed by the CLI).
Which model were you using?
gpt-5.6-sol
What platform is your computer?
Darwin 25.5.0 arm64 arm — macOS 26.5 (25F71)
What terminal emulator and version are you using?
iTerm2 3.6.11, no multiplexer.
Codex doctor report
The full redacted report and logs were uploaded via /feedback.
Uploaded thread: 019f4f25-e935-7231-90c3-e2449d1b9bf7
Relevant summary:
{
"overallStatus": "ok",
"codexVersion": "0.144.1",
"app_server.status": {
"status": "ok",
"summary": "background server is not running",
"mode": "ephemeral",
"pid_file": "missing"
},
"installation": {
"status": "ok",
"summary": "installation looks consistent"
},
"network.websocket_reachability": {
"status": "ok",
"summary": "Responses WebSocket handshake succeeded"
}
}
What issue are you seeing?
ChatGPT/Codex desktop 26.707.31428 (build 5059, bundle ID com.openai.codex) exits within seconds of launching and opening a workspace or resuming a thread.
Each attempt leaves orphaned browser_crashpad_handler and bare-modifier-monitor processes. There is no Crashpad minidump and no conventional macOS crash report, so this looks more like an unintended clean exit or host shutdown than a normal native crash.
A desktop app-server orphan remained alive for hours and held the remote-control WebSocket. New desktop app-server launches then logged:
HTTP 409 Conflict
{"detail":"Remote app server already online"}
The same orphan was not reported by codex doctor --json, which said the background server was not running. Stopping only that orphan removed the 409, but the desktop app still exited immediately, so the conflict is real but not the entire failure.
There is also a launcher/rebrand mismatch: codex app <path> does not recognize the installed /Applications/ChatGPT.app despite its com.openai.codex bundle ID. It says “Codex Desktop not found,” downloads the installer, and still does not leave a usable desktop app. This overlaps with #31944; the stale remote-control behavior overlaps with #28862.
The impact is larger than a desktop crash because official Browser docs say Browser is available in ChatGPT web/desktop but not Codex CLI or the IDE extension. The Chrome extension/native host is installed, healthy, and has successfully connected as codex-chrome-extension-sidepanel, but a CLI session cannot use it. Once the desktop app exits, there is no supported browser-verification path.
What steps can reproduce the bug?
- Install and enable ChatGPT for Chrome.
- Launch ChatGPT desktop 26.707.31428 on macOS.
- Open a local workspace or resume an existing Codex thread.
- Observe the main desktop process exit within seconds.
- Repeat and observe additional orphaned crashpad and modifier-monitor helpers.
- Inspect Codex logs: when the stale app-server is present, the new desktop server receives
409 Remote app server already online. - Stop the stale app-server and repeat: the 409 disappears, but the main app still exits.
- Run
codex doctor --json: it reports no background server even when the orphan is active. - Run
codex app <workspace>: it fails to recognize/Applications/ChatGPT.appand attempts another installer download.
Uploaded diagnostic thread: 019f4f25-e935-7231-90c3-e2449d1b9bf7.
What is the expected behavior?
The desktop app should remain open, should own or reuse exactly one remote-control app-server, and should clean up its helpers on exit. codex doctor should detect any live desktop app-server that can cause a 409. codex app should recognize the ChatGPT-branded app by bundle ID. If Browser remains unsupported in CLI, CLI should immediately explain that limitation and provide a supported fallback instead of sending users through extension restart/reinstall loops.
Additional information
Environment:
- ChatGPT desktop: 26.707.31428, build 5059
- Codex CLI: 0.144.1
- Chrome: 150.0.7871.115
- ChatGPT for Chrome: 1.2.27203.26575
- macOS: 26.5 (25F71)
Related issues: #31944 and #28862.
4 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Closing after root-cause correction above; the actionable product issues remain tracked in #31944, #28862, and the uploaded feedback thread.
Root cause and tested workaround
This was not a native Electron crash. A previous Codex desktop session created a submitted launchd job while trying to restart itself after changing autonomy/notification settings:
The job was unintentionally inferred as
keepalive. At diagnosis time,launchctl printshowed:It repeatedly executed
/private/tmp/codex-autonomy-restart.sh. The script did this on every run:It then tried to use
/Applications/Codex.app/Contents/Resources/cua_node/bin/node. That path no longer existed after the ChatGPT rebrand/installer behavior, so the script exited 127 before reopening anything. Because launchd considered the submitted job keepalive, it immediately scheduled another run and killed every newChatGPTprocess. This exactly explains the clean exits, absent crash dumps, and accumulating orphan helpers.Tested workaround:
Verification:
The temporary script and its backup can be left in place; they are inert once the submitted launchd job is removed. No preferences or conversation data need to be deleted.
Why this remains worth tracking: the kill loop was created by a Codex agent's approved self-restart command using
launchctl submitwithout safe one-shot semantics or cleanup. The launcher/rebrand mismatch (#31944) then made the restart script fail permanently and amplified the mistake into a keepalive termination loop. The stale remote app-server/409 behavior is separately related to #28862.Uploaded diagnostics:
019f4f25-e935-7231-90c3-e2449d1b9bf7.Additional independent recurrence on a newer macOS build, with evidence that may help separate the confirmed launchd bug from a possible recovery/idempotency bug.
Environment:
26.707.72221build53070.144.226.5.1build25F80, arm64Confirmed sequence:
launchctl submithost-restart helper at 19:11:05 local time. The helper slept, quit ChatGPT, reopened it, and exited.type=Submitted,OnDemand=false,last exit code=0;runsincreased from 59 to 64 within seconds.New recovery/idempotency evidence:
Identifiers for internal tracing:
019f6525-1db4-7252-853b-ad2c682dc368019f6578-78da-7643-b1d7-ecddb4b2eaffcall_1AV4OoDM2vbueksMtZThtqvl019f6588-aa16-7951-8428-e5747dba6010call_RbNCFULCDyV4whB5g3YVBIcSTwo product-level protections seem necessary:
launchctl submitas a one-shot host restart helper; provide a supported one-shot restart operation with TTL, cleanup, and postcondition checks.call_idacross app-server restarts. If a call outcome is unknown, reconcile external state before retrying rather than executing it automatically.I opened #33327 before the duplicate detector pointed here. I am closing that report in favor of this existing issue.