Skip to content

desktop: clicking a message link opens it as a local file instead of the browser #53013

Closed

Description

@KoBadger

Summary

Clicking a hyperlink in the desktop client does not open the URL in the default
browser. The click is routed to the file viewer and fails: a link with no scheme
shows Failed to load file / File not found: <text>, and an https:// link shows
Failed to load file / UnexpectedStatus: 500. No link in a message can be opened
without manually copying the text.

Environment

Reproduction

  1. Open any session where an assistant message contains a URL.
  2. Click a link written without a scheme, e.g. discord.com/developers/applications.
  3. Toast appears: Failed to load file / File not found: discord.com/developers/applications.
  4. Click a link written with a scheme, e.g. https://discord.com/developers/applications.
  5. Toast appears: Failed to load file / UnexpectedStatus: 500.

Expected Behavior

Clicking a link opens it in the OS default browser. Scheme-less text that is not
a workspace path should not be treated as a file to load.

Actual Behavior

The click is handled as a "load this file" action instead of "open this URL":

  • without a scheme: File not found: <link text>
  • with a scheme: UnexpectedStatus: 500 (the request reaches the server and errors)

Additional Context

  • Reproducible every time, for every link, in every session.
  • Nothing is logged: no entry in ~/.local/share/opencode/log/opencode.log and none
    in %APPDATA%\ai.opencode.desktop\logs\<timestamp>\renderer.log at the moment of
    the failed click, so the failure is invisible to diagnostics.
  • Workaround: select the URL text and copy it into a browser manually.
  • No config/plugin change preceded this; present since install.
  • Affects the desktop client only (the same URLs open fine in a browser).

Activity

  1. github-actions commented on Oct 3, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of an existing issue. Please check:

    • #52255: Reports desktop chat links failing to open after a click (in 1.18.33); this issue describes them being routed to the file viewer instead.
  2. opencodejr commented on Oct 27, 2026

    @opencodejr
    Contributor

    Thanks for the detailed report. I couldn't reproduce this here because it needs the Windows desktop app, and I only have a Linux environment without it, so a maintainer with Windows will need to check it.

    From reading the code (I haven't run it):

    • Links without a scheme (e.g. discord.com/developers/applications shown as inline code): in 2.0.22, any inline code containing a / is treated as a file path and opened in the file viewer without checking that the file exists. That explains the File not found toast. Newer code only makes such text clickable once the file is confirmed to exist, so this part may already be fixed in a later release.
    • https:// links: going by the code, these should be handed to your default browser. I couldn't find what produces UnexpectedStatus: 500, so a maintainer needs to look at this part on Windows.

    These would help:

    • Does the https:// failure still happen with opencode-dcp and opencode-v2-token-usage disabled?
    • Was the URL shown as a normal link, or as inline code (monospace)?
    • Does it still happen on the latest desktop release?
  3. KoBadger commented on Nov 11, 2026

    @KoBadger
    Author

    Updating with where this landed.

    Environment now: desktop v2.2.7 (this was filed against v2.0.22).

    Since the report, the two symptoms in it map onto two changes:

    Both paths from the original report are covered by those, so I am closing this as resolved upstream. If a link still opens in the file viewer on a current build, comment here and I will reopen with the link, whether it rendered as inline code or as a normal link, and the matching log line.

    On the plugin question: opencode-dcp and opencode-v2-token-usage do not touch click routing, so I would not expect disabling them to change anything.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions