codex - 💡(How to fix) Fix Feature Request: codex://file/<path>:<line>:<col> deep link and --goto CLI flag for IDE/editor switching [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#22474Fetched 2026-05-14 03:35:20
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
labeled ×2

Root Cause

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

Code Example

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

---

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

---

codex://open?file=/absolute/path&line=42&column=10
RAW_BUFFERClick to expand / collapse

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:column references 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, threadsNo file or open host exists.

The EA() parameter extractor supports: hostId, marketplace, originUrl, path, prompt, returnTo, sourceNo 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

  • #13339 — path:line:column navigation exists internally but had Windows regression
  • #18314 — Custom URL scheme handling issues (relevant background)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Feature Request: codex://file/<path>:<line>:<col> deep link and --goto CLI flag for IDE/editor switching [1 participants]