URLs in TUI output not clickable when wrapping across lines in Warp terminal (missing OSC 8 hyperlink support)
Description
When Claude Code's TUI renders a long URL that wraps across two or more lines, terminals that do per-line URL detection (notably Warp) only open the first-line fragment when Cmd+clicking. The same session works correctly in iTerm2.
Root cause
Claude Code emits hard newlines (\n) in its output rather than letting the terminal soft-wrap. Terminals like iTerm2 are soft-wrap-aware in their URL hit-testing, so they join wrapped segments correctly. Warp's CLI-agent rendering path does URL detection per logical/formatted line, so it sees two separate strings instead of one URL.
Steps to reproduce
- Open Claude Code CLI inside Warp terminal
- Ask Claude anything that produces a long URL in the response (e.g. ask for a GitHub link with query parameters)
- Cmd+click the URL — only the first-line portion opens in the browser
Expected behavior
The full URL opens regardless of how many lines it visually spans.
Actual behavior
URL is split at the line-wrap boundary; only the first fragment is opened.
Suggested fix
Wrap URLs in OSC 8 hyperlink escape sequences when outputting to a terminal:
\e]8;;<url>\e\\ display text \e]8;;\e\\
This attaches the full URL as metadata to the displayed text, so any OSC 8-aware terminal (Warp, iTerm2, kitty, foot, etc.) opens the correct URL regardless of visual line wrapping. It also improves accessibility and is the standard terminal hyperlink mechanism.
Environment
- OS: macOS
- Shell: zsh
- Warp version: 0.2026.04.27.15.32.02
- Claude Code: claude-sonnet-4-6
Related
- Warp issue filed for their side: https://github.com/warpdotdev/warp/issues/9385
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗