[BUG] Ctrl+click on a link in Claude Code's output opens 2 duplicate browser tabs (xfce4-terminal)

Status Open
Reported on v2.1.205
Maintainer reply ✓ Yes — bcherny
Activity 17 comments · opened Jul 9, 2026
💡 Likely answer: A maintainer (bcherny, collaborator) responded on this thread — see the highlighted reply below.

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

  1. In xfce4-terminal, run echo "https://example.com" and Ctrl+click the printed URL - confirm it opens exactly one browser tab.
  2. Start claude and 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).
  3. Ctrl+click that same URL as rendered in Claude Code's chat output.
  4. 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/https MIME handler registered - brave-browser.desktop - so no duplicate default-browser registration involved)
  • ~/.config/xfce4/terminal/terminalrc relevant settings during testing: MiscHighlightUrls and MiscHyperlinksEnabled each 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

View original on GitHub ↗

17 Comments

oldium · 3 months ago

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.

ARKye03 · 3 months ago

+1 I'm using Warp Terminal on MacOS, this only happens when tui is set to fullscreen.

elisa-a-v · 3 months ago

Confirming on another terminal/OS combination that Ctrl+clicking a Claude Code-rendered URL opens two duplicate tabs.

Environment:

  • Claude Code: 2.1.207
  • Terminal: GNOME Terminal 3.44.0 (VTE 0.68.0)
  • OS: Pop!_OS 22.04 LTS (kernel 7.0.11)
  • Model: claude-opus-4-8
  • Platform: Anthropic API

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 default works 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.)

elisa-a-v · 2 months ago

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:

  • #76022 — mentioned above, fullscreen TUI renderer opening hyperlinks twice (same root cause, filed the same day)
  • #72998 — same ctrl+click duplicate-tab symptom in Konsole, asking for an option to disable OSC 8 emission
  • #68568 — links opening twice in the JetBrains terminal

Hoping that consolidating these might help with triage.

bcherny collaborator · 1 month ago

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:

  1. xfce4-terminal opens the link natively on Ctrl+click (hyperlink or URL match), consuming the button press;
  2. Claude Code enables mouse reporting for its UI, still receives the button release with Ctrl held, and opens the link itself — that's its built-in Ctrl+click-to-open feature, which is why plain echo output (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

oldium · 1 month ago

And what about Windows Terminal?

Rohlik · 1 month ago

Having this nasty bug as well.

Environment Info

  • Platform: linux
  • Terminal: gnome-terminal
  • Version: 2.1.251
  • Feedback ID: 23880f12-b3e1-404d-940e-8aca547f8c06
oldium · 1 month ago

Looks like fixed in Windows Terminal in the latest version of Claude Code

plittlefield · 1 month ago

Seems fixed for me 😃

oldium · 1 month ago

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.

plittlefield · 1 month ago

Ah, the bug is back :-(

oldium · 1 month ago

Yeah, those vibe coders...

elisa-a-v · 21 days ago

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.

oldium · 21 days ago

Vibe coding at its best! 😅

aldlfkahs · 8 days ago

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.

dac514 · 7 days ago

Chiming in

Fedora 44, KDE 6.7.5, Konsole 26.08.1

ismailyavuznar · 1 day ago

PowerShell on behalf of Windows Terminal (wt)
Claude Code version 2.1.296

Disturbing especially when I try to open 20 PRs at once.