Markdown links render as label (url) with the URL shown inline instead of an OSC 8 hyperlink — long URLs wrap and break clickability
## Summary
Codex CLI renders a markdown link [label](url) as label (url) — it appends the
destination URL inline in parentheses. For long URLs this soft-wraps across lines
and the link becomes unclickable.
Expected: render as an OSC 8 terminal hyperlink showing only the label (URL kept as
hyperlink metadata, not printed), so nothing wraps. This is what OSC 8-capable
terminals do with a raw OSC 8 sequence, and what other TUIs (e.g. Claude Code) do.
## Steps to reproduce
Ask Codex to output this markdown link verbatim:
## Actual
CLICKME (https://example.com/very/long/path/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)
- The full URL is printed inline in parentheses.
- In a narrow window it soft-wraps to the next line; the wrapped URL is not clickable.
- The label (
CLICKME) is not shown alone.
## Expected
CLICKME (clickable via OSC 8; URL hidden, nothing wraps)
## Impact (why the wrapped URL is painful)
- Not clickable at all. Once the URL soft-wraps across lines, the terminal's URL
detector (cmd/ctrl-click) fails to recognize it, so the link can't be opened — the
single most useful action is lost.
- Manual copy is error-prone. To open it you must select the URL spanning multiple
wrapped lines and paste into a browser; line breaks often introduce missing or extra
characters, so the pasted URL is broken.
- Lists become unreadable. In list output (e.g. a PR/issue list), every row's long
URL wraps onto 3–5 extra lines, burying the actual content (title, status) and making
the list impossible to scan.
- Redundant noise. The label (the meaningful part, e.g.
#1931) is already the
clickable target; printing the full URL next to it adds pure visual clutter with no
benefit on OSC 8-capable terminals.
## This is not a terminal limitation
Same terminal (Ghostty, OSC 8 capable): emitting a raw OSC 8 sequence
\e]8;;<url>\e\\CLICKME\e]8;;\e\\ renders as a compact clickable CLICKME with the
URL hidden. So the terminal supports OSC 8 — Codex's markdown renderer is choosing to
print the URL inline instead of using an OSC 8 hyperlink for the label.
## Environment
- Codex CLI version: codex-cli 0.143.0
- OS: macOS
- Terminal: Ghostty (OSC 8 capable); reproduced with/without tmux: <fill>
## Suggested fix
Render http(s) markdown links as OSC 8 hyperlinks with the label as the visible text
and the URL as the hyperlink target, instead of appending (url) inline.
## References
## Screent Shot
<img width="571" height="109" alt="Image" src="https://github.com/user-attachments/assets/23e6631c-d988-4420-9a5e-5654c1f00164" />
<img width="622" height="202" alt="Image" src="https://github.com/user-attachments/assets/dda519bd-3a84-49d9-92fe-9516c9e472fd" />
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗