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:
- Enable JetBrains to Codex switching plugins (like
switch2cursor for 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
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
switch2cursorJetBrains plugin (32k+ downloads, MIT license) uses these APIs. A community member is trying to build the equivalentSwitch2Codexplugin 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 contextpath:line:columnreferences ARE clickable and navigate correctly (when not broken, cf. issue Regression on Windows in v0.4.79:absolute_path:line:columnno longer opens file location (worked in v0.4.73) #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
fileoropenhost exists.The
EA()parameter extractor supports:hostId,marketplace,originUrl,path,prompt,returnTo,source→ No
lineorcolumnparameters.The
OA()argv parser only handles--open-project, bare paths (Windows only), andcodex://URLs→ No
--gotoflag.Proposed solution
1. URL scheme:
codex://file/<absolute_path>:<line>:<column>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>Cross-platform parity with Cursor's
cursor --gotoflag.3. (Optional) URL query variant for web compatibility
Why this matters
The
codex://URL scheme already exists and is registered on macOS viasetAsDefaultProtocolClient("codex"). The file navigation logic already exists internally (chat references supportpath:line:colformat, per issue #13339). Adding external access to this capability would:switch2cursorfor Cursor)Related issues
absolute_path:line:columnno longer opens file location (worked in v0.4.73) #13339 —path:line:columnnavigation exists internally but had Windows regression