TUI markdown hyperlinks are not clickable in OSC 8-capable terminals on 0.136.0
Summary
In Codex CLI 0.136.0, the release notes say that markdown links are preserved as terminal hyperlinks in the TUI, but links are not clickable in the interactive TUI on my machine even though the terminal supports OSC 8 hyperlinks.
This reproduces across multiple terminal emulators. A direct shell OSC 8 test works, but links rendered by Codex TUI are not clickable.
Environment
- Codex CLI:
codex-cli 0.136.0 - Install: npm package
@openai/codex@0.136.0 - OS: Ubuntu Linux
- Shell: bash
- Terminals tested:
- WezTerm (
TERM=xterm-256color,COLORTERM=truecolor) - kitty-compatible terminal session (
TERM=xterm-kitty,COLORTERM=truecolor) - User also reproduced in a third OSC-8-capable terminal
Expected Behavior
When the assistant outputs a markdown web link like:
[Codex release](https://github.com/openai/codex/releases/tag/rust-v0.136.0)
the visible label Codex release should be clickable in the Codex TUI.
Actual Behavior
The rendered link label is not clickable in the Codex TUI.
The same terminals support OSC 8 hyperlinks outside Codex. For example, this direct shell test produces clickable links:
printf '\033]8;;https://github.com/openai/codex/releases/tag/rust-v0.136.0\033\\Codex 0.136.0 release\033]8;;\033\\\n'
Reproduction
- Install / run Codex CLI
0.136.0. - Start the interactive TUI in an OSC-8-capable terminal.
- Ask Codex:
Print a markdown link to https://github.com/openai/codex/releases/tag/rust-v0.136.0
- Try to click the rendered link label in the TUI.
Result: the label is not clickable.
Additional Note: local file links
Local file:// links also do not work. After checking the 0.136.0 source, this part appears to be by design because tui/src/terminal_hyperlinks.rs only allows http and https in web_destination().
That is understandable, but the web-link behavior above still appears broken because https links do not become clickable in the interactive TUI despite terminal OSC-8 support.
Source checked:
https://raw.githubusercontent.com/openai/codex/rust-v0.136.0/codex-rs/tui/src/terminal_hyperlinks.rs
6 Comments
Additional finding after more testing:
https://github.com/openai/codex/issues/25934is clickable in the Codex TUI.tmp/codex-0136-hyperlinks-issue.mdis not clickable.So the issue is more specific than my first report:
https://...links can be clickable.This is probably related to hyperlink range remapping after line wrapping.
Concrete wrap failure example:
The following URL becomes visually split in a narrow terminal:
Expected:
Actual:
This is a good minimal sample because the correct URL is:
but the wrapped display separates
tuiintotu+i.Additional kitty-specific check:
0.45.0Shift+ClickandCtrl+Shift+Clickalso do not work.This makes the issue unlikely to be a simple kitty configuration problem. It looks like Codex TUI rendering / mouse handling / hyperlink range handling is preventing terminal hyperlink activation.
I’m also experiencing this issue.
### Environment
0.146.0(standalone installation)1.3.1-arch2In my case, it happens with Obsidian links:
```markdown
[Open Obsidian note](obsidian://open?vault=ExampleVault&file=Random%20Folder%2FExample%20Note)
A direct OSC 8 hyperlink using the same
obsidian://URL works correctly in Ghostty. This confirms that the terminal and system URL association are working; the URI is being lost or filtered during Codex’s Markdown rendering.I reviewed this issue against a focused patch for the local-file/Markdown-link part of the report.
The overlap is clear:
tmp/codex-0136-hyperlinks-issue.mdand Markdown local-file links are not clickable.obsidian://).The proposed change is to emit standard
file://OSC 8 metadata for local file references rendered by the TUI, including inline path references and explicit Markdown local-file links. The visible text and any:line[:column]suffix stay unchanged, while the terminal receives a normal file hyperlink. This leaves activation to the terminal, so it supports the usual right-click “Open Link/Open File” and Ctrl+click behavior rather than introducing single-click handling or a VS Code-specific URI.Implementation/validation:
I understand external PRs are currently invitation-only, so I am sharing this focused patch for discussion. If this approach matches the intended fix, please let me know whether an external PR would be welcome.