You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Links wrapped across lines not clickable in Kitty terminal #35649
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
Reacted by Konstantinos Papadakis, ruiny, Trevor Lane and DCjanus
Links wrapped across lines not clickable in Kitty terminal #35649 (this issue) is about long URLs in general terminal output (not inside tables) wrapping because the terminal window is too narrow. In Kitty (and possibly other terminals), when a long line is wrapped by the terminal emulator at the window edge, OSC 8 hyperlinks break. The URL is correct in opencode's output, but Kitty's soft line wrapping breaks the hyperlink.
They are related (both result in broken links due to line wrapping), but the root causes differ — one is opencode's markdown table renderer, the other is terminal-level line wrapping in Kitty. If a maintainer thinks they should be consolidated under one umbrella issue, that is fine, but the fix for one may not fix the other.
Hi @simonklee, sorry to bother — just checking in on this one since it's still reproducible on the latest release (1.18.23), and there are additional reports from Konsole and Zed users in the thread.
While looking into it, I found some related work that appears to have stalled:
Upstream: anomalyco/opentui#736 already merged the renderer-side fix — it adds the id parameter to OSC 8 sequences so wrapped segments are grouped as a single link, and exports a detectLinks() helper.
Downstream: the wiring PRs that connect detectLinks to the TUI markdown rendering path (#20400, #21559) seem to have been closed by automated PR cleanup without being merged.
Is making wrapped links clickable across lines still planned for this issue? If a refreshed PR building on the merged upstream work would be welcome, I'd be glad to help with that. And if this is already being handled internally, please feel free to just close this question. Thanks for your time!
Hi @simonklee, sorry to bother — just checking in on this one since it's still reproducible on the latest release (1.18.23), and there are additional reports from Konsole and Zed users in the thread.
While looking into it, I found some related work that appears to have stalled:
Upstream: anomalyco/opentui#736 already merged the renderer-side fix — it adds the id parameter to OSC 8 sequences so wrapped segments are grouped as a single link, and exports a detectLinks() helper.
Downstream: the wiring PRs that connect detectLinks to the TUI markdown rendering path (#20400, #21559) seem to have been closed by automated PR cleanup without being merged.
Is making wrapped links clickable across lines still planned for this issue? If a refreshed PR building on the merged upstream work would be welcome, I'd be glad to help with that. And if this is already being handled internally, please feel free to just close this question. Thanks for your time!
Activity
sporteka2 commentedon Jul 7, 2026
Related: #18394 (long URLs in markdown tables)
github-actions commentedon Jul 7, 2026
This issue might be a duplicate of existing issues. Please check:
sporteka2 commentedon Jul 10, 2026
I checked #18394 and there is an important difference:
Long URLs in markdown tables are split across lines and become unclickable #18394 is about URLs in markdown tables being split because the table column is too narrow. The URL is rendered as a single piece of output, but opencode's markdown table formatter splits it across cell lines. This is a markdown rendering issue.
Links wrapped across lines not clickable in Kitty terminal #35649 (this issue) is about long URLs in general terminal output (not inside tables) wrapping because the terminal window is too narrow. In Kitty (and possibly other terminals), when a long line is wrapped by the terminal emulator at the window edge, OSC 8 hyperlinks break. The URL is correct in opencode's output, but Kitty's soft line wrapping breaks the hyperlink.
They are related (both result in broken links due to line wrapping), but the root causes differ — one is opencode's markdown table renderer, the other is terminal-level line wrapping in Kitty. If a maintainer thinks they should be consolidated under one umbrella issue, that is fine, but the fix for one may not fix the other.
ruinivist commentedon Aug 8, 2026
+1
I see the same in Konsole too and seems to be opentui related ( repro )
example, full link is recognized in Konsole

but not when rendered via opentui
Genius740Code commentedon Aug 15, 2026
Also issue in zed editor.
https://github.com/zed-industries/zed
lucidash commentedon Aug 26, 2026
Hi @simonklee, sorry to bother — just checking in on this one since it's still reproducible on the latest release (
1.18.23), and there are additional reports from Konsole and Zed users in the thread.While looking into it, I found some related work that appears to have stalled:
idparameter to OSC 8 sequences so wrapped segments are grouped as a single link, and exports adetectLinks()helper.detectLinksto the TUI markdown rendering path (#20400, #21559) seem to have been closed by automated PR cleanup without being merged.Is making wrapped links clickable across lines still planned for this issue? If a refreshed PR building on the merged upstream work would be welcome, I'd be glad to help with that. And if this is already being handled internally, please feel free to just close this question. Thanks for your time!
simonklee commentedon Aug 26, 2026
This is very much on the docket. anomalyco/opentui#1439
fix(tui): open clicked transcript links, including wrapped rows (#53903)
thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊