codex icon indicating copy to clipboard operation
codex copied to clipboard

[macOS] Codex App 26.1117.31558 crashes on launch in wallpaper tint fallback

Open jacobcxdev opened this issue 2 weeks ago • 59 comments

Impact: launch-blocking regression. Build 26.1117.31558 (29513) exits during startup with affected wallpaper configurations. Users hit this with ordinary macOS settings, including Apple's own wallpapers. The workarounds can require giving up a chosen wallpaper, animation, or per-display and per-Space settings to regain access. There are also reports of crashes after a successful launch when displays reconnect or a window moves between them.

Reports cover Apple Silicon and Intel Macs on macOS 15, 26, and 27. Matching logs identify an uncaught NSUnknownKeyException for either Desktop or url.

Workarounds on build 29513

  • A regular still image file (JPEG or HEIC) can let the same build open. Apple's Mac Blue worked on my Mac. A related report needed an actual JPEG after the option labelled DefaultDesktop still crashed. Some users needed to apply the still image across all affected Spaces or displays. JPEG confirmation · All Spaces · All displays
  • For the Desktop variant, one reporter kept Apple's default wallpaper and recovered by enabling System Settings → Wallpaper → Show on all Spaces. Another reporter needed both a regular still image and that toggle. Using the toggle applies a shared wallpaper across Spaces, which can replace distinct selections. Default wallpaper retained · Still image plus toggle

One reporter recovered with a still image, then reproduced the launch crash by switching back to Apple's animated Earth wallpaper on the same build. Several reporters tried reinstalling or isolating Codex app data without success. Animated Earth retest Reinstall and profile test

What version of the Codex App are you using (From “About Codex” dialog)?

Affected: 26.1117.31558 (build 29513), bundle identifier com.openai.codex. The application is installed as ChatGPT.app.

I verified that 26.1111.71704 (build 29030) launches with the same Backdrop wallpaper active. One reporter ran 29030 for more than eight hours, then saw repeated crashes on 29513 after updating with the same setup. Another reporter confirmed startup after rolling back to 26.1111.71025. Same-setup version comparison · Rollback to 26.1111.71025

What subscription do you have?

I did not isolate subscription tier. The exception occurs during native app startup.

What platform is your computer?

My reproduction: macOS 27.3 (build 26C5035r), Apple M3 Max. uname -mprs reports Darwin 27.3.0 arm64 arm. Cindori Backdrop 2.10.7 (build 148).

Other reported environments Wallpaper or trigger Missing key
macOS 15.3.1 and 15.7.9 Linked wallpaper entries and a literal "$null" in AllSpacesAndDisplays. 15.3.1 Desktop exception · 15.7.9 Desktop exception
macOS 26.6.2 Apple's Photos wallpaper provider. AppKit returned the placeholder. Desktop
macOS 27.0.1 and 27.2.1 Apple dynamic wallpapers and linked aerials. One report found a stale wallpaper file reference after upgrading macOS, without manually choosing a wallpaper. Desktop · Linked aerial · OS upgrade
macOS 27.0.1 and 27.2.1 Third-party Aerial wallpaper extension. url · Aerial 4.1.9 payload and Foundation test
macOS 26.7.3 on Intel (x86_64) Built-in Apple aerials. Wallpaper store has AllSpacesAndDisplays = "$null". macOS records EXC_BAD_INSTRUCTION (SIGILL) for the uncaught exception. Desktop

What issue are you seeing?

After updating to build 29513, the app repeatedly exited within seconds of opening with Cindori Backdrop active. My seven crash reports show EXC_BREAKPOINT (SIGTRAP) on CrBrowserMain and the same Objective-C key-value coding frames. Only one launch showed the macOS window restoration prompt. Other reporters saw the main window reach ready-to-show just before the crash. Matching startup trace

My unified log records the underlying exception (object address redacted):

Terminating app due to uncaught exception 'NSUnknownKeyException', reason:
'[<NSTaggedPointerString> valueForUndefinedKey:]: this class is not key value coding-compliant for the key url.'

AppKit       +[NSApplication _crashOnException:]
Foundation   -[NSObject(NSKeyValueCoding) valueForUndefinedKey:]
Foundation   -[NSObject(NSKeyValueCoding) valueForKey:]
Foundation   -[NSObject(NSKeyValueCoding) valueForKeyPath:]
objc-js      ObjcObject::$MsgSendPrepared(Napi::CallbackInfo const&)

The Desktop reports show the same exception class and string receiver, with Desktop as the undefined key and -[NSDictionary(NSKeyValueCoding) valueForKeyPath:] also on the stack. Sanitised Desktop exception

Two reports describe crashes after the app was already open. Reconnecting two external displays on macOS 27.2.1 triggered the same KVC and objc-js frames on an M4 MacBook Air. Moving the app window between displays on macOS 27.0.1 triggered the Desktop exception on an M4 Max. The latter reporter could move the window across the same displays after rolling back to 29030. Display reconnection · Window movement and rollback

What steps can reproduce the bug?

  1. On an affected Mac, keep the existing wallpaper configuration. My setup used Cindori Backdrop for the desktop and Lock Screen. The reports above give built-in Apple examples.
  2. Open build 29513 normally. On my Mac, the process exited within seconds with the url exception above.
  3. To compare behaviour on the same build, try a regular still image file on the affected desktop and relaunch. See the reported workarounds above for setups with multiple Spaces or displays.

What is the expected behavior?

The app should open after upgrading with the existing wallpaper active. If it cannot sample the wallpaper, it should keep the default tint and remain usable through launch, wallpaper changes, and display changes.

Additional information

I checked the code bundled in the signed 29513 app. It asks AppKit for the wallpaper of the window's screen. If the result is nil or points to /System/Library/CoreServices/DefaultDesktop.heic, it falls back to ~/Library/Application Support/com.apple.wallpaper/Store/Index.plist. The same observer listens for NSWindowDidChangeScreenNotification and wallpaper index file changes, so it can run again after launch.

  • Desktop fails during selection lookup. Linked display entries can have a Linked dictionary and no Desktop key. If the lookup falls through to AllSpacesAndDisplays.Desktop and AllSpacesAndDisplays contains the literal string "$null", Foundation raises when it tries to read Desktop from that string. I reproduced the Desktop exception with that string in a local Foundation fixture. A Linked dictionary with no Desktop key returned nil in the control. Reporters reproduced the exception against their live or saved wallpaper stores outside the app. Live-store reproduction · Saved-store reproduction
  • url fails after selection lookup. Foundation decoded the saved com.cindori.Backdrop.WallpaperExtension configuration from my Mac as the string backdrop. Calling valueForKeyPath: with url.relative reproduced the url exception in a local helper, and a dictionary control resolved the URL. An Aerial 4.1.9 reporter independently reproduced the exception with that provider's aerial payload. Aerial Foundation test

Reports show two different outcomes in the wallpaper store. In one case, enabling Show on all Spaces turned the string sentinel into a dictionary. In another, the app opened with a still image while the string sentinel remained in the wallpaper store. Dictionary after toggling · Still image with sentinel present

Fix and release qualification

Prefer the documented AppKit API, and use the default tint when it cannot supply a usable image. If the fallback continues to read the undocumented wallpaper store, parse it as data using typed dictionary lookups. Validate each intermediate value and the decoded provider configuration. Treat "$null" as missing and handle valid Linked entries where supported. Objective-C KVC assumes that every object in a key path supports the next key. An unexpected string can raise a native exception during startup. Apple's KVC documentation

Extend the macOS release QA environment to include user profiles with varied system preferences and desktop customisations. Preserve those profiles across app and macOS upgrades. For this path, exercise Apple Photos, linked aerials, per-display and per-Space selections, and third-party providers. Include an OS upgrade that leaves a stale wallpaper reference, since a user can hit the fallback without making a wallpaper change. Run the signed app on supported macOS versions and architectures.

Use focused tests for missing values, "$null", and string provider configurations such as backdrop and aerial. Verify that the signed app opens with the user's existing wallpaper active and stays usable when switching Spaces, changing wallpapers, reconnecting displays, and moving the app window between displays. Check that wallpaper behaviour, including animation where configured, is preserved when Codex uses its default tint. Any launch-time path that reads undocumented system state needs this kind of upgrade coverage.

Related reports include #62680, #62683, #62702, #62703, #62778, and #62797.

jacobcxdev avatar Nov 20 '26 02:11 jacobcxdev

Additional reproduction with Apple's built-in dynamic wallpaper (no third-party wallpaper app involved).

Environment

  • Codex/ChatGPT desktop app: 26.1117.31558 (build 29513; bundle ID com.openai.codex)
  • macOS: 27.2.1
  • Apple Silicon: M4 Pro
  • Wallpaper: Apple's built-in dynamic wallpaper

Observed behavior

  • After updating the app, every launch crashes shortly after startup.
  • Reinstalling the app did not help.
  • Moving aside app support/cache/preference state and launching with a temporary CODEX_HOME did not resolve it.
  • The startup log showed window ready-to-show immediately before an uncaught Objective-C exception.

Sanitized exception (memory addresses, process IDs, local paths and other identifiers omitted):

Terminating app due to uncaught exception 'NSUnknownKeyException', reason:
'[<NSTaggedPointerString> valueForUndefinedKey:]:
this class is not key value coding-compliant for the key Desktop.'

Foundation   -[NSObject(NSKeyValueCoding) valueForUndefinedKey:]
Foundation   -[NSObject(NSKeyValueCoding) valueForKey:]
Foundation   -[NSObject(NSKeyValueCoding) valueForKeyPath:]
Foundation   -[NSDictionary(NSKeyValueCoding) valueForKeyPath:]
node.napi.armv8.node  ObjcObject::$MsgSendPrepared

Workaround verified

  1. In macOS System Settings → Wallpaper, switch from Apple's built-in dynamic wallpaper to an Apple static image.
  2. Launch the same installed app build again.
  3. The app starts successfully.

This appears related to the wallpaper-handling/KVC failure reported here, but with key Desktop rather than url. Importantly, it reproduces with an Apple-provided dynamic wallpaper, so it is not limited to Cindori Backdrop or other third-party wallpaper extensions. The exact faulty lookup still needs confirmation by maintainers.

AZLisme avatar Nov 20 '26 04:11 AZLisme

I can confirm the same issue after updating the Codex desktop app. The Dock icon bounced a couple of times, then macOS displayed “ChatGPT quit unexpectedly.” Switching from a dynamic wallpaper to a static wallpaper allowed the app to launch normally.

  • macOS: 27.0.1 (26A434)
  • Mac: Apple M4 Pro, model identifier Mac16,7
  • Codex desktop: 26.1117.31558 (build 29513)

Additional technical details from my crash logs and the bundled wallpaper-tint code:

NSUnknownKeyException: [<NSTaggedPointerString> valueForUndefinedKey:]
this class is not key value coding-compliant for the key Desktop

-[NSObject(NSKeyValueCoding) valueForUndefinedKey:]
-[NSObject(NSKeyValueCoding) valueForKeyPath:]
-[NSDictionary(NSKeyValueCoding) valueForKeyPath:]
ObjcObject::$MsgSendPrepared (objc-js)

The stack and exception match the other report involving an Apple dynamic wallpaper. In the bundled code, when AppKit returns the default desktop placeholder, wallpaper tint detection falls back to querying wallpaper-store data with key paths including Displays.<display-id>.Desktop and AllSpacesAndDisplays.Desktop. In my wallpaper-store data at the time, AllSpacesAndDisplays was the string $null, rather than a dictionary. This makes the fallback lookup a plausible cause of the Desktop exception, although the exact failing lookup has not been independently confirmed.

This differs from the original report's url exception, but appears to be another case of the same wallpaper-reading code applying a key path to a string. Switching to a static wallpaper worked around the crash on my machine.

xueyangcs avatar Nov 20 '26 05:11 xueyangcs

Fourth independent confirmation. Env: build 29513, macOS 27.0.1 (26A434), M3, exception key Desktop. I'll skip the stack/workaround, which the three reports above already cover, and add only what's new.

My trigger needs no wallpaper choice at all — a plain OS upgrade arms it. defaults read com.apple.wallpaper points at .wallpapers/Sequoia Sunrise/Sequoia Sunrise.mov, which macOS 27 deleted during the upgrade, leaving a dangling reference; both screens then resolve to DefaultDesktop.heic. So this is reachable without third-party software and without the user ever selecting a dynamic wallpaper. That widens the affected population past "people who chose an aerial".

Why the lookup fails is a hardcoded key name, not just a missing type check. Diffing my wallpaper store at crash time vs. after the still-image workaround:

Index.plist crash time (aerial active) after still image
<key>Desktop</key> occurrences 0 10
<key>Linked</key> occurrences 1648 1641
AllSpacesAndDisplays <string>$null</string> <string>$null</string>

While an aerial is active Apple nests the selection under Linked, so every candidate path — Displays.<display-id>.Desktop, AllSpacesAndDisplays.Desktop, SystemDefault.Desktop — misses. Answers the "exact failing lookup still needs confirmation" open question from the report above.

Why the code's own ?? null cannot save it (this is the part I'd most want maintainers to see): the first hop of valueForKeyPath:@"AllSpacesAndDisplays.Desktop" returns the NSString "$null" — non-nil and JS-truthy — so ?? passes it straight through and the second hop raises on an NSString. That is exactly the NSTaggedPointerString receiver in all three reports. Apple spells "unset" two ways in this store (<null/> and the literal string "$null"), and a nil/optional-chain guard only catches the first. Consequence for the fix: a dig()/objectForKey: type-check helper is not sufficient on its own — it must also map the string "$null" to unset, and accept Linked as well as Desktop, or it still falls through to the same crash.

The static-image workaround leaves the defect armed, not fixed. AllSpacesAndDisplays is still "$null" on my machine; the only reason I'm alive is the DefaultDesktop.heic early-return no longer fires. The next OS upgrade, wallpaper reset, or display re-link that puts desktopImageURL back on the placeholder re-crashes every launch. Worth saying out loud in the triage notes, because people who "solved" it by changing wallpaper will be marked as resolved.

Also independently confirms the bisect: 29513 is the newest release on the public appcast (persistent.oaistatic.com/codex-app-prod/appcast.xml), so no currently-shipping build fixes this. Mine has been up ~1 h on a still image where it previously died 13/13 within ~10 s of ready-to-show.

Joozozhao avatar Nov 20 '26 06:11 Joozozhao

Another confirmation, with three data points not yet in this thread. Build 29513, exception key Desktop, same stack.

1. macOS 26 is affected too. macOS 26.6.2 (25G83), MacBookPro18,2 (M1 Max). The other reports here are all on macOS 27.x.

2. A Photos-based wallpaper triggers it. Provider com.apple.wallpaper.extension.photos, so neither a third-party extension nor an aerial/dynamic wallpaper. desktopImageURLForScreen: returned DefaultDesktop.heic.

3. Direct confirmation of the failing lookup. I ran the bundle's key paths against the live Index.plist at crash time from outside the app (JXA):

  • every Displays.<id> entry with Type = linked had no Desktop key
  • valueForKeyPath("AllSpacesAndDisplays.Desktop") raised the identical NSUnknownKeyException on an NSTaggedPointerString
  • valueForKeyPath("SystemDefault.Desktop") returned nil without raising

So the second candidate path is the one that throws. A one-liner that reproduces the exception on any Mac, independent of wallpaper state:

osascript -l JavaScript -e 'ObjC.import("Foundation"); $.NSDictionary.dictionaryWithObjectForKey($("$null"), $("AllSpacesAndDisplays")).valueForKeyPath("AllSpacesAndDisplays.Desktop")'

Switching to a still image file fixed launch here as well. On my machine AllSpacesAndDisplays changed from "$null" to a dictionary after the switch, so the post-workaround state differs between machines.

AndieYang avatar Nov 20 '26 06:11 AndieYang

I reproduced the Desktop crash on macOS 15.7.9 (24G830), Apple Silicon (arm64). The desktop app worked before the update. After updating to 26.1117.31558 (build 29513), it crashed on launch. All 26 crash reports from that period show EXC_BREAKPOINT / SIGTRAP on the main thread. The unified log records NSUnknownKeyException for the key Desktop on NSTaggedPointerString. The standalone Codex CLI continued to work.

Before the workaround, NSWorkspace.desktopImageURL(for:) returned /System/Library/CoreServices/DefaultDesktop.heic for the built-in display. In a saved copy of the wallpaper store, AllSpacesAndDisplays was the literal string $null. Calling Foundation’s valueForKeyPath: with AllSpacesAndDisplays.Desktop on that saved data reproduced the same exception outside the app.

Verified workaround on the same build — I set the wallpaper to the actual Sequoia Sunrise HEIC file behind the default alias. The main window opened and the bundled Codex runtime initialized successfully.

Suggested fix — Check that each wallpaper-store value is a dictionary before looking up nested keys. Treat $null and other unexpected types as missing, and use the default window tint if no supported wallpaper can be sampled. A regression test with AllSpacesAndDisplays = "$null" would cover this case.

shinji411 avatar Nov 20 '26 06:11 shinji411

Another third-party trigger: Aerial (com.glouel.Aerial-App.Aerial4WallpaperExtension). Build 29513, macOS 27.2.1, Apple Silicon. Its Configuration is the 6 raw bytes aerial, which NSPropertyListSerialization parses as an old-style plist string → valueForKeyPath:@"url.relative" on NSString → same NSUnknownKeyException (key url). Reinstalling doesn't help since Index.plist persists; switching to a built-in still wallpaper is the workaround.

zzonmacbookbed avatar Nov 20 '26 06:11 zzonmacbookbed

Also affected. Build 29513 (26.1117.31558), macOS 27.2.1 (26B131), Apple Silicon.

  • Started right after the auto-update; 9 crash reports in ~4 minutes, all EXC_BREAKPOINT / SIGTRAP with the same -[NSDictionary(NSKeyValueCoding) valueForKeyPath:] → objc-js ObjcObject::$MsgSendPrepared frames.
  • Wallpaper: built-in Apple choices only (com.apple.wallpaper.choice.aerials and com.apple.wallpaper.choice.dynamic), no third-party wallpaper extension.
  • Standalone Codex CLI (0.166.0) still works.

GodricBai avatar Nov 20 '26 06:11 GodricBai

Ditto: Build 29513 (26.1117.31558), macOS 27.2.1 (26B131), Apple Silicon. Use of pple Dynamic Wallpaper or Backdrop - results in crash(es) as described above.

... disabling - using a static wallpaper - allows the app to start successfully.

LaurentFough avatar Nov 20 '26 07:11 LaurentFough

Another confirmation, adding an Intel (x86_64) data point. The other reports in this thread are all Apple Silicon.

App: 26.1117.31558 (build 29513), com.openai.codex, installed as ChatGPT.app macOS 26.7.3 (25G342), MacBookPro16,1 (Intel Core i7-9750H, x86_64) Wallpaper: built-in Apple Aerials (com.apple.wallpaper.choice.aerials). No third-party wallpaper software is installed.

On Intel, the crash report shows EXC_BAD_INSTRUCTION (SIGILL) "Illegal instruction: 4" instead of EXC_BREAKPOINT (SIGTRAP). The underlying exception is the same. I saw it on stderr when I launched the app binary from Terminal:

*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<NSTaggedPointerString …> valueForUndefinedKey:]: this class is not key value coding-compliant for the key Desktop.' -[NSObject(NSKeyValueCoding) valueForKeyPath:] -[NSDictionary(NSKeyValueCoding) valueForKeyPath:] node.napi.node ObjcObject::NewInstance / ObjcObject::$MsgSendPrepared (objc-js prebuilds/darwin-x64)

The wallpaper store matches what others describe here: the top-level AllSpacesAndDisplays in ~/Library/Application Support/com.apple.wallpaper/Store/Index.plist is the string "$null". The app crashes on every launch: 7 crash reports in about 7 minutes right after the auto-update.

bymaer avatar Nov 20 '26 08:11 bymaer

Additional reproduction and confirmed workaround: macOS 15.3.1, Apple Silicon

I can independently reproduce this issue on macOS 15.3.1, including without any third-party wallpaper applications.

Environment

  • ChatGPT macOS app: 26.1117.31558 (build 29513)
  • Bundle ID: com.openai.codex
  • macOS: 15.3.1 (build 24D70)
  • Architecture: Apple Silicon (ARM64)
  • No third-party wallpaper applications installed.

Observed crash

The application crashes during startup with:

NSUnknownKeyException

[NSTaggedPointerString valueForUndefinedKey:]:
this class is not key value coding-compliant
for the key Desktop.

Relevant stack:

-[NSObject(NSKeyValueCoding) valueForUndefinedKey:]
-[NSObject(NSKeyValueCoding) valueForKeyPath:]
-[NSDictionary(NSKeyValueCoding) valueForKeyPath:]
node.napi.armv8.node
Codex Framework

Wallpaper configuration before the workaround

My ~/Library/Application Support/com.apple.wallpaper/Store/Index.plist contained:

AllSpacesAndDisplays = "$null"

The display entries used the Linked configuration structure:

Displays
  <display-id>
    Type = "linked"
    Linked
      Content
        Choices

The following API returned actual wallpaper image paths, rather than the default placeholder:

NSWorkspace.shared.desktopImageURL(for: screen)

Returned path:

/System/Library/Desktop Pictures/.thumbnails/Catalina Sunset.heic

Confirmed workaround

I backed up Index.plist and removed only the top-level AllSpacesAndDisplays key, preserving the existing Displays configuration.

Then I restarted WallpaperAgent and launched ChatGPT again.

The application started successfully without changing its version or reinstalling it.

This strongly suggests that the wallpaper-store fallback path does not safely handle the $null string value or the Linked configuration structure.

Suggested fix

  1. Validate the type of each wallpaper configuration object before accessing nested keys through Objective-C KVC.
  2. Treat the literal string "$null" as an unset value.
  3. Support the Linked wallpaper configuration structure, not only the legacy Desktop structure.
  4. Fall back gracefully to the default window appearance if wallpaper metadata cannot be resolved.
  5. Add regression tests for AllSpacesAndDisplays = "$null" and displays containing Type = "linked".

The application should never crash during startup because wallpaper metadata is unavailable or has an unexpected structure.

I hope this additional reproduction and workaround help identify and fix the underlying issue.

twink7e avatar Nov 20 '26 08:11 twink7e

Confirmed workaround on macOS 27.2.1

I experienced the same startup crash with the following environment:

  • App: Codex Desktop 26.1117.31558 (build 29513)
  • Bundle ID: com.openai.codex
  • macOS: 27.2.1 (26B131)
  • Hardware: Apple Silicon, Mac16,12

Crash exception:

NSUnknownKeyException
valueForUndefinedKey: Desktop
this class is not key value coding-compliant for the key Desktop.

The app crashed immediately during startup. It worked under a newly created macOS user account but crashed consistently under my primary account, including in Safe Mode.

Reinstalling the app and resetting user-specific app data did not resolve the issue.

Workaround confirmed:

Changing the macOS wallpaper to a regular static image allowed the app to launch successfully.

After applying the workaround, I was also able to reopen my existing local Codex sessions without losing conversation history.

This appears consistent with the wallpaper-related startup regression described in this issue.

yamakawalandpia avatar Nov 20 '26 08:11 yamakawalandpia

I reproduced this on Apple Silicon with macOS 27.2.1 (26B131) and ChatGPT 26.1117.31558 (build 29513). After the update, the app crashed on launch with EXC_BREAKPOINT (SIGTRAP), code 5. Reinstalling the same build and switching to the built-in solid black wallpaper both failed. Setting a static image file as the wallpaper allowed the same build to launch. The crash blocked access to my existing Work conversation and interrupted my CapCut workflow. Please make the app fall back to its default window tint if it cannot read the wallpaper.

netrockin avatar Nov 20 '26 09:11 netrockin

Additional reproduction on macOS 27.2 / Apple M5, with an extra workaround detail about "Show on all Spaces".

Environment

  • ChatGPT/Codex desktop app: 26.1117.31558, build 29513, bundle ID com.openai.codex.
  • Codex Framework: 158.0.8127.37.
  • macOS: 27.2, build 26B123.
  • Hardware: Apple M5 MacBook Pro, ARM64, built-in display.
  • Original wallpaper: Apple's built-in dynamic Tahoe wallpaper, with "Show on all Spaces" disabled.

Observed crash

The app repeatedly terminated shortly after the main window reported window ready-to-show. The main-process crash was EXC_BREAKPOINT / SIGTRAP. The unified log contained this exception (object addresses omitted):

Terminating app due to uncaught exception 'NSUnknownKeyException', reason:
'[<NSTaggedPointerString> valueForUndefinedKey:]: this class is not key value coding-compliant for the key Desktop.'

Relevant frames included valueForUndefinedKey:, valueForKeyPath:, -[NSDictionary(NSKeyValueCoding) valueForKeyPath:], and node.napi.armv8.node / ObjcObject::$MsgSendPrepared.

Reinstalling from the official Codex DMG did not resolve the crash. Temporarily moving aside the Chromium Default profile also did not resolve it; the original profile was restored. Normal system-level codesign --verify --deep --strict verification passed.

Wallpaper-store evidence

Before the workaround, the saved wallpaper store at ~/Library/Application Support/com.apple.wallpaper/Store/Index.plist contained:

AllSpacesAndDisplays = "$null"
SystemDefault: Linked present, Desktop absent
Displays.<display-id>: Linked present, Desktop absent

The bundled observeMacWallpaper fallback uses Objective-C KVC to try Displays.<display-id>.Desktop, AllSpacesAndDisplays.Desktop, and SystemDefault.Desktop. The saved string sentinel and the native Desktop exception are consistent with the failing lookup described in this issue. We did not independently capture the return value of NSWorkspace.desktopImageURL(for:).

Workaround sequence verified on this Mac

  1. Backed up the original wallpaper store.
  2. Used Finder's "Set Desktop Picture" action on Apple's actual static Tahoe image, /System/Library/ExtensionKit/Extensions/NeptuneOneWallpaper.appex/Contents/Resources/TahoeLight.heic.
  3. Relaunched the app with "Show on all Spaces" still disabled. It still crashed with the same Desktop exception.
  4. Enabled "Show on all Spaces" in System Settings > Wallpaper, keeping that static image selected.
  5. The wallpaper store's AllSpacesAndDisplays changed from the string "$null" to a dictionary containing Type and Desktop.
  6. Relaunched the same installed app build. The main process and renderer processes remained running; startup completed, and the log confirmed successful account lookup with the primary window visible.

No session or project data was deleted. The successful configuration on this machine was the static Tahoe image plus "Show on all Spaces" enabled. We did not test re-enabling the dynamic wallpaper afterward, so this report does not establish that both settings are necessary on every affected Mac.

Expected behavior / suggested fix

Wallpaper tint sampling should never prevent the app from launching. Validate intermediate values before nested dictionary lookup, treat "$null" as missing, support Linked entries when appropriate, and fall back to the default tint for unsupported metadata. Please include regression coverage for per-display/per-Space wallpapers where AllSpacesAndDisplays is the string sentinel, including a static image with "Show on all Spaces" disabled.

This report contains sanitized diagnostic excerpts only; no full crash reports, account identifiers, display UUIDs, or conversation contents are attached.

zhaozikai1125 avatar Nov 20 '26 09:11 zhaozikai1125

补充一份用户提供的排查结果,供维护者核查(本次提交未独立复现):

  • 环境:macOS 27.2.1,Codex 26.1117.31558。
  • 现象:启动即崩,NSUnknownKeyException ... key Desktop。
  • 壁纸 store:~/Library/Application Support/com.apple.wallpaper/Store/Index.plist 中,AllSpacesAndDisplays 为字符串 "$null",而不是字典。
  • 疑似触发路径:desktopImageURLForScreen 返回 DefaultDesktop.heic 后,进入壁纸 store 回退分支;app.asar 中的 i(S,"AllSpacesAndDisplays.Desktop") 对字符串执行 valueForKeyPath,抛出上述异常。
  • 版本对比:26.1111.71704 无此代码,正常启动。

建议在执行嵌套 key path 查询前验证父节点类型,并对 "$null" 或其他非字典值安全回退,避免壁纸取色失败阻断应用启动。

Razz0121 avatar Nov 20 '26 10:11 Razz0121

Additional confirmed reproduction on a multi-user Mac mini.

Environment

  • Application: ChatGPT / Codex Desktop
  • Version: 26.1117.31558 (build 29513)
  • Bundle ID: com.openai.codex
  • macOS: 26.6.2, Apple Silicon
  • Two local macOS users: one affected, one unaffected

Observed behavior

After updating the application, ChatGPT consistently crashed during startup under one macOS user, while the same installed application continued working normally under another user.

Launching the executable directly from Terminal produced:

[window-manager] window ready-to-show
*** Terminating app due to uncaught exception 'NSUnknownKeyException'
reason: '[<NSTaggedPointerString ...> valueForUndefinedKey:]:
this class is not key value coding-compliant for the key Desktop.'

Investigation

The affected user's wallpaper configuration contained:

AllSpacesAndDisplays = "$null"

The affected user originally had a built-in black gradient wallpaper, not a third-party animated wallpaper.

Clearing the application cache did not resolve the crash.

Confirmed workaround

  1. Open macOS System Settings → Wallpaper.
  2. Change the wallpaper from the built-in black gradient to the built-in static image "Mac Lilac".
  3. Launch the same ChatGPT application again.

Result: ChatGPT launched successfully. Existing Codex projects and conversations remained available.

No application reinstall or Codex data reset was required.

Additional observation

The issue appears to depend on the wallpaper configuration of the individual macOS user, rather than the application installation itself.

It would be useful to guard native wallpaper key-path lookups against string values such as "$null" and fall back to a default appearance instead of throwing an uncaught exception.

korolevpavel avatar Nov 20 '26 11:11 korolevpavel

I can confirm this issue on my MacBook Pro M5 Pro (64 GB RAM) running macOS 27.2.1 with ChatGPT version 26.1117.31558 (Build 29513).

After updating, ChatGPT crashed immediately on every launch. Reinstalling the application did not help, and switching to a static wallpaper alone did not resolve the issue either.

What fixed it: Enabling "Show on all Spaces" in the macOS wallpaper settings.

After enabling this option, ChatGPT launched successfully again.

Hopefully this helps narrow down the root cause!

ThomasWaghubinger avatar Nov 20 '26 11:11 ThomasWaghubinger

Also affected on macOS 27.2.1 (26B131), Apple Silicon (Mac17,7), with ChatGPT/Codex 26.1117.31558 (build 29513).

After updating, the app repeatedly crashed during startup. The captured exception was NSUnknownKeyException: an NSTaggedPointerString was not key value coding-compliant for the key Desktop.

Confirmed workaround: enabling System Settings → Wallpaper → Show on all Spaces allowed the installed app to launch again.

abhushansahu avatar Nov 20 '26 11:11 abhushansahu

Also affected on macOS 27.2.1 (26B131), Apple Silicon (Mac17,7), with ChatGPT/Codex 26.1117.31558 (build 29513).

After updating, the app repeatedly crashed during startup. The captured exception was NSUnknownKeyException: an NSTaggedPointerString was not key value coding-compliant for the key Desktop.

Confirmed workaround: enabling System Settings → Wallpaper → Show on all Spaces allowed the installed app to launch again.

Another confirmed workaround: Choose a static image, then launch ChatGPT (26.1117.31558, build 29513 in my case, as well. Mac Mini M2 Pro/2023.), then you can change back to rotating images (or whatever!) again... ChatGPT continues to launch ok after reverting the wallpaper, so this appears to be an initialisation issue following the app update rather than a persistent incompatibility with rotating wallpapers. Very weird. But glad I found this page. :)

I had the problem both on Tahoe and after updating to Golden Gate. In case that's useful (26.7.3 and 27.2.1)

andelana avatar Nov 20 '26 11:11 andelana

Additional affected installation, with matching local diagnostic evidence:

  • App: 26.1117.31558, build 29513, bundle identifier com.openai.codex (installed as ChatGPT.app).
  • OS: macOS 27.3, build 26C5047e; ARM64 native crash reports.
  • Impact: the GUI repeatedly exits shortly after launch and is unusable. There are 10 matching crash reports on 2026-11-20, with repeated launch failures between approximately 11:56 and 11:59 UTC.
  • Crash: EXC_BREAKPOINT (SIGTRAP), termination signal 5.

The macOS unified log records this exception (object address removed):

Terminating app due to uncaught exception 'NSUnknownKeyException', reason:
'[<NSTaggedPointerString> valueForUndefinedKey:]: this class is not key value coding-compliant for the key Desktop.'

Relevant frames in the crash reports:

objc_exception_throw
-[NSObject(NSKeyValueCoding) valueForUndefinedKey:]
-[NSObject(NSKeyValueCoding) valueForKey:]
-[NSObject(NSKeyValueCoding) valueForKeyPath:]
-[NSDictionary(NSKeyValueCoding) valueForKeyPath:]
ObjcObject::$MsgSendPrepared(Napi::CallbackInfo const&)
Napi::InstanceWrap<ObjcObject>::InstanceMethodCallbackWrapper(...)

Read-only inspection of ~/Library/Application Support/com.apple.wallpaper/Store/Index.plist found:

AllSpacesAndDisplays: string "$null"
SystemDefault: dictionary with keys Type, Linked
Displays: dictionary; inspected entries contain Type and Linked

Read-only inspection of the installed observeMacWallpaper implementation in .vite/build/early-bootstrap-927-a2afecb5aba3de23.js found the same fallback KVC lookups documented above: Displays.<UUID>.Desktop, then AllSpacesAndDisplays.Desktop, then SystemDefault.Desktop. This is consistent with the string-receiver Desktop exception. We have not instrumented the running app to independently confirm the precise failing JavaScript call or queried the active desktop-image URL.

No app bundle, wallpaper settings, or user data were modified during this investigation. The static-wallpaper workaround and a rollback have not been tested on this installation. Please ensure unexpected wallpaper-store types cannot terminate GUI startup; falling back to a default window tint would preserve usability.

Only sanitized excerpts are included; no full logs, local usernames, display UUIDs, project paths, or account data are attached.

tommy15zhang avatar Nov 20 '26 12:11 tommy15zhang

What fixed it: Enabling "Show on all Spaces" in the macOS wallpaper settings.

this

bymaer avatar Nov 20 '26 12:11 bymaer