codex - ✅(Solved) Fix Desktop app code hyperlinks open the file but do not navigate to the referenced line [1 pull requests, 2 comments, 2 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#17681Fetched 2026-04-14 05:41:22
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×3commented ×2cross-referenced ×1

Fix Action

Fixed

PR fix notes

PR #1: [codex] Prefer #L anchors for absolute file links

Description (problem / solution / changelog)

What changed

  • update the shared file-reference guidance in the prompt templates to prefer #Lline[Ccolumn] for absolute paths, especially Windows drive-letter paths
  • replace the Windows example from C:\repo\project\main.rs:12:5 to C:\repo\project\main.rs#L12C5
  • propagate the same guidance into the bundled models.json prompt payloads so shipped instructions stay in sync

Why

Desktop code links currently open the file view but can miss the referenced line. The public repo does not appear to contain the private desktop click-handler, so this change addresses the public side we can control: the emitted link format. Using #L... avoids the ambiguous C: + :line shape on Windows absolute paths while staying compatible with the existing markdown renderer.

Impact

  • nudges generated absolute file links toward the line-anchor form that is less likely to be misparsed by the desktop client
  • keeps relative-path examples unchanged, where :line[:column] is still acceptable

Validation

  • git diff --check
  • Get-Content codex-rs/models-manager/models.json -Raw | ConvertFrom-Json | Out-Null

Related issue: openai/codex#17681.

Changed files

  • codex-rs/core/gpt-5.1-codex-max_prompt.md (modified, +2/-2)
  • codex-rs/core/gpt-5.2-codex_prompt.md (modified, +2/-2)
  • codex-rs/core/gpt_5_1_prompt.md (modified, +2/-2)
  • codex-rs/core/gpt_5_2_prompt.md (modified, +2/-2)
  • codex-rs/core/gpt_5_codex_prompt.md (modified, +2/-2)
  • codex-rs/core/prompt_with_apply_patch_instructions.md (modified, +2/-2)
  • codex-rs/core/templates/model_instructions/gpt-5.2-codex_instructions_template.md (modified, +2/-2)
  • codex-rs/models-manager/models.json (modified, +16/-16)
  • codex-rs/models-manager/prompt.md (modified, +2/-2)
  • codex-rs/protocol/src/prompts/base_instructions/default.md (modified, +2/-2)
RAW_BUFFERClick to expand / collapse

What version of Codex is running?

Codex desktop app on Windows, reproduced on April 13, 2026. I do not have the exact build number in this report.

What subscription do you have?

Pro

Which model were you using?

gpt-5.4

What platform is your computer?

Windows

What issue are you seeing?

When the assistant returns clickable local file hyperlinks with line references, clicking the link opens the View Code panel for the correct file, but it does not navigate to the referenced line.

For example, links rendered like:

  • privacyassistant.py (line 868)
  • privacyassistant.py (line 1099)

open privacyassistant.py in View Code, but the editor lands at the file itself rather than the referenced line.

What steps can reproduce the bug?

  1. Use the Codex desktop app.
  2. Get a response that includes clickable local file links with line references.
  3. Click one of the links in the conversation pane.
  4. Observe that View Code opens the correct file, but not the referenced line.

What is the expected behavior?

Clicking a file hyperlink with a line reference should:

  • open the correct file in View Code, and
  • navigate directly to the referenced line, ideally with focus or highlight on that line.

Additional information

  • The file resolution itself works correctly; only the line navigation appears to be missing.
  • I reproduced this with multiple line-specific links in the same response.
  • I have screenshots showing the conversation link and the resulting View Code panel state, if needed.

extent analysis

TL;DR

The issue may be resolved by modifying the link handling logic to properly parse and utilize the line reference information when opening files in the View Code panel.

Guidance

  • Verify that the line reference information is being correctly extracted from the hyperlink and passed to the View Code panel.
  • Check the implementation of the View Code panel's file opening logic to ensure it supports line navigation based on the provided reference.
  • Investigate if there are any existing configuration options or settings that could be enabling or disabling line navigation in the View Code panel.
  • Consider adding logging or debugging statements to track how the line reference information is being handled when a link is clicked.

Example

No specific code example can be provided without more details on the implementation, but the fix might involve modifying the link click handler to parse the line number from the link text and then using that information to navigate to the correct line in the file.

Notes

The exact solution may depend on the internal implementation of the Codex desktop app and the View Code panel, which is not provided in the issue description. The guidance provided is based on the assumption that the issue lies in how the link click event is handled and how the View Code panel is instructed to navigate to a specific line.

Recommendation

Apply a workaround by manually modifying the link handling logic to properly support line navigation, as the root cause seems to be related to how the line reference is processed when opening files in the View Code panel.

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