fzf's new tmux plugins bring CTRL-T file and commit-hash completion into Claude Code and Codex prompts
Shell key bindings like fzf's CTRL-T stop working once you type into an AI agent's prompt instead of your shell. fzf author Junegunn Choi published a guide and two tmux plugins, tmux-fzf-complete and fzf-git.tmux, that insert file paths, on-screen URLs and sentences, commit hashes and PR numbers into any tmux pane. Here is the setup, the requirements, and the one Claude Code and Codex setting that makes it work.
If you spend your day typing into Claude Code or Codex, you have probably noticed that your fzf key bindings are gone. CTRL-T for files and CTRL-G CTRL-H for commit hashes belong to your shell, and once an agent’s TUI is reading the keys, the shell never sees them. fzf author Junegunn Choi just published a guide to fixing that. It’s a practical answer to a concrete question: how do I insert a path, commit hash or PR number into an agent prompt without copying it with the mouse?
The trick: bind the keys in tmux
tmux sees keystrokes before the program in the pane does. So a tmux key binding works whatever the pane is running. It can open fzf in a floating pane and send your selection back to the original pane as keystrokes, so the agent takes it as typed. Two plugins do this:
| Plugin | Key | Completes |
|---|---|---|
| tmux-fzf-complete | PREFIX CTRL-T | Files, directories, and URLs, paths and sentences on the screen |
fzf-git.sh (fzf-git.tmux) | PREFIX g | Git objects |
Requirements: tmux-fzf-complete needs fzf 0.74.0 or later and Ruby (the latest fzf release is 0.74.5, from October 11). The floating pane needs tmux 3.7 or later; older versions fall back to a popup.
Setup
With TPM:
# ~/.tmux.conf
set -g @plugin 'junegunn/tmux-fzf-complete'
Or clone it and add run-shell /path/to/tmux-fzf-complete/fzf-complete.tmux. For Git objects, keep fzf-git.tmux in the same directory as fzf-git.sh and add run-shell /path/to/fzf-git.tmux.
What you get inside an agent prompt
PREFIX CTRL-T: the word before the cursor becomes the query, and the selection replaces it. Inside fzf,CTRL-Tcycles providers.ALT-Flists files,ALT-Ddirectories,ALT-UURLs on screen,ALT-Ppaths on screen, andALT-Ssentences on screen. A sentence is rebuilt from the rows the agent wrapped it into, so you can quote part of an answer back to the agent.CTRL-Oopens the item in your browser or$EDITOR,CTRL-Ycopies it, andCTRL-Rreloads to pick up new agent output.PREFIX g hfor commit hashes,PREFIX g bfor branches,PREFIX g wfor worktrees, andPREFIX g pfor GitHub pull requests (this one needspr.fzfin your$PATH). Type “review the changes in”, then pick the hash after checking each diff in the preview.
The setting that makes screen completion work
An agent drawing a full-screen UI leaves no tmux scrollback, so only what’s visible can be completed. Switch the agent to the main screen:
- Claude Code: run
/tui default, or set"tui": "default"in~/.claude/settings.json. Anthropic’s fullscreen docs describe/tui defaultas the switch back to the classic renderer. - Codex: set
alternate_screen = "never"under[tui]in~/.codex/config.toml, or start it withcodex --no-alt-screen. The Codex config reference liststui.alternate_screenasauto | always | never.
Bottom line
This is a small, free fix for everyday friction when you work with agents. It pairs well with our Claude Code daily-driver setup and with tips on cutting Claude Code token overhead: pointing the agent at the exact file or commit beats pasting context. If you review agent PRs, PREFIX g p slots straight into the workflow from how the Claude Code team does code review.
Sources: fzf: Using fzf with AI coding agents · tmux-fzf-complete README · fzf-git.sh · Claude Code fullscreen docs · Codex config reference