codex - 💡(How to fix) Fix Codex.app hangs after Homebrew cask CLI upgrade while desktop app is running on macOS

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Codex.app became unresponsive on macOS shortly after I ran:

brew upgrade --cask codex

while the Codex desktop app was already running with active local work.

macOS generated a hang stackshot for /Applications/Codex.app/Contents/MacOS/Codex. The app did not crash with a signal; it stayed alive but unresponsive for ~239 seconds before sampling.

Important nuance: the Homebrew cask named codex appears to install/update the standalone CLI binary, not the /Applications/Codex.app bundle itself. On this machine, the Homebrew CLI symlink was updated on May 20, 2026, while the app bundle timestamp remained May 16, 2026. So this report is framed as a possible Desktop app / standalone CLI / app-server or IPC interaction after a Homebrew cask CLI upgrade while Desktop is live, not as proof that Homebrew replaced the app bundle while it was running.

Error Message

  1. Desktop/app-server/IPC handles version skew between the running app and standalone Homebrew CLI with a timeout/error path.

Root Cause

Codex.app became unresponsive on macOS shortly after I ran:

brew upgrade --cask codex

while the Codex desktop app was already running with active local work.

macOS generated a hang stackshot for /Applications/Codex.app/Contents/MacOS/Codex. The app did not crash with a signal; it stayed alive but unresponsive for ~239 seconds before sampling.

Important nuance: the Homebrew cask named codex appears to install/update the standalone CLI binary, not the /Applications/Codex.app bundle itself. On this machine, the Homebrew CLI symlink was updated on May 20, 2026, while the app bundle timestamp remained May 16, 2026. So this report is framed as a possible Desktop app / standalone CLI / app-server or IPC interaction after a Homebrew cask CLI upgrade while Desktop is live, not as proof that Homebrew replaced the app bundle while it was running.

Fix Action

Fix / Workaround

Thread 0x1d82c
DispatchQueue "com.apple.main-thread"(1)
Thread name "CrBrowserMain"
13 samples (1-13)
last ran 238.045s ago

The heaviest main-thread stack is in Electron/AppKit/status-bar UI and blocks on a synchronous dispatch wait:

-[NSStatusBarButtonCell drawWithFrame:inView:]
-[NSSystemStatusBar drawBackgroundInRect:inView:highlight:]
-[NSSceneStatusItem _setSelectedContentFrame:options:]
-[NSStatusItemScene updateSettings:transition:]
-[FBSScene _updateClientSettings:]
-[FBSScene _sendUpdate:]
-[FBSWorkspaceScenesClient scene:didUpdateClientSettings:withDiff:transitionContext:]
-[BSServiceDispatchQueue performAsyncAndWait:]
_dispatch_async_and_wait_f
_dispatch_async_and_wait_f_slow
__DISPATCH_WAIT_FOR_QUEUE__
_dispatch_event_loop_wait_for_ownership
kevent_id

Code Example

brew upgrade --cask codex

---

May 16 13:30:56 2026  /Applications/Codex.app
May 16 13:30:54 2026  /Applications/Codex.app/Contents/Resources/codex
May 20 15:10:24 2026  /opt/homebrew/bin/codex

---

codex (Codex): 0.132.0
OpenAI's coding agent that runs in your terminal
Artifacts:
  codex-aarch64-apple-darwin -> codex (Binary)

---

brew upgrade --cask codex

---

Command:          Codex
Path:             /Applications/Codex.app/Contents/MacOS/Codex
Identifier:       com.openai.codex
Version:          26.513.31313 (2867)
Architecture:     arm64
Event:            hang
Duration:         240.24s
Duration Sampled: 1.30s (process was unresponsive for 239 seconds before sampling)

---

Process:          Codex [24813]
Path:             /Applications/Codex.app/Contents/MacOS/Codex
Identifier:       com.openai.codex
Version:          26.513.31313 (2867)
Architecture:     arm64
CPU Time:         0.009s
Note:             Unresponsive for 239 seconds before sampling
Num threads:      52

---

Thread 0x1d82c
DispatchQueue "com.apple.main-thread"(1)
Thread name "CrBrowserMain"
13 samples (1-13)
last ran 238.045s ago

---

-[NSStatusBarButtonCell drawWithFrame:inView:]
-[NSSystemStatusBar drawBackgroundInRect:inView:highlight:]
-[NSSceneStatusItem _setSelectedContentFrame:options:]
-[NSStatusItemScene updateSettings:transition:]
-[FBSScene _updateClientSettings:]
-[FBSScene _sendUpdate:]
-[FBSWorkspaceScenesClient scene:didUpdateClientSettings:withDiff:transitionContext:]
-[BSServiceDispatchQueue performAsyncAndWait:]
_dispatch_async_and_wait_f
_dispatch_async_and_wait_f_slow
__DISPATCH_WAIT_FOR_QUEUE__
_dispatch_event_loop_wait_for_ownership
kevent_id
RAW_BUFFERClick to expand / collapse

Summary

Codex.app became unresponsive on macOS shortly after I ran:

brew upgrade --cask codex

while the Codex desktop app was already running with active local work.

macOS generated a hang stackshot for /Applications/Codex.app/Contents/MacOS/Codex. The app did not crash with a signal; it stayed alive but unresponsive for ~239 seconds before sampling.

Important nuance: the Homebrew cask named codex appears to install/update the standalone CLI binary, not the /Applications/Codex.app bundle itself. On this machine, the Homebrew CLI symlink was updated on May 20, 2026, while the app bundle timestamp remained May 16, 2026. So this report is framed as a possible Desktop app / standalone CLI / app-server or IPC interaction after a Homebrew cask CLI upgrade while Desktop is live, not as proof that Homebrew replaced the app bundle while it was running.

Environment

  • Platform: macOS 26.5, Build 25F71
  • Host architecture: arm64e
  • Codex process architecture: arm64
  • Hardware: Mac16,8
  • Memory: 48 GB
  • Codex app path: /Applications/Codex.app/Contents/MacOS/Codex
  • Codex app identifier: com.openai.codex
  • Codex app version from stackshot / Info.plist: 26.513.31313 (2867)
  • Homebrew cask: codex 0.132.0
  • Homebrew CLI path: /opt/homebrew/bin/codex
  • Homebrew CLI target: /opt/homebrew/Caskroom/codex/0.132.0/codex-aarch64-apple-darwin

Local timestamps after the event:

May 16 13:30:56 2026  /Applications/Codex.app
May 16 13:30:54 2026  /Applications/Codex.app/Contents/Resources/codex
May 20 15:10:24 2026  /opt/homebrew/bin/codex

brew info --cask codex reports:

codex (Codex): 0.132.0
OpenAI's coding agent that runs in your terminal
Artifacts:
  codex-aarch64-apple-darwin -> codex (Binary)

Steps to reproduce

Observed once so far:

  1. Start Codex.app on macOS.

  2. Have Codex running local work / local project threads.

  3. In a terminal, run:

    brew upgrade --cask codex
  4. Leave Codex.app open during/after the upgrade.

  5. Codex.app becomes unresponsive.

  6. macOS records a hang report / stackshot.

Actual behavior

Codex.app became unresponsive. macOS stackshot details:

Command:          Codex
Path:             /Applications/Codex.app/Contents/MacOS/Codex
Identifier:       com.openai.codex
Version:          26.513.31313 (2867)
Architecture:     arm64
Event:            hang
Duration:         240.24s
Duration Sampled: 1.30s (process was unresponsive for 239 seconds before sampling)

Target process details:

Process:          Codex [24813]
Path:             /Applications/Codex.app/Contents/MacOS/Codex
Identifier:       com.openai.codex
Version:          26.513.31313 (2867)
Architecture:     arm64
CPU Time:         0.009s
Note:             Unresponsive for 239 seconds before sampling
Num threads:      52

Main thread:

Thread 0x1d82c
DispatchQueue "com.apple.main-thread"(1)
Thread name "CrBrowserMain"
13 samples (1-13)
last ran 238.045s ago

The heaviest main-thread stack is in Electron/AppKit/status-bar UI and blocks on a synchronous dispatch wait:

-[NSStatusBarButtonCell drawWithFrame:inView:]
-[NSSystemStatusBar drawBackgroundInRect:inView:highlight:]
-[NSSceneStatusItem _setSelectedContentFrame:options:]
-[NSStatusItemScene updateSettings:transition:]
-[FBSScene _updateClientSettings:]
-[FBSScene _sendUpdate:]
-[FBSWorkspaceScenesClient scene:didUpdateClientSettings:withDiff:transitionContext:]
-[BSServiceDispatchQueue performAsyncAndWait:]
_dispatch_async_and_wait_f
_dispatch_async_and_wait_f_slow
__DISPATCH_WAIT_FOR_QUEUE__
_dispatch_event_loop_wait_for_ownership
kevent_id

CPU usage was low during sampling, so this does not look like a CPU-bound loop. It looks like the UI main thread was blocked in AppKit / status item update after the Homebrew cask CLI upgrade happened while the desktop app was active.

Expected behavior

Running brew upgrade --cask codex while Codex.app is open should not leave the desktop app permanently unresponsive.

Possible acceptable behaviors:

  1. Codex.app detects the standalone CLI/cask changed and prompts the user to restart.
  2. Desktop ignores the changed standalone CLI until restart, but does not deadlock.
  3. Desktop/app-server/IPC handles version skew between the running app and standalone Homebrew CLI with a timeout/error path.
  4. The Homebrew cask or Codex updater warns that Codex.app is running if that combination is unsupported.

Related issues checked

  • #20025 is related but not the same. It reports the standalone Homebrew cask CLI hanging on startup while the Desktop app was running, likely around app-server/IPC/version mismatch. This report is about the Desktop app process itself becoming unresponsive after running brew upgrade --cask codex while Desktop was already open.
  • #16158 is a broader Desktop app startup unresponsiveness issue, but it is not tied to a Homebrew cask CLI upgrade or this AppKit/status-item stack.
  • #11090 is a broader Desktop UI freeze involving worker crashes, git/worktree errors, and orphaned app-server processes, but it does not cover this Homebrew cask upgrade sequence.
  • #19291 is a Desktop launch/UI hang where backend handshake succeeds, but it is not tied to Homebrew cask upgrade or the AppKit status-item stack.
  • #20283 covers AppleSystemPolicy/spctl/kernel-panic class failures. This stackshot does not show that class of failure.

I also searched for open issues containing NSStatusItemScene, NSStatusBarButtonCell, BSServiceDispatchQueue, and __DISPATCH_WAIT_FOR_QUEUE__ and did not find an existing matching issue.

Diagnostics available

I have a local macOS stackshot file, but it is a full system stackshot with many unrelated processes and local paths, so I did not attach it wholesale. I can provide a redacted target-process excerpt if useful.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Running brew upgrade --cask codex while Codex.app is open should not leave the desktop app permanently unresponsive.

Possible acceptable behaviors:

  1. Codex.app detects the standalone CLI/cask changed and prompts the user to restart.
  2. Desktop ignores the changed standalone CLI until restart, but does not deadlock.
  3. Desktop/app-server/IPC handles version skew between the running app and standalone Homebrew CLI with a timeout/error path.
  4. The Homebrew cask or Codex updater warns that Codex.app is running if that combination is unsupported.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Codex.app hangs after Homebrew cask CLI upgrade while desktop app is running on macOS