Skip to content

chat: linkified paths in replies fail on click — ~ home paths not expanded, non-file text linkified as file reference #51872

Closed as duplicate

Description

@q1023884985

Summary

In the desktop client, path-like text in agent replies (table cells, markdown link syntax) is rendered as clickable blue links. Clicking them is inconsistent: absolute paths open fine (including non-ASCII/Chinese directories), but home-relative ~ paths fail with "File not found", and non-file @ text (e.g. a skill-store coordinate) is linkified as a file reference and also fails.

The linkification heuristic and the click resolver disagree: the UI offers a click affordance for text it cannot resolve on click.

Environment

  • opencode version: CLI v2.0.15, background service /api/info reports 2.0.18 (mismatch)
  • OS: Windows_NT 10.0.26200 (Win32NT x64)
  • Terminal: desktop client; TERM=xterm-256color
  • Shell: C:\Windows\system32\cmd.exe
  • Install/channel: release (latest)
  • Active plugins: none found in config

Reproduction

Text of this form appears in an agent reply (table cell or markdown link):

  1. C:\temp\preview-link-test.png — absolute, ASCII → click opens the file ✅
  2. E:\下载\stitched-grid-5.png — absolute, Chinese path → click opens ✅
  3. ~/.skillhub/ — home-relative → click fails with "File not found"
  4. @user_c3d829cb/img-stitch — skill-store coordinate (not a file) → click fails with "File not found"

Expected Behavior

  • Either: only linkify text the resolver can actually open (case 3 should resolve by expanding ~ to the user home, as permission rules do for read/external_directory resources), or: clicking an unresolvable path shows a non-error affordance / is not linkified at all (case 4).
  • Home expansion for ~ in click resolution is documented behavior elsewhere in V2 config ("OpenCode expands ~ and $HOME" for read/edit resources), so the chat click resolver is inconsistent with it.

Actual Behavior

  • Cases 1–2 open correctly; backslash and non-ASCII paths are handled fine.
  • Case 3: ~ is not expanded — resolved as a workspace-relative path → "File not found".
  • Case 4: @<something>/<something> is linkified as if it were a file reference → "File not found", even though it is a store coordinate, not a path.

Additional Context

Activity

  1. github-actions commented on Sep 28, 2026

    @github-actions
    Contributor

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

  2. opencodejr commented on Oct 28, 2026

    @opencodejr
    Contributor

    Thanks for the detailed report! I think this is a duplicate of #50390, which reports both problems: a ~-prefixed path in desktop chat fails with File not found while the absolute path works, and non-file text like owner/repo is linkified and fails the same way. A comment there confirms it still happens on 2.0.18 on Windows 10.0.26200, and there is an open PR (#50602) that addresses it.

    Possible duplicates and related issues, ordered by likelihood:

    The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.

  3. opencodejr commented on Oct 29, 2026

    @opencodejr
    Contributor

    Closing this as a duplicate of #50390, since there's been no reply saying how it differs. That issue covers both problems you saw: clicking a ~ path in desktop chat gives File not found, and text that isn't a file (like owner/repo or your @user/skill coordinate) gets turned into a clickable path link. Please follow #50390 and the open PR #50602 for updates. If your case turns out to be different, for example the @ problem tracked in #53502, reply here and we can reopen. Thanks again for the detailed report!

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions