Skip to content

tui: local file links fail through the HTTP-only browser opener #63919

Closed as duplicate

Description

@simPod

Summary

Clicking an assistant-generated Markdown link to an existing local image shows an HTTP-only browser error instead of opening the image. This interrupts review of locally generated comparison images.

Environment

  • OpenCode: 2.3.0
  • OS: macOS 27.0, Darwin 27.0.0, arm64
  • Terminal: iTerm2, TERM=xterm-256color, COLORTERM=truecolor
  • Shell: /bin/zsh
  • Install: ~/.opencode/bin/opencode; channel not independently confirmed

Reproduction

  1. Have an existing local image, such as /Users/example/Downloads/comparison.jpg.
  2. Render this Markdown in an assistant response:
    [comparison](file:///Users/example/Downloads/comparison.jpg)
  3. Click the link in the TUI.

Expected Behavior

Offer an explicit local-file action, such as opening the image in the system viewer, previewing it, or copying/revealing its path.

If local-file links are unsupported, communicate that limitation without routing them through the HTTP-only browser action. This should not bypass URL-scheme security restrictions.

Actual Behavior

The image does not open. A notification says:

Only http and https links can be opened in the browser: file:///Users/example/Downloads/comparison.jpg

Additional Context

The user supplied a screenshot showing this failure for an existing generated JPEG. A clean-install reproduction has not been performed.

Workaround: display the absolute path as plain text and open it manually. Paths above are anonymized. The original screenshot contains private paths and is not included in this report.

Activity

  1. opencodejr commented on Nov 14, 2026

    @opencodejr
    Contributor

    Thanks for the detailed report! I think this is a duplicate of #54816.

    When you click a transcript link, the TUI passes it to a browser opener that only accepts http: and https: URLs. It rejects anything else, file:// URLs included, with the error you saw. #54816 reports the same error for a local file link and has been reproduced.

    Possible duplicates and related issues, ordered from most to least likely:

    I'm closing this issue now as a duplicate of #54816. Please add your details there (the file:// form, iTerm2, version 2.3.0). If you think this is a different problem, reply here and this issue will reopen.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions