When you run Claude Code (or any TUI built on Ink) inside tmux inside a modern terminal like Ghostty, links render as [text] with the URL hidden behind an OSC 8 hyperlink escape sequence. Your terminal knows the URL. tmux knows the URL. But none of the obvious ways to actually click it work:
⌘ + click— tmux hasmouse on, so it swallows the event before Ghostty sees it.Shift + ⌘ + click— supposed to bypass the mouse grab, but often doesn't in the tmux → Ghostty chain.tmux-fzf-url— great plugin, but it scrapes the visible text buffer. The URL isn't in the visible text; it's in the escape sequence. So it finds nothing.- Right-click menu — Oh My Tmux's context menu does detect the hyperlink (you'll see
TypeandCopyentries populated with the URL) but there's no "Open" action.
The right-click menu is the right place to fix this — tmux already knows the URL via #{mouse_hyperlink}. We just need to add an entry that shells out to open.
Add this to ~/.tmux.conf.local (in the # -- user customizations section):
# add "Open Hyperlink" entry to the right-click context menu (macOS)
bind -T root MouseDown3Pane if -F -t= "#{||:#{mouse_any_flag},#{&&:#{pane_in_mode},#{?#{m/r:(copy|view)-mode,#{pane_mode}},0,1}}}" { select-pane -t= ; send -M } { display-menu -T "#[align=centre]#{pane_index} (#{pane_id})" -t= -x M -y M "#{?#{m/r:(copy|view)-mode,#{pane_mode}},Go To Top,}" < { send -X history-top } "#{?#{m/r:(copy|view)-mode,#{pane_mode}},Go To Bottom,}" > { send -X history-bottom } '' "#{?mouse_word,Search For #[underscore]#{=/9/...:mouse_word},}" C-r { if -F "#{?#{m/r:(copy|view)-mode,#{pane_mode}},0,1}" "copy-mode -t=" ; send -X -t= search-backward -- "#{q:mouse_word}" } "#{?mouse_word,Type #[underscore]#{=/9/...:mouse_word},}" C-y { copy-mode -q ; send -l "#{q:mouse_word}" } "#{?mouse_word,Copy #[underscore]#{=/9/...:mouse_word},}" c { copy-mode -q ; set-buffer "#{q:mouse_word}" } "#{?mouse_line,Copy Line,}" l { copy-mode -q ; set-buffer "#{q:mouse_line}" } '' "#{?mouse_hyperlink,Open #[underscore]#{=/9/...:mouse_hyperlink},}" o { run-shell "open '#{q:mouse_hyperlink}'" } "#{?mouse_hyperlink,Type #[underscore]#{=/9/...:mouse_hyperlink},}" C-h { copy-mode -q ; send -l "#{q:mouse_hyperlink}" } "#{?mouse_hyperlink,Copy #[underscore]#{=/9/...:mouse_hyperlink},}" h { copy-mode -q ; set-buffer "#{q:mouse_hyperlink}" } '' "Horizontal Split" h { split-window -h -c "#{pane_current_path}" } "Vertical Split" v { split-window -v -c "#{pane_current_path}" } '' "#{?#{>:#{window_panes},1},,-}Swap Up" u { swap-pane -U } "#{?#{>:#{window_panes},1},,-}Swap Down" d { swap-pane -D } "#{?pane_marked_set,,-}Swap Marked" s { swap-pane } '' Kill X { kill-pane } Respawn R { respawn-pane -k } "#{?pane_marked,Unmark,Mark}" m { select-pane -m } "#{?#{>:#{window_panes},1},,-}#{?window_zoomed_flag,Unzoom,Zoom}" z { resize-pane -Z } }Then reload:
tmux source-file ~/.tmux.confRight-click a hyperlink and you'll see a new Open <url> (o) entry at the top of the hyperlink section, alongside the existing Type (C-h) and Copy (h).
It replaces Oh My Tmux's default MouseDown3Pane binding (the right-click-on-pane menu) with an identical copy — plus one extra entry:
"#{?mouse_hyperlink,Open #[underscore]#{=/9/...:mouse_hyperlink},}" o { run-shell "open '#{q:mouse_hyperlink}'" }Breakdown:
#{?mouse_hyperlink,…,}— only show the entry if tmux detected a hyperlink under the cursor. Empty label = tmux hides the row.#[underscore]#{=/9/...:mouse_hyperlink}— label shows the URL truncated to 9 chars, underlined for readability.o— keyboard shortcut while the menu is open.run-shell "open '#{q:mouse_hyperlink}'"— macOS'sopencommand hands the URL to your default browser.#{q:…}shell-quotes the URL so characters like&and?don't blow up.
On Linux, swap open for xdg-open. On WSL, swap for wslview or explorer.exe.
You can, and there are two paths:
- Hold
⌥(Option) while clicking — Ghostty's documented modifier to bypass the app's mouse grab. Works for OSC 8 link click. set -g mouse off— gives you full pass-through but you lose pane-resize, scroll-wheel-to-copy-mode, etc.
I like the menu approach because it's discoverable (the URL shows up in the menu so you know tmux sees it), it works regardless of modifier-key collisions with other apps, and it doesn't require turning mouse mode off.
Worth installing anyway for logs, commit messages, and anything that isn't OSC 8 wrapped. With Oh My Tmux, you don't need to touch tpm manually — it has built-in integration:
# ~/.tmux.conf.local — anywhere in the tpm section
set -g @plugin 'wfxr/tmux-fzf-url'Don't add set -g @plugin 'tmux-plugins/tpm' or run '~/.tmux/plugins/tpm/tpm' — Oh My Tmux handles tpm automatically, and adding those lines will fight with it.
Reload tmux and hit <prefix> + u to fzf-pick any URL visible in the current pane. (Remember: OSC 8 hyperlinks won't show up here because the URL isn't in the visible text.)
- macOS, Ghostty, tmux 3.6a
- Oh My Tmux
- tmux-fzf-url
- Tested with Claude Code's Ink-rendered hyperlinks