Codex App crashes after typing `@` in the new-conversation composer

Open 💬 0 comments Opened Jul 7, 2026 by Johnny-xuan

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

Codex App: 26.623.141536 (CFBundleVersion 4753) Bundled CLI: codex-cli 0.142.5

What subscription do you have?

Pro

What platform is your computer?

macOS 26.4.1 (25E253), Apple Silicon / arm64

What issue are you seeing?

Typing @ in the Codex App new-conversation composer can crash the entire desktop UI into the full-window error boundary:

Oops, an error has occurred

After this happens, restarting the app does not recover it. The app immediately returns to the same error screen because the composer draft is restored from local state. In my repro, the restored draft was @w, which appears to reopen the same @ mention/search UI during startup and crash again.

The only reliable recovery I found was to quit Codex and clear the persisted composer draft from ~/.codex/.codex-global-state.json. I did not need to delete threads, sessions, auth state, or the app-server state.

What steps can reproduce the bug?

  1. Open Codex App.
  2. Start a new conversation.
  3. Focus the composer.
  4. Type @w or @m.
  5. The app switches to the Oops, an error has occurred screen.
  6. Quit and reopen Codex App.
  7. The app opens back into the same error screen instead of recovering.

I reproduced this twice. On the second repro, the relevant persisted state contained:

{
  "electron-persisted-atom-state": {
    "composer-prompt-drafts-v1": {
      "new-conversation": "@w"
    }
  }
}

Clearing only electron-persisted-atom-state.composer-prompt-drafts-v1 allowed the app to open normally again.

What is the expected behavior?

Typing @ should open the mention/search UI without crashing the app.

If a path, workspace root, thread root, or search result used by the @ menu is missing or invalid, the app should skip that entry or show an inline error. It should not throw through the app-level error boundary, and a persisted composer draft should not be able to trap the app in a crash loop across restarts.

Additional information

The renderer log shows this error when the UI crashes:

errorMessage="Cannot read properties of undefined (reading 'match')"
errorName=Error
name=AppRoutes

Top of the renderer error stack:

Error: Cannot read properties of undefined (reading 'match')
    at Object.postMessage (app://-/assets/app-initial~app-main~worktree-init-v2-page~appgen-settings-page~page~appgen-publication-ter~fzo5ij6p-BKVLyD1q.js:99:23516)
    at e.dispatchMessage (app://-/assets/app-initial~app-main~worktree-init-v2-page~appgen-settings-page~page~appgen-publication-ter~fzo5ij6p-BKVLyD1q.js:99:24670)
    at app://-/assets/app-initial~app-main~worktree-init-v2-page~appgen-settings-page~page~appgen-publication-ter~fzo5ij6p-BKVLyD1q.js:99:25153
    at EP (app://-/assets/app-initial~app-main~worktree-init-v2-page~appgen-settings-page~page~appgen-publication-ter~fzo5ij6p-BKVLyD1q.js:99:23046)
    at kP (app://-/assets/app-initial~app-main~worktree-init-v2-page~appgen-settings-page~page~appgen-publication-ter~fzo5ij6p-BKVLyD1q.js:99:23112)

The top of the component stack includes the composer/mention-search area:

at B4e (app://-/assets/app-initial~app-main~onboarding-page-CNHnOMz8.js:337:219208)
at fM (app://-/assets/app-initial~app-main~onboarding-page-CNHnOMz8.js:337:217597)
at Suspense (<anonymous>)

The app-server appeared to start and initialize successfully before the renderer crash. This looks frontend-side: the @ mention/search UI seems to pass an undefined path-like value into a path normalizer that calls .match(...).

Recovery workaround:

bash
osascript -e 'tell application "Codex" to quit'
cp ~/.codex/.codex-global-state.json ~/.codex/.codex-global-state.json.bak
node -e 'const fs=require("fs"); const p=process.env.HOME+"/.codex/.codex-global-state.json"; const data=JSON.parse(fs.readFileSync(p,"utf8")); data["electron-persisted-atom-state"] ??= {}; data["electron-persisted-atom-state"]["composer-prompt-drafts-v1"] = {}; fs.writeFileSync(p, JSON.stringify(data,null,2)+"\n");'
open -a Codex

I’m happy to provide additional logs, test a patched build, or help verify the fix if needed.🥰

View original on GitHub ↗