[macOS][26.908.31748] Enabling Pet causes “r is not a function” AppRoutes crash; disabling Pet fixes startup
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What version of the Codex App are you using?
ChatGPT/Codex Desktop 26.908.31748 (bundle identifier com.openai.codex).
Observed local Codex app-server: 0.154.0-alpha.6.1.
What subscription do you have?
ChatGPT Plus.
What platform is your computer?
macOS 26.5.1, Apple Silicon / arm64.
What issue are you seeing?
When the Codex Pet is enabled, the desktop app enters the generic “ChatGPT hit a snag” error state. Disabling/removing the Pet makes the error disappear and the app works normally.
This is reproducible and isolates the failure to the Pet/avatar overlay path in my environment.
Relevant desktop log entries:
warning [electron-message-handler] Initial route prefetch failed; rendering will retry
errorMessage="r is not a function"
errorName=Error
errorStack="Error: r is not a function"
route=primary
rendererWindowAppearance=primary
error [electron-message-handler] error boundary
errorMessage="r is not a function"
errorName=Error
errorStack="Error: r is not a function"
name=AppRoutes
rendererWindowAppearance=primary
The same AppRoutes error also occurs in the Pet overlay renderer:
error [electron-message-handler] error boundary
errorMessage="r is not a function"
errorName=Error
errorStack="Error: r is not a function"
name=AppRoutes
rendererWindowAppearance=avatarOverlay
After the renderer failure, secondary warnings appear, including:
Socket error errorCode=EPIPE errorMessage="write EPIPE"
Codex app-server is not available
Connection for host ID local not found
These occur after the initial r is not a function / AppRoutes failure.
Steps to reproduce
- Launch ChatGPT/Codex Desktop on macOS.
- Enable/show the Codex Pet.
- Restart/open the app with the Pet enabled.
- Observe the “ChatGPT hit a snag” recovery screen and
AppRoutes/r is not a functionerrors in the desktop log. - Disable/remove the Pet.
- Relaunch the app.
- The error disappears and the app works normally.
Re-enabling the Pet causes the problem to return.
Expected behavior
Enabling the Pet should not cause either the avatarOverlay renderer or the primary application route to enter an error boundary. The main Codex UI should remain usable with the Pet enabled.
Troubleshooting already performed
Before isolating the Pet trigger, I tried the following without fixing the problem:
- Reinstalled the desktop app.
- Temporarily disabled
~/.codex/config.toml. - Reset
~/Library/Application Support/com.openai.codex. - Retested startup after those resets.
The decisive workaround is disabling the Pet.
Additional information
There are existing reports for the same r is not a function / AppRoutes regression and a Windows report specifically involving avatarOverlay (#44739, #44743, #44720). This report adds a macOS reproduction where toggling the Pet cleanly controls whether the failure occurs.
No credentials, account identifiers, thread IDs, or full raw logs are included here.
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.
Research direction
Start by reproducing startup with the Codex Pet enabled and compare the AppRoutes/avatarOverlay failures with related issues #44739, #44743, and #44720. Trace the Pet overlay and primary route error paths; done means the app starts and remains usable with the Pet enabled, without the “r is not a function” error boundary.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, rust
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100