Add option to disable OSC 8 hyperlink emission (FORCE_HYPERLINK ignored) — ctrl-click opens duplicate tabs in Konsole
What happened
Since the newer TUI began emitting OSC 8 hyperlink escape sequences for URLs, ctrl-clicking a link in KDE Konsole opens two browser tabs for a single click.
Root cause (verified)
Konsole has its own regex-based URL detector (Settings → Edit Current Profile → Mouse → "Underline links") in addition to honoring OSC 8 hyperlinks. When Claude Code wraps a URL in an OSC 8 sequence whose visible text is also a valid URL, a single ctrl-click fires both Konsole handlers — the OSC 8 hyperlink and the regex match — so two tabs open.
Verified by isolating the handlers:
- Uncheck Konsole's "Underline links" → single tab (but the underline is lost). This proves the regex filter is the second handler.
- Re-check "Underline links" → two tabs again.
FORCE_HYPERLINK=0 does not disable emission
The supports-hyperlinks convention suggests FORCE_HYPERLINK=0 should disable OSC 8 emission, but it has no effect in Claude Code:
- Set
export FORCE_HYPERLINK=0in the shell, launchedclaudefrom that shell. - Confirmed inside the running session that the variable is inherited (
echo $FORCE_HYPERLINK→0). - Links still open two tabs — Claude Code still emits OSC 8.
So there is currently no way to disable OSC 8 hyperlink emission, and no combination of terminal + Claude Code settings yields both an underline (from the terminal's own filter) and a single-tab open.
Request
Please honor FORCE_HYPERLINK=0 (and/or add a settings.json option or CLI flag) to disable OSC 8 hyperlink emission and fall back to plain-text URLs. That lets terminals with their own URL detection (Konsole, and others with regex link filters) handle links as they did before the OSC 8 change.
Environment
- Claude Code: newer TUI (OSC 8 hyperlinks enabled)
- Terminal: KDE Konsole on Linux (Fedora),
TERM=xterm - This is not the JetBrains duplicate-mouse-event issue (#68568) — it reproduces in Konsole, a standard terminal.