← All posts

Claude Code in iTerm2: Setup, Notifications, Profiles

Claude Code iTerm2 setup in 2026: Option as Esc+, /terminal-setup, notifications over SSH and tmux, and a dedicated profile with a badge for agent sessions.

Claude Code runs well in iTerm2 with a few minutes of setup. Shift+Enter for newlines works out of the box, and Claude Code sends a desktop notification in iTerm2 by default when it finishes or needs permission. To finish the setup, set both Option keys to "Esc+" so Option shortcuts work, run /terminal-setup once so /copy can reach your clipboard, and create a dedicated Claude Code profile with its own badge and colors. If you work over SSH, also turn on iTerm2's escape-sequence alerts so notifications reach your Mac. Here is each step.

All settings below match iTerm2's current Settings window and the Claude Code terminal docs as of October 2026.

What you get in iTerm2
Feature Default Setup needed
Shift+Enter for newline Works None
Desktop notifications from Claude Code Sent by default Allow iTerm2 notifications in macOS
Notifications over SSH Reach your Mac once alerts are on Enable escape-sequence alerts in the profile
Option shortcuts (Option+P, Option+Enter) Off Left and Right Option key set to "Esc+"
/copy to system clipboard Off Run /terminal-setup once, then restart iTerm2
Split panes for parallel sessions Works Optional keybindings
Inside tmux Needs tmux config allow-passthrough and extended keys
Step 1: Option key as Meta

Claude Code uses Option for some shortcuts, including Option+P to switch models and Option+Enter for a newline. iTerm2 sends Option as a normal key by default, so these do nothing.

Open Settings, Profiles, Keys, General and set both Left Option key and Right Option key to Esc+. If you type accented characters with Option, set only the left key and keep the right one as Normal.

Step 2: Run /terminal-setup

Start claude and run /terminal-setup. In iTerm2 this enables "Applications in terminal may access clipboard" under Settings, General, Selection, which lets Claude Code's /copy command write to your clipboard. It detects iTerm2 even if you run it inside tmux. Restart iTerm2 afterward for the change to take effect.

You do not need /terminal-setup for Shift+Enter in iTerm2; that already works.

Step 3: Notifications

Claude Code fires a notification when it finishes a task or pauses for a permission prompt and you appear to be away. On a local session in iTerm2, these show up as normal macOS notifications as long as iTerm2 is allowed to send them (System Settings, Notifications, iTerm2).

Claude Code delivers the notification as a terminal escape sequence, which also means it reaches your Mac from a remote session over SSH. The Claude Code docs say iTerm2 needs forwarding turned on for that, and the same setting is the first thing to check if alerts are missing locally:

  1. Go to Settings, Profiles, Terminal.
  2. Check Notification Center Alerts.
  3. Click Filter Alerts and enable Send escape sequence-generated alerts.

If you run Claude Code inside tmux, notifications also need tmux passthrough. Add this to ~/.tmux.conf and run tmux source-file ~/.tmux.conf:

set -g allow-passthrough on
set -s extended-keys on
set -as terminal-features 'xterm*:extkeys'

The extended-keys lines also fix Shift+Enter inside tmux. For sounds or custom scripts on top of the built-in alert, see our Claude Code notifications guide.

Step 4: A dedicated Claude Code profile

Profiles are where iTerm2 earns its place. Create one just for agent work:

  1. Settings, Profiles, click +, name it "Claude Code."
  2. Under General, Command, choose Command and enter claude. New tabs with this profile start Claude Code directly.
  3. Under General, Working Directory, pick a project folder or "Reuse previous session's directory."
  4. Under General, Badge, enter text like claude or your project name. iTerm2 draws it faintly in the corner of the pane, so you always know which pane holds an agent.
  5. Under Colors, pick a slightly different background from your normal profile. It is a cheap way to tell agent panes from shell panes at a glance.

Give the profile a keyboard shortcut under Settings, Keys, Key Bindings (action: New Tab with Profile) and you can open a new Claude Code session with one keystroke.

Automatic profile switching

With iTerm2's shell integration installed, Advanced, Automatic Profile Switching can change profiles based on directory or host. You could, for example, apply a red-tinted profile whenever you are in a production repo, which is a useful reminder before you approve a command.

Step 5: Splits for parallel agents

Cmd+D splits vertically and Cmd+Shift+D splits horizontally. A common setup is two or three Claude Code sessions, each in its own git worktree, side by side. Cmd+Option+arrow keys move between panes. Our post on Claude Code with git worktrees covers the worktree side.

Inside Claude Code, run /theme and choose the auto option so its colors follow your profile's light or dark background.

Where iTerm2 runs out of road

iTerm2 is very capable, but it treats Claude Code as just another process. With six or eight panes running, you still have to scan each one to see which agent is waiting. Triggers can help a little (a regex trigger on a permission prompt can post an alert), but they are fragile and break when Claude Code's wording changes.

That is the gap MOLTamp was built for. It is a macOS terminal shell for Claude Code with up to 50 tabs, attention badges that mark the tab that needs you or just finished, session monitoring, search, a customizable status line, and full visual skins. It is an Electron app, so it is heavier than iTerm2, and it does not have iTerm2's Python API or tmux -CC mode. If you want to compare before switching, read switching from iTerm to MOLTamp or the full best terminal for Claude Code guide.

Verdict

iTerm2 is one of the best traditional terminals for Claude Code in 2026. Notifications and Shift+Enter work by default, and the remaining setup (Option as Esc+, /terminal-setup, a dedicated profile) takes about five minutes. If you mostly run one or two sessions, you probably do not need anything else.

FAQ

Does Claude Code send notifications in iTerm2? Yes. Claude Code sends desktop notifications in iTerm2 by default. For SSH sessions, enable Notification Center Alerts and "Send escape sequence-generated alerts" in Settings, Profiles, Terminal.

Why don't Option shortcuts work in Claude Code on iTerm2? iTerm2 does not send Option as Meta by default. Set Left and Right Option key to "Esc+" under Settings, Profiles, Keys, General.

What does /terminal-setup do in iTerm2? It enables "Applications in terminal may access clipboard" so /copy can write to your system clipboard. Restart iTerm2 after running it. Shift+Enter already works without it.

Can I make an iTerm2 profile that launches Claude Code? Yes. Create a profile, set General, Command to claude, and choose a working directory. Add a badge so you can tell agent panes apart.

Is there something better than iTerm2 for running many Claude Code sessions? For a handful of sessions, iTerm2 is fine. For many at once, MOLTamp adds per-tab attention badges and session monitoring. It is free to use with every feature, and a one-time $10 license removes a recurring popup. Download MOLTamp and try it next to iTerm2.