I wrote about how I use tmux previously. My prefix is ctrl-w. Here’s how I use it with Claude Code (and other LLM CLI coding tools like Droid and Codex).

Claude Code Doesn’t Need More Features

I saw someone on GitHub requesting pagination functionality for Claude Code. You don’t need it. If you run Claude Code in tmux, you already have scrolling, paging, and search. No need to add features to Claude Code when tmux already does all of this. Enough with unnecessary features in Claude Code.

This applies to other LLM CLI tools too.

Scrolling with Copy Mode

In tmux, ctrl-w [ enters copy mode. From there:

  • ctrl-u / ctrl-d — page up/down
  • j / k — line by line
  • / — search forward
  • ? — search backward
  • n / N — next/previous match
  • ctrl-c — exit copy mode

That’s your pagination and search right there.

Capture Buffer to Editor

This lets you copy the entire tmux buffer (aka contents) to your editor:

tmux capture-pane -t 0 -p -S -10000|v

v is my script to trigger Neovim to read STDIN1. The flags:

  • -t 0 — target pane 0
  • -p — print to stdout (instead of to a tmux buffer)
  • -S -10000 — capture 10000 lines back

Useful for grabbing logs, script output, or the output from a Claude Code session.

Passing Through Ctrl Shortcuts

Coding agents like Droid and Claude Code use ctrl shortcuts — for example, ctrl-o expands details and transcripts. Since tmux intercepts ctrl shortcuts, and I had already mapped ctrl-o to switch to the last tmux window, pressing ctrl-o would never reach the coding agent.

The fix is to bind a passthrough in tmux:

bind o send-keys C-o

Now ctrl-w then o sends ctrl-o directly to the program running in the pane.

Claude Code Orchestration and tmux

(Note that in tmux terminology, “windows” are really what most people would call tabs.)

Coding Agents Understands tmux

Claude Code understands tmux. If you mention “tmux 9.0”, it’ll know it’s referring to the current session’s 0th pane in the 9th window (though I found it’s helpful to mention you always use one session, if you do, in CLAUDE.md/AGENTS.md). It knows the tmux subcommands to read the pane’s contents, scroll back, issue command, or re-run a command from history.

You can also run a coding agent session in a separate tmux window and have your main coding agent coordinate with it — send it tasks, check its output, or let it work independently on a parallel track. I wrote about auto-renaming tmux windows for AI coding agents so you can tell them apart at a glance.

For example, I have my backend API server running in a tmux window with live reload. When I ask Claude Code to make changes, I can tell it to look at the server output in that window+pane. It can see the errors as they happen and fix them while iterating on a feature.

The difference from using Claude Code’s Bash tool is that I can easily see the full output myself and intervene when needed. It’s more interactive (if I want to).

If you’re interested, check out my complete agentic coding setup and tech stack.

  1. v does a few other things with Neovim like opening a file by filename, but that’s not relevant here.