[BUG] Ctrl+click on a link in Claude Code's output opens 2 duplicate browser tabs (xfce4-terminal)
What's Wrong?
Ctrl+clicking a URL printed by Claude Code in its response text opens two duplicate tabs in the browser, both pointing at the same URL.
This is specific to links rendered by Claude Code - a plain echo "https://example.com" printed directly in the same terminal, Ctrl+clicked, opens exactly one tab. Calling exo-open <url> directly from the shell also opens exactly one tab. So the browser and the OS's URL handler are both behaving correctly - the duplication only happens for links that Claude Code itself renders.
What Should Happen?
Ctrl+clicking a link in Claude Code's output should open exactly one browser tab, the same as it does for a plain URL printed by any other command in the same terminal.
Steps to Reproduce
- In xfce4-terminal, run
echo "https://example.com"and Ctrl+click the printed URL - confirm it opens exactly one browser tab. - Start
claudeand ask it to print or return a URL in its response (e.g. ask it to summarise a web page, or in my case, have it confirm a link after performing a task -https://wiki.indie-it.com/index.php/Artificial_Intelligence). - Ctrl+click that same URL as rendered in Claude Code's chat output.
- Two duplicate tabs open in the browser, both loading the same URL.
Note: this was isolated by testing with both of xfce4-terminal's own URL-matching settings (MiscHighlightUrls and MiscHyperlinksEnabled) individually disabled - the duplicate persisted in both cases when clicking a Claude Code-rendered link, but never occurred for a plain echo'd URL regardless of those settings. This points to Claude Code's own hyperlink rendering (likely the OSC 8 escape sequence it emits around printed URLs) producing two overlapping or adjacent clickable regions for the same visible text, rather than anything terminal- or browser-side.
Claude Model
claude-sonnet-5 / high effort
Is this a regression?
I don't know
Claude Code Version
2.1.205 (Claude Code)
Platform
Anthropic API
Operating System
Other Linux (Linux Mint 22.3 / Ubuntu 24.04 Noble base)
Terminal/Shell
Xterm (closest match - actual terminal is xfce4-terminal 1.1.3-1build1, VTE 0.76)
Additional Information
- Browser: Brave (single running instance throughout testing, confirmed only one
x-scheme-handler/httpsMIME handler registered -brave-browser.desktop- so no duplicate default-browser registration involved) ~/.config/xfce4/terminal/terminalrcrelevant settings during testing:MiscHighlightUrlsandMiscHyperlinksEnabledeach toggled independently, duplicate persisted for Claude Code links in every combination- A direct
exo-open <url>shell call (bypassing terminal click handling entirely) opens exactly one tab, confirming the browser/OS opener is not at fault - Happy to provide further diagnostics (e.g. raw terminal escape sequence capture around a Claude Code-printed link) if useful
17 Comments
I see the same on Windows Terminal, Ctrl+click on a link opens two tabs of the same URL. Version 2.1.207, Windows Terminal version 1.24.11321.0. I also have links highlighting enabled in Windows Terminal, so I usually get the same functionality by Windows Terminal itself.
So I guess the result is the same - the terminal itself does one tab open, Claude Code does the second one. What we need is to be able to unbind Ctrl+click for URL opening in Claude Code, because the terminal functionality is superior (works everywhere) to the Claude Code one.
+1 I'm using Warp Terminal on MacOS, this only happens when tui is set to fullscreen.
Confirming on another terminal/OS combination that Ctrl+clicking a Claude Code-rendered URL opens two duplicate tabs.
Environment:
For me this is isolated to fullscreen TUI mode. Same links tested in both renderers:
/tui default: every format opens exactly one tab (bare URL, markdown link, autolink, inline-code URL, fenced-code-block URL)./tui fullscreen: all of those open two duplicate tabs.So
/tui defaultworks around it, but dropping all benefits of fullscreen mode just for this is not worth it. (Related: #76022 reports the same fullscreen-renderer duplication but frames it as left-click rather than Ctrl+click.)Following up because this is still consistently an issue for me with Claude Code v2.1.218
Adding references — this looks like the same bug reported from a few angles:
Hoping that consolidating these might help with triage.
Confirmed — reproduced on 2.1.233 (Linux). Thanks for the unusually thorough report.
Interestingly, your OSC 8 hypothesis turned out not to be it: capturing the raw bytes shows Claude Code emits exactly one well-formed hyperlink sequence (single open/text/close, no overlap). The real cause is that the link gets opened twice by two different actors:
echooutput (no mouse reporting active) opens only one tab, and why disabling either of xfce4-terminal's URL settings individually didn't help.We already guard against this double-open in VS Code/Cursor-style terminals; VTE-based terminals like xfce4-terminal need the same treatment, so we'll track a fix for that. In the meantime, disabling both MiscHighlightUrls and MiscHyperlinksEnabled should get you down to a single tab (Claude Code's own open).
🤖 Generated with Claude Code
And what about Windows Terminal?
Having this nasty bug as well.
Environment Info
Looks like fixed in Windows Terminal in the latest version of Claude Code
Seems fixed for me 😃
Mostly works, but it is still reproducible for me after some time, possibly after session restore. I have not tried to find the exact repro, yet.
Ah, the bug is back :-(
Yeah, those vibe coders...
v2.1.280 and it's now intermittent, no idea what makes it fire twice vs once. I've noticed in a single session and interacting with a single link, sometimes ctrl+click opens one tab, and other times it opens two tabs.
Doesn't seem to be related to the session being restored for me, both fresh and restored sessions have the intermittent bug.
Vibe coding at its best! 😅
Still happens..
It looks like it's handling both the mouse-down and mouse-up events as separate clicks and opening the browser twice. If I click and hold the link, then move the cursor away from the link before releasing the mouse button, only one browser tab opens.
Chiming in
Fedora 44, KDE 6.7.5, Konsole 26.08.1
PowerShell on behalf of Windows Terminal (wt)
Claude Code version 2.1.296
Disturbing especially when I try to open 20 PRs at once.