codex app <path> launches Desktop but opens the previously used workspace instead of the requested one

Open 💬 2 comments Opened Jun 28, 2026 by kentprimrose

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

26.623.42026

What subscription do you have?

Pro

What platform is your computer?

Mac

What issue are you seeing?

Environment

macOS
Codex CLI: v0.142.3
Codex Desktop: (from Codex → About Codex)

Steps to reproduce

cd ~/dev/projects/mlvest-lab
codex app "$(pwd)"

Observed

CLI prints:

Opening Codex Desktop at /Applications/Codex.app...
Opening workspace /Users/kent/dev/projects/mlvest-lab...

However, the Desktop app opens the previously used workspace (agency) instead of mlvest-lab.

Expected

The Desktop app should open the workspace specified on the command line.

Additional evidence

codex -C "$(pwd)"

opens correctly in

~/dev/projects/mlvest-lab

which suggests the CLI is correctly resolving and passing the directory, while the Desktop app is not honoring it.

What steps can reproduce the bug?

cd ~/dev/projects/mlvest-lab
codex app "$(pwd)"

What is the expected behavior?

The Desktop app should open the workspace specified on the command line.

Additional information

codex -C "$(pwd)"

opens correctly in

~/dev/projects/mlvest-lab

which suggests the CLI is correctly resolving and passing the directory, while the Desktop app is not honoring it.

View original on GitHub ↗

2 Comments

bharatagarwal · 1 month ago

I’m seeing the same behavior on macOS. Repo/workspace names below are anonymized, but the command shape and observed behavior are real.

Versions:

  • Codex CLI: 0.142.5
  • Codex Desktop: 26.623.141536
  • Platform: macOS

Steps:

cd /Users/example/workspaces/project-redwood
codex app .

CLI prints:

Opening Codex Desktop at /Applications/Codex.app...
Opening workspace /Users/example/workspaces/project-redwood...

Observed:
Desktop opens/shows the previously used workspace, e.g. project-cobalt, instead of project-redwood.

Expected:
Per codex app --help, the optional PATH is the “Workspace path to open in Codex Desktop”, defaulting to .. The Desktop composer should therefore use /Users/example/workspaces/project-redwood.

Additional evidence:
I instrumented the macOS open invocation and confirmed that the CLI appears to construct the correct deep link, equivalent to:

codex://threads/new?path=%2FUsers%2Fexample%2Fworkspaces%2Fproject-redwood

So the likely failure boundary is Desktop’s handling/restoration of the requested workspace path, not CLI path resolution.

MartinKolarik · 1 day ago

I can reproduce a Windows-specific variant of this issue after the last update. The key detail is that it only fails when the desktop app is already running.

Environment

  • Codex App: 26.820.7780.0
  • Codex CLI: 0.149.1
  • Platform: Microsoft Windows NT 10.0.26200.0 x64
  • Shell: PowerShell

Steps to reproduce

  1. Fully quit the Codex desktop app.
  2. Run:

``powershell
codex app C:/Projects/example-repo
``

  1. The app launches and opens C:\Projects\example-repo correctly.
  2. While keeping the app running, switch to another project.
  3. Run the same command again:

``powershell
codex app C:/Projects/example-repo
``

The CLI prints:

Opening workspace C:\Projects\example-repo in the Desktop app...

Actual behavior

The already-running app is brought forward, but it remains on the previously selected project. The requested workspace is not opened or selected.

Expected behavior

The running app should switch to C:\Projects\example-repo, matching the behavior when the app is launched from a fully closed state.