anomalyco / anomalyco/opencode

tui: Ctrl+click does not open Markdown links when mouse capture is active

Open
#44,442 1 comment 4 reactions 1 assignee View on GitHub

@kommander is already working on this.

Since Aug 23, 2026.

2.0
Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

In the OpenCode V2 TUI running in Ghostty on Linux, rendered https:// links cannot be opened with the normal Ctrl+click gesture when the TUI has mouse reporting enabled.

Plain click does nothing, and Ctrl+click also does nothing. Ctrl+Shift+click opens the link because Shift bypasses OpenCode's mouse capture and allows Ghostty to handle the URL.

This makes rendered links appear non-functional unless the user knows the terminal-specific workaround.

Plugins

None found in the checked configuration locations.

OpenCode version

opencode2 v0.0.0-beta-17963

Steps to reproduce
  1. Run OpenCode V2 in Ghostty on Linux.
  2. Ask the agent to return or reference an https:// URL in its response.
  3. Try a plain click on the rendered URL.
  4. Try Ctrl+click on the rendered URL.
  5. Try Ctrl+Shift+click on the rendered URL.
Expected behavior

Ctrl+click should open the URL in the default browser, or OpenCode should otherwise provide a consistent way to activate rendered Markdown links while its TUI mouse reporting is enabled.

Actual behavior

Plain click and Ctrl+click do nothing. Ctrl+Shift+click opens the URL by bypassing OpenCode's mouse capture.

Screenshot and/or share link

Not provided.

Operating System

Fedora Linux, kernel 7.1.8-100.fc43.x86_64

Terminal

Ghostty 1.3.1-4.fc43, GTK, tip channel; $TERM=xterm-256color

Additional context

The standalone Ghostty OSC 8 hyperlink behavior should be tested separately. The Ctrl+Shift+click workaround indicates that OpenCode's TUI is capturing the mouse event and preventing Ghostty's normal Ctrl+click URL handling.

Related issues:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.