TUI markdown hyperlinks are not clickable in OSC 8-capable terminals on 0.136.0

Open 💬 6 comments Opened Jun 2, 2026 by radislabus-star

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

  1. Install / run Codex CLI 0.136.0.
  2. Start the interactive TUI in an OSC-8-capable terminal.
  3. Ask Codex:
Print a markdown link to https://github.com/openai/codex/releases/tag/rust-v0.136.0
  1. 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

View original on GitHub ↗

6 Comments

radislabus-star · 2 months ago

Additional finding after more testing:

  • A bare web URL like https://github.com/openai/codex/issues/25934 is clickable in the Codex TUI.
  • If the URL wraps onto the next terminal line, the clickable target is split / broken.
  • A local path-style reference like tmp/codex-0136-hyperlinks-issue.md is not clickable.
  • Markdown local file links are also not clickable.

So the issue is more specific than my first report:

  1. Bare https://... links can be clickable.
  2. Wrapped long URLs appear to lose a single contiguous hyperlink target.
  3. Markdown link labels and local file references do not become clickable terminal hyperlinks.

This is probably related to hyperlink range remapping after line wrapping.

radislabus-star · 2 months ago

Concrete wrap failure example:

The following URL becomes visually split in a narrow terminal:

https://raw.githubusercontent.com/openai/codex/rust-v0.136.0/codex-rs/tu
        i/src/terminal_hyperlinks.rs

Expected:

  • The whole logical URL should remain one clickable hyperlink target.
  • The inserted visual line break / indentation should not break the destination.

Actual:

  • The URL is effectively cut into pieces.
  • The continuation part is not part of the same clickable target.

This is a good minimal sample because the correct URL is:

https://raw.githubusercontent.com/openai/codex/rust-v0.136.0/codex-rs/tui/src/terminal_hyperlinks.rs

but the wrapped display separates tui into tu + i.

radislabus-star · 2 months ago

Additional kitty-specific check:

  • Terminal: kitty 0.45.0
  • Kitty config does not disable hyperlinks.
  • Bare web URLs are clickable outside Codex.
  • In Codex TUI, regular click does not reliably open hyperlinks.
  • Shift+Click and Ctrl+Shift+Click also 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.

MarlonPassos-git · 29 days ago

I’m also experiencing this issue.

### Environment

  • Codex CLI 0.146.0 (standalone installation)
  • Arch Linux
  • Bash
  • Ghostty 1.3.1-arch2

In my case, it happens with Obsidian links:

```markdown
[Open Obsidian note](obsidian://open?vault=ExampleVault&file=Random%20Folder%2FExample%20Note)

  The link is rendered with link-like styling, but Ctrl + click does nothing. The obsidian:// protocol is correctly registered on my system, and internal codex:// links work
  in the same terminal.

  I would expect Codex to preserve the obsidian:// destination as a clickable hyperlink and let the system open it with Obsidian.
MarlonPassos-git · 29 days ago

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.

Heimao-c · 22 days ago

I reviewed this issue against a focused patch for the local-file/Markdown-link part of the report.

The overlap is clear:

  • The issue's follow-up comments explicitly report that a path-style reference such as tmp/codex-0136-hyperlinks-issue.md and Markdown local-file links are not clickable.
  • The issue is still open, and I did not find a maintainer comment rejecting this direction or a linked PR that resolves the local-file case.
  • This patch does not claim to fix every symptom here (for example, wrapped web URLs or arbitrary application protocols such as 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.