Skip to content

Inline code with a slash (e.g. write/edit) is treated as a clickable file path #51723

Closed

Description

@rubencu

Description

In the desktop app, assistant messages render backticked text containing a slash (e.g. write/edit, and/or) as a file-path link. Clicking it shows a toast: "Failed to load file / File not found: write/edit".

Examples of wrongly-linked text: write/edit, and/or, input/output, read/write, client/server, TCP/UDP — all render as file links, none of them is a file.

Note: this is the inverse of #37891 (which asks for real paths to be clickable). Genuine paths (app.tsx, ./x, absolute paths, @scope/pkg) should keep linking; only bare word/word prose shorthand should not.

Plugins

None

OpenCode version

Desktop 2.0.18 (beta)

Steps to reproduce

  1. Have the assistant output inline code like write/edit in prose
  2. It renders styled as a file link
  3. Click it -> error toast "File not found: write/edit"

Screenshot and/or share link

Screenshot attached in the original report: assistant text "...emits narration instead of write/edit calls..." with write/edit underlined as a link, plus the "Failed to load file / File not found: write/edit" toast bottom-right.

Operating System

macOS 27.0 (arm64)

Terminal

N/A (desktop app)

Related: #37891 (the inverse request — making genuine paths clickable; this fix only un-links ambiguous bare pairs and leaves real paths untouched).

Activity

  1. github-actions commented on Sep 27, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • Please use the Bug Report template and include its required Description field; the current report uses custom headings instead of the template.
    • Add the OpenCode Desktop version and OS/system details to help reproduce this rendering issue.

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


    This issue might be related to existing issues. Please check:

    • #37891: Covers clickable file paths in desktop chat. It reports paths not being clickable, while this issue reports non-path inline code being incorrectly linked, so there may be overlap in path-link handling.

    If you believe this was flagged incorrectly, please let a maintainer know.

  2. github-actions commented on Sep 27, 2026

    @github-actions
    Contributor

    This issue still needs the Bug Report template's required Description field with real content; the current report uses custom headings instead. Please also add your OpenCode Desktop version and OS/system details to help reproduce the issue.

  3. github-actions commented on Sep 27, 2026

    @github-actions
    Contributor

    Thanks for updating the issue with reproduction steps and system details!

  4. neriousy commented on Oct 20, 2026

    @neriousy
    Member

    Thanks for reporting this! In 2.0.27, inline code only becomes a file link after OpenCode confirms the file exists, so shorthand such as write/edit stays plain text while real files remain clickable.

    Update with opencode upgrade or npm i -g @opencode/cli@latest (desktop: update the app). Please comment or reopen if this still happens on that version.

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