Skip to content

Windows: codex app PATH should open Codex Desktop workspace via codex:// deep link #26423

@postigodev

Description

@postigodev

What variant of Codex are you using?

CLI + Codex Desktop App (Windows)

What feature would you like to see?

On Windows, codex app . currently launches or focuses Codex Desktop, but it does not open the provided directory as the active workspace.

From PowerShell:

cd C:\Users\akuma\repos\koba
codex app .

prints:

Opening Codex Desktop...
In Codex Desktop, open workspace C:\Users\akuma\repos\koba.

Codex Desktop opens, but it does not automatically open C:\Users\akuma\repos\koba as the active workspace.

This creates friction compared to the expected code .-style workflow, where a developer can cd into a repo and open the GUI tool directly from the terminal.

Steps to reproduce

On Windows, from PowerShell:

cd C:\Users\akuma\repos\koba
codex app .

Actual behavior

Codex Desktop opens or is focused, but the workspace is not opened automatically. The CLI only prints the local path and asks the user to open it manually.

Expected behavior

codex app . should open Codex Desktop with the resolved current directory as the active workspace.

For example:

codex app .
codex app C:\Users\akuma\repos\koba

should behave similarly to:

code .

Additional investigation

The Desktop app already appears to support opening a workspace through the documented codex:// deep link.

This PowerShell workaround successfully opens Codex Desktop with the intended workspace:

cd C:\Users\akuma\repos\koba
$p = (Resolve-Path .).Path
$u = "codex://threads/new?path=$([uri]::EscapeDataString($p))"
Start-Process $u

This produces:

codex://threads/new?path=C%3A%5CUsers%5Cakuma%5Crepos%5Ckoba

and opens Codex Desktop with C:\Users\akuma\repos\koba as the workspace.

So the missing piece may be in the Windows implementation of codex app PATH: instead of only printing the path, it could resolve the path to an absolute directory, URL-encode it, and invoke the registered codex://threads/new?path=<encoded-path> deep link through the Windows shell.

Image

Environment

  • OS: Windows
  • Shell tested: PowerShell
  • Codex CLI version: codex-cli 0.137.0
  • Codex CLI path: C:\Users\akuma\AppData\Local\Programs\OpenAI\Codex\bin\codex.exe
  • Command tested: codex app .
  • Workspace path: C:\Users\akuma\repos\koba

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLIenhancementNew feature or requestwindows-osIssues related to Codex on Windows systems

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions