Skip to content

Links wrapped across lines not clickable in Kitty terminal #35649

Description

@sporteka2

Links wrapped across lines not clickable in Kitty terminal (OSC 8 hyperlinks? / markdown rendering)

opencode version: 1.17.13
Terminal: Kitty 0.32.2
OS: Linux Mint 22.3 Cinnamon, X11

Description

When opencode outputs a long URL that wraps to the next line in the Kitty terminal, the link is not clickable. Only the part on the first line is recognized as a link. This does NOT happen with regular terminal output — Kitty handles wrapped URLs correctly in normal shell output (e.g., echo "https://very.long.url/...").

This suggests opencode's terminal output is interfering with Kitty's URL detection across line wraps. Possible causes:

  1. OSC 8 hyperlinks — Opencode may use terminal hyperlinks (\e]8;;url\e\\text\e]8;;\e\\) and the hyperlink span doesn't extend across wrapped lines, breaking Kitty's native URL detection
  2. Invisible characters — Some markdown rendering artifacts (zero-width spaces, ANSI codes, etc.) between the wrapped parts of the link prevent Kitty from joining them
  3. Markdown link rendering — The way opencode renders [text](url) in the terminal might split the URL or pad it in a way that breaks wrapping

Steps to reproduce

  1. Run opencode in Kitty terminal
  2. Ask it to output a long URL (e.g., a raw GitHub link like raw.githubusercontent.com/...)
  3. Resize the terminal so the URL wraps to the next line
  4. Try to Ctrl+Click on the link — only the first-line portion works
  5. Compare with echo "same-long-url" in the same terminal — Kitty correctly detects the wrapped URL

Expected behavior

Long URLs output by opencode should be clickable even when they wrap across lines, consistent with normal terminal behavior.

Additional info

  • Works fine in other terminals (tested: GNOME Terminal)
  • In Kitty, regular shell output handles wrapped links correctly — the issue is specific to opencode's output

Activity

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