Statusline OSC 8 hyperlinks render as plain text in sessions created from agents view
What happened
A custom statusLine command that emits OSC 8 hyperlinks renders them as clickable links in a normal interactive session, but as plain, unclickable text in any session created from inside agents view. Restarting agents view makes the links active again in every existing session, including the one that was previously broken.
The degradation is clean: SGR colors and all other statusline content render correctly, and no escape garbage or leaked URL text appears. The escapes appear to be stripped rather than corrupted.
Environment
- Claude Code 2.1.263
- Ubuntu, WezTerm,
TERM=xterm-256color,COLORTERM=truecolor
Reproduction
- Point
statusLine.commandat this script:
#!/usr/bin/env bash
cat > /dev/null
printf '\e]8;;https://example.com\e\\MINLINK-ST\e]8;;\e\\ | '
printf '\e]8;;https://example.com\aMINLINK-BEL\e]8;;\a | plain-control\n'
- Open agents view.
- Create a new session from within agents view.
- In that session, neither
MINLINK-STnorMINLINK-BELis clickable. - Restart agents view. Both become clickable in that same session.
Expected
OSC 8 hyperlinks in a custom statusline should render as clickable in sessions created from agents view, as they do in normal interactive sessions. The statusline documentation lists OSC 8 as supported and names WezTerm as a supported terminal.
Evidence isolating the statusline render path
- In the same failing session, running
printf '\e]8;;https://example.com\e\\CLICKME\e]8;;\e\\\n'produced a working link that opened the page. The terminal and the transcript render path both handle OSC 8 there; only the statusline does not. - Both OSC 8 terminator forms fail, ST (
\e\\) and BEL (\a), so this is not terminator-form sensitivity. - A working session and a failing session ran the same statusline script concurrently.
- The four-line script above reproduces it, so it does not depend on anything in a complex statusline.
Workaround
Restart agents view after creating sessions. This activates the links for all existing sessions.