Skip to content

Windows Codex app deep link / OAuth callback fails: "Unable to find Electron app" #25188

Open

Description

@dnl2052

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

26.527.3686.0

What subscription do you have?

Pro

What platform is your computer?

Windows

What issue are you seeing?

Description:
On Windows, Codex desktop app opens and Codex CLI works, but browser OAuth callbacks fail when signing in or connecting the Figma MCP plugin.

What happens:

  • Browser login succeeds and shows localhost:1455/success
  • Browser/Windows tries to open Codex
  • Error appears: "Unable to find Electron app"
  • Error path references:
    C:\Program Files\WindowsApps\OpenAI.Codex_26.527.3686.0_x64__2p2nqsd0c76g0\app\codex...\new
  • Same issue happens when connecting Figma MCP in Codex Plugins.

Environment:

  • Windows
  • Codex App version: 26.527.3686.0
  • Codex CLI version: 0.135.0
  • Browser: Microsoft Edge
  • Package:
    OpenAI.Codex_26.527.3686.0_x64__2p2nqsd0c76g0

Already tried:

  • Reset Codex app from Windows settings
  • Restarted Windows
  • Get-AppxPackage OpenAI.Codex | Reset-AppxPackage
  • Logged out/in
  • Installed Codex CLI
  • Figma plugin authorization reaches browser but callback back to Codex fails

Expected:
Browser OAuth/deep link should return to the Codex desktop app and finish login/plugin setup.

What steps can reproduce the bug?

Feedback ID: no-active-thread-019e764f-97a0-7920-86ba-64c17e9675cb

What is the expected behavior?

No response

Additional information

No response

Activity

  1. added
    appIssues related to the Codex desktop app
    on May 30, 2026
  2. added
    bugSomething isn't working
    windows-osIssues related to Codex on Windows systems
    authIssues related to authentication and accounts
    mcpIssues related to the use of model context protocol (MCP) servers
    on May 30, 2026
  3. github-actions commented on May 30, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  4. sined-rahkuk commented on May 30, 2026

    @sined-rahkuk

    I'm seeing the same Windows/AppX deep-link failure on Codex App 26.527.3686.0, with a separate reproduction path from Linear's "Open in -> Codex desktop" integration.

    Environment:

    • Windows 11
    • Codex App: 26.527.3686.0
    • Package: OpenAI.Codex_26.527.3686.0_x64__2p2nqsd0c76g0
    • Codex CLI: 0.130.0-alpha.5
    • Workspace path: C:\Users\kukha\Desktop\saiden.ai
    • Linear desktop app is installed and its own protocol association looks normal: "C:\Users\kukha\AppData\Local\Programs\Linear\Linear.exe" "%1"

    Repro from Linear:

    1. In Linear desktop, right click an issue.
    2. Choose Open in -> Codex desktop.
    3. Windows/Electron shows an error dialog:
      • Error launching app
      • Unable to find Electron app at C:\Program ...?prompt=Work%20on%20Linear%20issue...
      • Cannot find module 'C:\Program ...?prompt=Work%20on%20Linear%20issue...'

    Additional local checks:

    • codex://new?prompt=...&path=C%3A%5CUsers%5Ckukha%5CDesktop%5Csaiden.ai also fails the same way.
    • Directly starting the packaged app with a project path / --open-project produced the same class of error, where Electron treated C:\Users\kukha\Desktop\saiden.ai as the Electron app path/module.
    • Extracting the app bundle showed code paths that appear to parse codex://new?... and path, so this looks like the Windows/AppX/Electron activation path is passing the URL/path to Electron before the app's own deep-link parser can handle it.

    Impact:
    Linear's Codex Desktop integration can't create/open a desktop thread on Windows. We had to fall back to a workaround that opens Codex Desktop without args and copies the Linear prompt to the clipboard.

    This is especially relevant for teams running the desktop app on Windows now and migrating agent execution into WSL later: the failure happens before workspace runtime choice matters, so WSL doesn't avoid it.

  5. marlonka commented on Jun 1, 2026

    @marlonka

    I can reproduce this with Gmail connector OAuth on Windows.

    Additional confirmation:

    • Codex was already open and focused.
    • Reproduces in both Chrome and Brave.
    • Full uninstall/reinstall did not fix it.
    • Also reproduces with Codex Beta after changing the CODEX link type to Codex Beta in Windows default apps.
    • OAuth callback URL is codex://oauth_callback?state=...
    • Electron error treats the callback as a filesystem path:
      C:\Program Files\WindowsApps...\oauth_callback?state=...

    This blocks plugin/connector OAuth setup, including Gmail.

  6. Mylesoft commented on Jun 2, 2026

    @Mylesoft

    I’m seeing the same Windows OAuth/deep-link failure when connecting Codex marketplace plugins/connectors.

    Environment:

    • Windows 11
    • Codex Windows app: OpenAI.Codex_26.527.7698.0_x64__2p2nqsd0c76g0
    • ChatGPT Windows app: OpenAI.ChatGPT-Desktop_1.2026.133.0_x64__2p2nqsd0c76g0
    • Browser: Chrome

    Repro:

    1. Install a plugin from the Codex plugin marketplace.
    2. Try to connect/authorize a provider.
    3. Browser authorization succeeds and attempts to return via a desktop deep link.
    4. Windows launches the desktop app, but Electron shows:
    Error launching app
    Unable to find Electron app at C:\Program ...\oauth_callback?code=...
    Cannot find module 'C:\Program ...\oauth_callback?code=...'
    

    Providers reproduced:

    • Slack plugin/connect flow
    • Convex plugin/connect flow
    • OpenAI Developers plugin/connect flow

    What I tried locally:

    • Re-registered the Codex AppX package with Add-AppxPackage -DisableDevelopmentMode -Register ...\OpenAI.Codex...\AppxManifest.xml
    • Installed ChatGPT from Microsoft Store via winget install --id=9NT1R1C2HH7J --source=msstore
    • Re-registered the ChatGPT AppX package with Add-AppxPackage -DisableDevelopmentMode -Register ...\OpenAI.ChatGPT-Desktop...\AppxManifest.xml
    • Verified chatgpt:// is registered under HKEY_CLASSES_ROOT\chatgpt
    • Verified ChatGPT’s AppX handler exists as AppX3tncadb9jesbf7n7rdjbat6deztktxgp
    • Rebooted and retried from a fresh plugin connection flow

    Result: still fails the same way. The desktop app receives chatgpt://oauth_callback?... / OAuth callback handoff, but Electron appears to treat the callback URL/path as the app path instead of passing it into the running app.

  7. tugkan98 commented on Jun 2, 2026

    @tugkan98

    I reproduced this on Windows with Codex App 26.527.7698.0.

    Error:
    Unable to find Electron app at:
    C:\Program Files\WindowsApps\OpenAI.Codex_26.527.7698.0_x64__2p2nqsd0c76g0\app\codex:

    Context:

    • Plugin/connector OAuth callback failed when the browser opened codex://...
    • Re-registering the AppX package did not fix it.

    Workaround that fixed it:
    Set the protocol handler to launch Electron with app.asar first, then the callback URL:

    "C:\Program Files\WindowsApps\OpenAI.Codex_26.527.7698.0_x64__2p2nqsd0c76g0\app\Codex.exe" "C:\Program Files\WindowsApps\OpenAI.Codex_26.527.7698.0_x64__2p2nqsd0c76g0\app\resources\app.asar" "%1"

  8. Darin19 commented on Jun 2, 2026

    @Darin19

    same error for Chrome plugin 😢

  9. stephantamminga commented on Jun 2, 2026

    @stephantamminga

    Also in 26.527.60818

    Partial fix script below. Plugins work, but still throws the error when Codex notifications are clicked in the Windows notification bar:

    $pkg = Get-AppxPackage OpenAI.Codex |
      Sort-Object Version -Descending |
      Select-Object -First 1
    
    if (-not $pkg) {
      throw "OpenAI.Codex package not found"
    }
    
    $codexExe = Join-Path $pkg.InstallLocation "app\Codex.exe"
    $appAsar = Join-Path $pkg.InstallLocation "app\resources\app.asar"
    $command = "`"$codexExe`" `"$appAsar`" `"%1`""
    
    $codexAppxProgId = "AppXybfp6cjpb1wf0pftw0fd4bz59gzn1401"
    
    $keys = @(
      "HKCU:\Software\Classes\codex\shell\open\command",
      "HKCU:\Software\Classes\$codexAppxProgId\Shell\open\command"
    )
    
    foreach ($key in $keys) {
      New-Item -Path $key -Force | Out-Null
      Set-Item -Path $key -Value $command
    }
    
    New-Item -Path "HKCU:\Software\Classes\codex" -Force | Out-Null
    Set-Item -Path "HKCU:\Software\Classes\codex" -Value "URL:Codex Protocol"
    New-ItemProperty -Path "HKCU:\Software\Classes\codex" -Name "URL Protocol" -Value "" -PropertyType String -Force | Out-Null
    
    Write-Host "Set handler command:"
    Write-Host $command
    
    Write-Host ""
    Write-Host "Verify:"
    reg query HKCU\Software\Classes\codex\shell\open\command /ve
    reg query HKCU\Software\Classes\$codexAppxProgId\Shell\open\command /ve
    
    Read-Host "Press Enter to test codex://new"
    Start-Process "codex://new"
    
    Read-Host "Press Enter to close"
    
  10. Stropical commented on Jun 2, 2026

    @Stropical

    Also in 26.527.60818

    Partial fix script below. Plugins work, but still throws the error when Codex notifications are clicked in the Windows notification bar:

    $pkg = Get-AppxPackage OpenAI.Codex |
      Sort-Object Version -Descending |
      Select-Object -First 1
    
    if (-not $pkg) {
      throw "OpenAI.Codex package not found"
    }
    
    $codexExe = Join-Path $pkg.InstallLocation "app\Codex.exe"
    $appAsar = Join-Path $pkg.InstallLocation "app\resources\app.asar"
    $command = "`"$codexExe`" `"$appAsar`" `"%1`""
    
    $codexAppxProgId = "AppXybfp6cjpb1wf0pftw0fd4bz59gzn1401"
    
    $keys = @(
      "HKCU:\Software\Classes\codex\shell\open\command",
      "HKCU:\Software\Classes\$codexAppxProgId\Shell\open\command"
    )
    
    foreach ($key in $keys) {
      New-Item -Path $key -Force | Out-Null
      Set-Item -Path $key -Value $command
    }
    
    New-Item -Path "HKCU:\Software\Classes\codex" -Force | Out-Null
    Set-Item -Path "HKCU:\Software\Classes\codex" -Value "URL:Codex Protocol"
    New-ItemProperty -Path "HKCU:\Software\Classes\codex" -Name "URL Protocol" -Value "" -PropertyType String -Force | Out-Null
    
    Write-Host "Set handler command:"
    Write-Host $command
    
    Write-Host ""
    Write-Host "Verify:"
    reg query HKCU\Software\Classes\codex\shell\open\command /ve
    reg query HKCU\Software\Classes\$codexAppxProgId\Shell\open\command /ve
    
    Read-Host "Press Enter to test codex://new"
    Start-Process "codex://new"
    
    Read-Host "Press Enter to close"
    

    This fix worked for me on Win11 attempting to install Linear plugin. Thank you!

  11. marlonka commented on Jun 3, 2026

    @marlonka

    Confirming the workaround posted above also fixes connector/plugin OAuth callbacks on my machine.

    Tested with:

    OpenAI.Codex_26.601.1994.0_x64__2p2nqsd0c76g0
    Windows 11
    

    The key part is the same as already reported: the protocol handler needs to launch Electron with resources/app.asar before the deep-link argument:

    "...\app\Codex.exe" "...\app\resources\app.asar" "%1"
    

    One additional detail: this only fixes the normal codex:// protocol path. Clicking Codex notifications from the Windows notification center still throws the same Electron error for me.

    That remaining failure appears to bypass the codex:// shell command and activate the packaged app through the MSIX AppUserModelID/package metadata instead, e.g.:

    OpenAI.Codex_2p2nqsd0c76g0!App
    PackageRelativeExecutable = app\Codex.exe
    

    So the notification path still seems to launch something equivalent to:

    Codex.exe "?type=click&tag=..."
    

    instead of:

    Codex.exe "...\resources\app.asar" "?type=click&tag=..."
    

    So the workaround is useful for connector/plugin OAuth, but the long-term product fix likely needs to cover every Windows activation path, including toast notification activation, not only the codex:// URL association.

  12. stephantamminga commented on Jun 3, 2026

    @stephantamminga

    I'm getting reports of the issue being solved in 26.601.21317

  13. dvdxfv commented on Jun 4, 2026

    @dvdxfv

    Additional repro/evidence from another Windows machine, specifically with Figma remote MCP OAuth.

    Environment:

    • Codex Desktop package: OpenAI.Codex_26.527.7698.0_x64__2p2nqsd0c76g0
    • App executable: C:\Program Files\WindowsApps\OpenAI.Codex_26.527.7698.0_x64__2p2nqsd0c76g0\app\Codex.exe
    • Platform: Windows, Store/MSIX install
    • Connector: Figma remote MCP server, https://mcp.figma.com/mcp

    Repro:

    1. In Codex Desktop, start connecting/authorizing Figma MCP.
    2. Browser opens the Figma authorization page.
    3. Click Agree & Allow Access.
    4. Browser redirects to codex://connector/oauth_callback?code=...&state=codex_scheme_oauth....
    5. Windows opens an Electron error dialog instead of the running Codex Desktop app completing OAuth.

    Observed dialog:

    Error launching app
    
    Unable to find Electron app at C:\Program
    ...\oauth_callback?code=[REDACTED]&state=codex_scheme_oauth...
    
    Cannot find module 'C:\Program
    ...\oauth_callback?code=[REDACTED]&state=codex_scheme_oauth...'
    

    Local investigation:

    • The MSIX/AppX package manifest declares the codex protocol.
    • The AppX ProgID seen locally was AppXybfp6cjpb1wf0pftw0fd4bz59gzn1401.
    • Process inspection showed the failing activation starts a new process with the callback URL as a bare positional argument, effectively like:
      Codex.exe codex://connector/oauth_callback?code=...&state=...
      
    • Extracting app.asar showed Codex has code that scans process.argv for codex://... and maps connector/oauth_callback into a connector OAuth callback route, but the cold-start Electron/Owl path appears to interpret the URL as an app path before that handler succeeds.
    • A local registry experiment that launches the same executable with -- "%1" changed the process command line to:
      Codex.exe -- "codex://diagnostic-appx-progid-double-dash/"
      
      which suggests the missing -- / activation argument handling is part of the failure mode.

    Workaround validated:

    • Authorizing the same Figma MCP through Codex CLI works because it uses localhost loopback OAuth instead of the codex:// desktop callback.
    • Command used:
      codex mcp add figma --url https://mcp.figma.com/mcp
    • After authorization, codex mcp list showed:
      figma   https://mcp.figma.com/mcp   enabled   OAuth
      

    Expected:
    The existing/running Codex Desktop app should receive codex://connector/oauth_callback?... and complete connector OAuth.

    Actual:
    The Store/MSIX Windows desktop app opens a new Electron error dialog and treats the callback URL/path as an Electron app module path, so Figma MCP desktop authorization cannot complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appauthIssues related to authentication and accountsbugSomething isn't workingmcpIssues related to the use of model context protocol (MCP) serverswindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions