Problem
Claude Code injects status text (e.g., "Now using extra usage") into the statusline output, which corrupts OSC 8 hyperlink escape sequences. The URL portion becomes visible as text.
Screenshot:
The issue hyperlink →#270 becomes →Now using extra usageai/issues/270#270
Root Cause (suspected)
OSC 8 format: ESC]8;;URL ST TEXT ESC]8;; ST
If CC injects text between the URL and string terminator (\e\\), the terminal misinterprets the sequence and displays the URL as visible text.
Current Workaround
Added STATUSLINE_NO_LINKS env var to disable hyperlinks:
export STATUSLINE_NO_LINKS=1
Investigation Needed
- Confirm hyperlinks are the culprit (test with
STATUSLINE_NO_LINKS=1)
- Try
\a (BEL) as string terminator instead of \e\\
- Understand how/where CC injects its status text
- Consider double-buffering approach if atomic printf isn't sufficient
Files
home/.claude/statusline-command.sh - hyperlink generation
Problem
Claude Code injects status text (e.g., "Now using extra usage") into the statusline output, which corrupts OSC 8 hyperlink escape sequences. The URL portion becomes visible as text.
Screenshot:
The issue hyperlink
→#270becomes→Now using extra usageai/issues/270#270Root Cause (suspected)
OSC 8 format:
ESC]8;;URL ST TEXT ESC]8;; STIf CC injects text between the URL and string terminator (
\e\\), the terminal misinterprets the sequence and displays the URL as visible text.Current Workaround
Added
STATUSLINE_NO_LINKSenv var to disable hyperlinks:export STATUSLINE_NO_LINKS=1Investigation Needed
STATUSLINE_NO_LINKS=1)\a(BEL) as string terminator instead of\e\\Files
home/.claude/statusline-command.sh- hyperlink generation