Skip to content

Hyperlinks not rendered properly and non-clickable now in VS Code extension #13277

Closed

Description

@monkey-sheng

What version of the IDE extension are you using?

0.4.79

What subscription do you have?

ChatGPT plus

Which IDE are you using?

VS Code

What platform is your computer?

Microsoft Windows NT 10.0.26100.0 x64; remote ssh on Linux host Linux 5.15.0-122-generic x86_64 x86_64

What issue are you seeing?

Now, it displays links such as [Protocol.h](<some_absolute_path_prefix>/Common/Include/Protocol.h:66) directly in markdown inline code format, whereas it used to be a clickable hyperlink with text of "Protocol.h:66", and that I could right click to "copy path".

What steps can reproduce the bug?

Ask it to pinpoint some specific code, so that it gives you a specific location directly, and watch how it doesn't render properly into a hyper link.

What is the expected behavior?

Like this, as it used to:Image
Not like this:

Image

Additional information

Works in 0.4.78, not in the latest 0.4.79

Activity

  1. added
    extension
    on Mar 2, 2026
  2. added
    bug
    on Mar 2, 2026
  3. added
    regression
    on Mar 2, 2026
  4. pash-openai commented on Mar 2, 2026

    @pash-openai
    Contributor

    Thanks for flagging. I noticed this too - the model sometimes wraps markdown links in codeblocks so the app/ vs code wouldn't link it. I made a fix for this yesterday. Should be deployed ~ soon ~

  5. talraveh1 commented on Mar 3, 2026

    @talraveh1

    As an intermediate workaround, I created ~/.codex/AGENTS.md with the following content:

    # Global Agent Instructions
    
    ## VS Code Clickable File Links
    
    - Always output file references as Markdown links with an absolute filesystem path and optional line number using this format:
      - `[label](/<absolute-path>:line)`
    - On Windows, use forward slashes and include the drive letter in the path, for example:
      - `[file.h](/c:/project/src/file.h:100)`
    - Prefer this format for every file reference so links open directly in this VS Code chat environment.
    - Do not use `vscode://` links for file references.

    That solved it for me.

  6. monkey-sheng commented on Mar 5, 2026

    @monkey-sheng
    Author
    Image

    Updated to the newest version 26.304.20706, still has some issues with links, though maybe the proper markdown links wrapped in codeblocks is now working, it's just the (GPT-5.3-Codex) model often doesn't even use markdown links. But in any case, here is another example where it used to work (at least the first one is clickable, the second one is not) like so:

    Image

    I don't have any specific instructions in my AGENTS.md (or anywhere else) to force any format on links, I simply have "refer to both the symbol's name and the location in the source file", I trust that the model knows what to do, and that the UI knows how to handle the model's output.
    @pash-openai I wonder what your or the general codex team's best practice suggestion is. Because to me as a user if something used to work but now it doesn't, that's a regression bug. Although I may be able to harden it by explicitly telling it to follow markdown format for links, but shouldn't that be part of the system prompt...? Also, on the point that the (line 1867) renders as a link but doesn't actually work when I click, again as a user, it's a bit frustrating when what I see is not what I get.

    Sorry for the nitpick, it's not a huge deal but when I look at past codex sessions' chat history it's quite inconvenient.

  7. Avi7ii commented on Mar 17, 2026

    @Avi7ii

    I can reproduce a closely related variant of this on macOS as well.

    Environment:

    • Codex VS Code extension: 26.313.41514
    • VS Code: 1.111.0
    • OS: macOS 26.3.1

    Behavior in my case:

    • File references in Codex responses are rendered as blue links in the VS Code chat panel.
    • Clicking them does not navigate to the file in the editor.
    • This affects both:
      • workspace files
      • non-workspace files such as VS Code user settings
    • In my setup, the click does not successfully open anything in the editor.

    So this seems broader than just one path format or one platform. It looks like the same renderer / link-handling pipeline is still broken on current macOS builds too.

    Related duplicate report that was auto-closed in favor of existing issues:

  8. Avi7ii commented on Mar 17, 2026

    @Avi7ii

    Additional finding after more testing on macOS:

    The issue appears to be strongly related to spaces in the path.

    What I verified:

    • This works in the Codex VS Code chat panel:
      • [AGENTS.md](/Users/thom/.codex/AGENTS.md:1)
    • This does not work:
      • [README.md](/Users/thom/Desktop/Localsend X/README.md:1)
    • A no-space symlink to the same target does work:
      • /Users/thom/.codex-links/localsend-readme.md -> /Users/thom/Desktop/Localsend X/README.md
    • The same pattern also works for a file outside the workspace:
      • /Users/thom/.codex-links/vscode-settings.json -> /Users/thom/Library/Application Support/Code/User/settings.json

    So the current behavior seems to be:

    • absolute-path + :line is the right link format
    • but links fail when the path itself contains spaces
    • a no-space symlink path works even when the real target path contains spaces

    This may help narrow the bug down to path parsing / URI handling for spaces inside the VS Code extension webview link pipeline.

    Current user workaround:

    • create no-space symlinks for frequently referenced files/folders
    • have Codex emit links using /absolute/path:line against those symlink paths
  9. Xarishark commented on Mar 29, 2026

    @Xarishark

    Still a problem as of the latest version.

  10. AnthonyBAC commented on Apr 2, 2026

    @AnthonyBAC

    Im haviing the same problema with the extesion on cursor

  11. snow212-cn commented on Apr 8, 2026

    @snow212-cn

    This malignant bug has existed for months, and openai just didn't do anything.

  12. paulz commented on Apr 12, 2026

    @paulz

    was working, now broken again in 26.409.20454
    VS Code Version: 1.115.0 (Universal)
    macOS

  13. paulz commented on Apr 12, 2026

    @paulz

    If anyone is interested, here is the last pre-release version that has links working: 26.5406.40811

    To install it select it from "Uninstall" drop down:
    Image

  14. Yuukiiii commented on Apr 13, 2026

    @Yuukiiii

    If anyone is interested, here is the last pre-release version that has links working: 26.5406.40811

    To install it select it from "Uninstall" drop down: Image

    It really works! Thanks a lot! 🤝

  15. rubenalonsoes commented on Apr 13, 2026

    @rubenalonsoes

    I have the same problem from Windows WSL:

    Visual Studio Code
    Version: 1.115.0
    OS: Windows_NT x64

    Codex openai.chatgpt
    Version 26.409.20454

  16. alexolog commented on Apr 16, 2026

    @alexolog

    There may be a related but separate bug upstream of the renderer/link-handler layer.

    In my Codex session inside VS Code, the agent explicitly said it was being prevented by higher-priority injected session instructions from emitting vscode:// file links, and that URI schemes like vscode:// and file:// were forbidden for file references.

    That suggests two distinct layers may be involved here:

    1. The extension/UI problem described in this issue, where file references render incorrectly or are non-clickable.
    2. A Codex instruction-layer problem, where the model is being told not to generate VS Code-openable links in the first place.

    I filed the second issue separately here:

    If maintainers think that restriction is actually part of the same root cause, feel free to fold it in, but based on the behaviour it looks like a separate bug from the renderer/click-handling problem tracked in this issue.

  17. I-am-Kenough commented on May 11, 2026

    @I-am-Kenough

    To add on to this - though I know this is a VS Code ticket - the same behavior is exhibited in the IDEA integration.
    path:line works from codex running in the IntelliJ terminal, but not from Codex plugin chat; markdown absolute links treat :line as part of filename; #L1, idea://open, and jetbrains://idea/navigate/reference all fail or escape to Chrome. Nothing I've been able to configure changed any of this behavior. The plugin integration with IDEA just doesn't work for file links at all.

    I didn't find a specific IDEA ticket to attach this to, but will open a new one if advised to do so.

    IDE: Intelli-J IDEA 2026.1 (Build #IU-261.23567.138, built on April 22, 2026)
    OS: Mac OS X Tahoe (26.3.1 (25D2128)) on Apple M3 silicon
    JetBrains AI Assistant plugin: 261.23567.193
    Embedded Codex CLI binary: codex-cli 0.128.0
    Codex CLI (from brew): codex-cli 0.130.0

  18. etraut-openai commented on Aug 5, 2026

    @etraut-openai
    Contributor

    Link and IDE handlers restored clickable file references

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugextensionregression

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions