Skip to content

Feature Request: codex://file/<path>:<line>:<col> deep link and --goto CLI flag for IDE/editor switching #22474

@kouzhihao

Description

@kouzhihao

Problem

Codex currently has no external API for other tools to open a specific file at a specific line:column position in the Codex desktop app. This blocks editor-switching workflows where developers want to jump from JetBrains IDE (or any other tool) directly into Codex at the exact same location.

Precedent: Cursor supports both:

  • cursor://file/<absolute_path>:<line>:<column> (URL scheme on macOS)
  • cursor --goto <absolute_path>:<line>:<column> (CLI flag on all platforms)

The existing switch2cursor JetBrains plugin (32k+ downloads, MIT license) uses these APIs. A community member is trying to build the equivalent Switch2Codex plugin but is blocked by this missing capability.

Current state (reverse-engineered from Codex.app v26.506.31421)

What works

What is missing

From the DA() URL parser in the app.asar (workspace-root-drop-handler):

Supported URL hosts: plugins, automations, codex-app, connector, new, settings, skills, threads
No file or open host exists.

The EA() parameter extractor supports: hostId, marketplace, originUrl, path, prompt, returnTo, source
No line or column parameters.

The OA() argv parser only handles --open-project, bare paths (Windows only), and codex:// URLs
No --goto flag.

Proposed solution

1. URL scheme: codex://file/<absolute_path>:<line>:<column>

codex://file/Users/alice/project/src/main.kt:42:10

This should open the file in Codex and navigate cursor to line 42, column 10.
On macOS this would work via open "codex://file/path:line:col".

2. CLI flag: codex --goto <path>:<line>:<column>

codex --goto /Users/alice/project/src/main.kt:42:10

Cross-platform parity with Cursor's cursor --goto flag.

3. (Optional) URL query variant for web compatibility

codex://open?file=/absolute/path&line=42&column=10

Why this matters

The codex:// URL scheme already exists and is registered on macOS via setAsDefaultProtocolClient("codex"). The file navigation logic already exists internally (chat references support path:line:col format, per issue #13339). Adding external access to this capability would:

  1. Enable JetBrains to Codex switching plugins (like switch2cursor for Cursor)
  2. Allow any tool (terminals, browsers, other editors) to deep-link into Codex
  3. Improve the multi-tool developer workflow that Codex is designed for

Related issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appenhancementNew feature or request

    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