OSC 8 hyperlinks not clickable inside tmux (statusline and PR links)
Description
OSC 8 hyperlink escape sequences are not clickable when Claude Code runs inside tmux. This affects:
- Statusline hyperlinks — Custom statusline commands that emit OSC 8 sequences render as plain text instead of clickable links
- Claude Code's own PR links — Links displayed by Claude Code (e.g., after creating a PR with
gh pr create) are not clickable in tmux
The same OSC 8 sequences work correctly:
- Outside tmux (direct terminal) — clickable
- Inside tmux when output is rendered directly (not through Claude Code) — clickable
Reproduction Steps
- Configure tmux with
set -as terminal-features ",*:hyperlinks"in.tmux.conf - Restart tmux (
tmux kill-server+ reopen) - Verify OSC 8 works in tmux:
printf '\e]8;;https://example.com\e\\Click Me\e]8;;\e\\\n'— should be clickable - Run Claude Code inside tmux
- Observe that:
- Statusline commands emitting OSC 8 sequences produce non-clickable text
- PR links and other hyperlinks shown by Claude Code are not clickable
- Run Claude Code outside tmux — same links are clickable
Environment
- macOS 15.7.4 (Sequoia)
- tmux 3.6a with
terminal-features *:hyperlinksenabled - Ghostty (xterm-ghostty) as outer terminal
Expected Behavior
OSC 8 hyperlink sequences should be preserved and rendered as clickable links by the terminal when Claude Code runs inside tmux, just as they are outside tmux.
Actual Behavior
OSC 8 sequences appear to be stripped or not forwarded to the terminal when Claude Code renders output inside tmux. Text displays correctly but is not clickable.
Analysis
Since raw OSC 8 output produces clickable links when rendered directly in a tmux pane, the issue is likely in how Claude Code captures and re-renders output. Claude Code may be wrapping output in escape sequences (e.g., cursor positioning, screen regions) that interfere with tmux's OSC 8 forwarding.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗