DEV Community

Cover image for How I Use 4 Terminal Setups with Claude Code Agent Teams
Kohei Aoki
Kohei Aoki

Posted on

How I Use 4 Terminal Setups with Claude Code Agent Teams

Introduction

I stopped opening my IDE. Claude Code is my development environment now — VSCode is only for the occasional visual check.

One feature I use daily is Agent Teams: multiple Claude Code instances working as a coordinated team, with one leader assigning tasks and members working independently in their own context windows. It's especially effective for parallel investigation, code review, and debugging.

Agent Teams support two display modes: in-process mode (any terminal) and split-pane mode (each member gets its own pane). Split-pane mode requires tmux or iTerm2, which sent me on a search for the best terminal setup on Mac.

I tested four environments, found that each has trade-offs, and ended up building an fzf session picker that lets me choose the right one every time I open a window.

What I Need from a Terminal

When Claude Code is your primary development tool, terminal requirements expand:

  • Clickable URLs and file paths — Claude outputs links constantly (PR URLs, docs, deploy URLs)
  • Agent Teams split-pane mode — run multiple agents in parallel with full visibility
  • Session persistence — stop work today, resume tomorrow
  • Japanese input — I write prompts in Japanese daily (relevant for CJK users)

Comparing 4 Setups

Legend: ◎ = built-in ○ = requires config/plugin △ = limited × = not supported

Feature Ghostty iTerm2 Ghostty + tmux Ghostty + zellij
Rendering speed △ slow
Open URLs / files ◎ Cmd+Click ◎ Cmd+Shift+Click ◎ Cmd+Shift+Click
CJK input ○ Ghostty config
Shift+Enter newline ○ Ghostty config
Session persistence × × ○ plugin ◎ built-in
Status line display × × ○ tmux config ×
Agent Teams split pane × ○ it2 CLI + Python API ×
Ease of use △ many keybindings ◎ UI guides

Ghostty — Fastest, Zero Config

Ghostty (v1.3.1) is a GPU-accelerated cross-platform terminal emulator. On macOS it uses Metal, and startup feels under 0.1 seconds.

The killer feature for Claude Code is clickable URLs. With link-url, Cmd+Click opens any URL in your browser. Since Claude Code constantly outputs PR links, doc URLs, and deploy URLs, this is a significant productivity boost.

Weakness: No session management. Agent Teams only work in in-process mode — no split panes.

iTerm2 — Feature-Rich, No Setup Required

iTerm2 is the classic macOS terminal. It's stable, feature-rich, and supports Agent Teams split-pane mode (requires it2 CLI installation and enabling the Python API).

Weakness: Noticeably slower rendering compared to Ghostty. When Claude Code outputs long responses, iTerm2 shows visible lag that Ghostty doesn't.

Ghostty + tmux — Extensible with Config and Plugins

Combining tmux with Ghostty unlocks Agent Teams split-pane mode, plus:

Note: Some Ghostty features are restricted through tmux. URL clicking works with Cmd+Shift+Click, and Shift+Enter requires a Ghostty config tweak. See the configuration section below.

Ghostty + zellij — Built-in Features

zellij (v0.43.1) is a Rust-based terminal workspace. It displays UI guides, so you don't need to memorize keybindings like tmux. Session persistence is built in.

Overall, zellij is more intuitive than tmux and easier to pick up if you're new to terminal multiplexers.

Weakness: Agent Teams split-pane mode is not supported. URL clicking works with Cmd+Shift+Click, same as tmux.

Recommendations by Use Case

Use case Recommendation
Daily Claude Code usage Ghostty (fast, clickable URLs)
Agent Teams with split panes Ghostty + tmux (Shift+Enter fix via config)
Session persistence + intuitive UX Ghostty + zellij
Stability, minimal parallel work iTerm2

Configuration for Ghostty + tmux/zellij

tmux: Shift+Enter Fix

Through tmux, Shift+Enter doesn't work in Claude Code. Add this to your Ghostty config:

# ~/.config/ghostty/config
keybind = shift+enter=text:\x1b[13;2u
Enter fullscreen mode Exit fullscreen mode

tmux: Session Persistence

# tmux.conf
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @resurrect-capture-pane-contents 'on'
set -g @continuum-restore 'on'
set -g @continuum-save-interval '15'
Enter fullscreen mode Exit fullscreen mode

tmux: Claude Code Status Line

# tmux.conf
# Left: project name
set -g status-left "#[fg=#89b4fa,bold] #(cat ~/.claude/tmux-status-left.txt 2>/dev/null || echo '#S') "
# Right: model, context usage, rate limit, cost
set -g status-right "#[fg=#a6e3a1]#(cat ~/.claude/tmux-status-right.txt 2>/dev/null)#[default]"
Enter fullscreen mode Exit fullscreen mode

zellij: Session Persistence

// zellij config.kdl
session_serialization true
serialize_pane_viewport true
Enter fullscreen mode Exit fullscreen mode

Ghostty: Keybinding Adjustments (Shared)

When using tmux or zellij, Ghostty keybindings can conflict:

# ~/.config/ghostty/config
keybind = super+t=unbind
keybind = super+n=unbind
keybind = super+w=unbind
keybind = super+c=copy_to_clipboard
keybind = super+v=paste_from_clipboard
keybind = super+q=quit
Enter fullscreen mode Exit fullscreen mode

fzf Session Picker

Since the best setup depends on what I'm doing, I built a script that lets me choose every time I open a new Ghostty window.

┌──────────────────────────────────────┐
│ session >                            │
│ Select a session or create new       │
│──────────────────────────────────────│
│ [zellij] my-project                  │
│ [tmux] claude-team                   │
│ [tmux] dev-server                    │
│ [new] Ghostty (plain shell)          │
│ [new] tmux                           │
│ [new] zellij                         │
└──────────────────────────────────────┘
Enter fullscreen mode Exit fullscreen mode

How It Works

  1. Ghostty's command config launches the script on window open
  2. The script lists existing zellij and tmux sessions
  3. fzf lets you pick — attach to an existing session or create a new one
  4. Esc/Ctrl+C cancels and drops you into a plain shell

Installation

The script is on GitHub: ghostty-session-picker

curl -fsSL https://raw.githubusercontent.com/coa00/ghostty-session-picker/main/ghostty-session-picker \
  -o ~/.local/bin/ghostty-session-picker
chmod +x ~/.local/bin/ghostty-session-picker
Enter fullscreen mode Exit fullscreen mode

Add one line to your Ghostty config:

# ~/.config/ghostty/config
command = /Users/you/.local/bin/zellij-sessionizer
Enter fullscreen mode Exit fullscreen mode

To enable working directory restore, add this to ~/.zshrc:

chpwd() {
  echo "$PWD" > ~/.last_working_dir
}
Enter fullscreen mode Exit fullscreen mode

Wrap Up

There's no single "best terminal for Claude Code." The right choice depends on what you're doing — so rather than picking one, I built a system to choose every time.

Personally, after investing time in tmux configuration, I now primarily use Ghostty + tmux. Beyond Agent Teams split panes, tmux handles session persistence and status line display — consolidating everything into one setup. That said, this comes down to how much you invest in configuration and what you prioritize. The comparison should help you find the right fit for your workflow.

References

Top comments (0)