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:
- 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
- Invisible characters — Some markdown rendering artifacts (zero-width spaces, ANSI codes, etc.) between the wrapped parts of the link prevent Kitty from joining them
- 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
- Run opencode in Kitty terminal
- Ask it to output a long URL (e.g., a raw GitHub link like
raw.githubusercontent.com/...)
- Resize the terminal so the URL wraps to the next line
- Try to Ctrl+Click on the link — only the first-line portion works
- 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
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:
\e]8;;url\e\\text\e]8;;\e\\) and the hyperlink span doesn't extend across wrapped lines, breaking Kitty's native URL detection[text](url)in the terminal might split the URL or pad it in a way that breaks wrappingSteps to reproduce
raw.githubusercontent.com/...)echo "same-long-url"in the same terminal — Kitty correctly detects the wrapped URLExpected behavior
Long URLs output by opencode should be clickable even when they wrap across lines, consistent with normal terminal behavior.
Additional info