Feature Request: codex://file/<path>:<line>:<col> deep link and --goto CLI flag for IDE/editor switching
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
codex app <project_path>— opens the desktop app with a workspace folder--open-project <path>— CLI arg parsed into{kind: "newThread", path}codex://new?path=/some/dir— deep link to create a new thread with path context- Internal chat:
path:line:columnreferences ARE clickable and navigate correctly (when not broken, cf. issue #13339)
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:
- Enable JetBrains to Codex switching plugins (like
switch2cursorfor Cursor) - Allow any tool (terminals, browsers, other editors) to deep-link into Codex
- Improve the multi-tool developer workflow that Codex is designed for
Related issues
- #13339 —
path:line:columnnavigation exists internally but had Windows regression - #18314 — Custom URL scheme handling issues (relevant background)