Bare URLs containing ~ are partially linkified in Codex CLI output

Resolved 💬 0 comments Opened Jun 6, 2026 by eamsden Closed Jun 9, 2026

Summary

In Codex CLI 0.136.0, a bare URL containing ~ in the path is rendered/linkified only up to the ~. The rest of the URL is displayed as plain text, so Cmd-click opens an incomplete URL.

This appears to be in the Codex CLI presentation layer rather than the terminal's native URL detection. The same terminal correctly recognizes the full URL when the URL is printed by a normal shell command outside Codex.

Repro

  1. Run Codex CLI in the interactive TUI.
  2. Have the assistant output this bare URL:

``text
https://www.cs.tufts.edu/~nr/cs257/archive/olin-shivers/dissertation.pdf
``

  1. Observe the rendered URL in the Codex output.
  2. Cmd-hover or Cmd-click the URL.

Actual behavior

Only the portion before the tilde appears to be recognized as a link:

https://www.cs.tufts.edu/

The suffix is not included in the clickable destination:

~nr/cs257/archive/olin-shivers/dissertation.pdf

Cmd-click therefore opens the wrong/incomplete URL.

Expected behavior

The full URL should be recognized and opened:

https://www.cs.tufts.edu/~nr/cs257/archive/olin-shivers/dissertation.pdf

~ is valid in a URL path, so it should not terminate link detection.

Terminal cross-check

The terminal itself handles the full URL correctly outside Codex. Copying the same URL into an echo command in another terminal window does not underline by default, but when hovering while holding Cmd it recognizes the full URL and opens the full URL in the browser when clicked.

That suggests this is either in Codex CLI's rendering/linkification path or in how Codex emits styled/hyperlink spans, not in the terminal's URL parser.

Environment

  • Codex CLI: codex-cli 0.136.0
  • OS: macOS / Darwin arm64
  • Terminal environment observed by Codex:
  • TERM=xterm-256color
  • TERM_PROGRAM=zed
  • shell: /opt/homebrew/bin/bash
  • gh: 2.86.0

Related issues

Possibly related but not identical:

  • #14998: Cmd+click does not work on long links / URL gets truncated
  • #25934: Markdown hyperlinks are not clickable in OSC 8-capable terminals

This report is specifically about bare URL linkification stopping at ~ in a URL path.

View original on GitHub ↗