OSC 8 hyperlinks stripped in statusline output
Description
OSC 8 hyperlinks output by a custom statusline command are not clickable when Claude Code runs inside tmux. They work correctly outside tmux. Regular hyperlinks in Claude Code's own output (e.g., PR links, file paths) ARE clickable inside tmux — the issue is specific to the statusline rendering path.
Reproduction
- Create a minimal statusline script:
#!/bin/bash
# /tmp/statusline-hyperlink-repro.sh
printf '\033]8;;https://github.com\033\\click-me\033]8;;\033\\'
- Configure it in
~/.claude/settings.json:
{
"statusLine": {
"type": "command",
"command": "bash /tmp/statusline-hyperlink-repro.sh"
}
}
- Launch Claude Code inside tmux — the statusline shows
click-mebut it is not clickable.
- Launch Claude Code outside tmux —
click-meis clickable.
- Run the script directly in a tmux pane —
click-meis clickable.
Test matrix
| Context | Clickable? |
|---------|-----------|
| Script run directly in terminal (no tmux) | Yes |
| Script run directly in tmux pane | Yes |
| Claude Code statusline (no tmux) | Yes |
| Claude Code statusline (inside tmux) | No |
| Regular hyperlinks in Claude Code output (inside tmux) | Yes |
| With CLAUDE_CODE_NO_FLICKER=1 in tmux | No (same behavior) |
The critical observation: tmux fully supports OSC 8 hyperlinks — they work in regular pane content and in Claude Code's own output. The issue is specific to how the statusline content is rendered through Ink's TUI when running inside tmux.
Related issues and root cause analysis
This appears to be the same underlying issue as:
- #37216 — detailed root cause analysis showing statusline content bypasses Ink's React component tree
- #44372 — same bug on Windows
- #35040 — found that OSC 8 on the last line of multiline output works; first-line breaks it
Per the analysis in #37216: Ink's eraseLines() on each render cycle destroys OSC 8 sequences that were written directly to stdout. Content that flows through the Ink React component tree (like regular output hyperlinks) survives because slice-ansi v8 / @alcalzone/ansi-tokenize v0.3+ support OSC 8 round-tripping. The statusline content bypasses this path.
Attempted fixes (no effect)
set -g allow-passthrough on
set -ga terminal-features ",xterm-256color:hyperlinks"
Also tested with CLAUDE_CODE_NO_FLICKER=1 — no change.
Environment
- Claude Code: latest (CLI, terminal)
- Terminal: Kitty
- tmux 3.6a
- macOS
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗