Running Claude Code in your terminal properly

Claude Code is a terminal application, which means your terminal setup is part of the product. Four settings separate a tool that feels responsive from one that feels like it is fighting you, and none of them are obvious.

By the Continuum team. We build a workbench that runs Claude Code, Codex, and their peers, so the model rates quoted here are the ones our own cost analytics ship with.

The short version

Change to your repository root and run claude. The directory you launch from defines what the agent can see, so the repo root is almost always right. Learn four keys: Esc interrupts a turn, Shift+Tab cycles permission mode, Ctrl+O opens the transcript viewer, and Ctrl+B backgrounds a long-running command. Then set a notification channel so you are told when a run finishes, and use claude -w once you want more than two sessions at a time.

What you need to know
  • Run claude from the repository root. The working directory defines its scope.
  • Esc interrupts a running turn and keeps the work done so far.
  • Shift+Tab cycles permission mode mid-session, including into plan.
  • Set preferredNotifChannel or you will not know when a long run finished.
  • Inside tmux, three lines in ~/.tmux.conf fix notifications and Shift+Enter.
  • Beyond two concurrent sessions, tabs stop working and you want claude -w.

Starting a session

cd ~/code/your-project     # the repo root, not a subdirectory
claude

The first launch in a directory asks you to accept workspace trust. That gate is what stops a repository you just cloned from running its own hooks and settings against your machine before you have read them, so it is worth reading rather than clicking through.

The shortcuts that matter

The dozen worth committing to muscle memory, as of August 2026.

KeyDoesWhy it matters
EscInterrupt Claude, or close a dialogStops a wrong direction. The work done so far is kept
Esc EscClear the input draft, or open the rewind menuOn an empty prompt this restores code and conversation from an earlier point
Shift+TabCycle permission modeDrop into plan mode mid-task without restarting
Ctrl+OToggle the transcript viewerFull tool usage, with a timestamp and model per assistant message
Ctrl+BBackground the running taskMove a long build or test run out of the way. Press twice in tmux
Ctrl+RReverse-search command historyRecall the prompt that worked last week
Ctrl+GOpen the prompt in your editorFor anything longer than two sentences
Ctrl+SStash or restore the promptPark a half-written prompt, ask something else, bring it back
Ctrl+LRedraw the screenRecovers a garbled or half-blank display
Ctrl+TToggle the task checklistSee the plan Claude is working through
Ctrl+CInterrupt, or clear inputWith nothing running, first press clears, second exits
Ctrl+DExitFirst press hints, second within 800ms exits

The four prefixes

Four characters at the start of the input change what happens when you press Enter. They are the fastest part of the interface and the least discovered.

TypeAnd you get
/The command and skill menu: built-in commands, your skills, plugin and MCP commands
!Shell mode. Runs the command directly, adds its output to the session, and Claude responds to it
@File-path autocomplete, so you reference a file instead of describing it
?On an empty prompt, the keyboard shortcut help panel

Multiline input, which is not obvious

Enter submits. Getting a newline without submitting depends on your terminal emulator, which is why this trips up almost everyone once.

Pick the row that matches your terminal.

TerminalShift+Enter for a newline
Ghostty, Kitty, iTerm2, WezTerm, Warp, Apple Terminal, Windows TerminalWorks with no setup
VS Code, Cursor, Devin Desktop, Alacritty, ZedRun /terminal-setup once
gnome-terminal, JetBrains IDEs such as PyCharmNot available. Use Ctrl+J

The four settings that change how it feels

One: tell me when it is finished

An autonomous run that takes six minutes is six minutes you should spend elsewhere, and without a notification you will either sit and watch it or forget about it entirely. By default, Claude Code sends a desktop notification only in Ghostty, Kitty, and iTerm2. Everywhere else you have to ask.

~/.claude/settings.json
{
  "preferredNotifChannel": "terminal_bell"
}
Or a Notification hook, which works in any terminal and can do anything.
{
  "hooks": {
    "Notification": [
      {
        "hooks": [
          { "type": "command", "command": "afplay /System/Library/Sounds/Glass.aiff" }
        ]
      }
    ]
  }
}

The desktop notification travels over SSH to your local machine, so a session on a remote box can still get your attention. iTerm2 needs one extra step: Settings, Profiles, Terminal, check "Notification Center Alerts", then Filter Alerts, then enable "Send escape sequence-generated alerts".

Two: stop the flicker

If the display flickers or the scroll position jumps while Claude is working, switch renderers. Fullscreen rendering draws to the separate screen your terminal reserves for full-screen applications instead of appending to scrollback, which keeps memory usage flat on very long sessions and adds mouse scrolling and selection.

# inside a session, saves the preference
/tui fullscreen

# or per launch
CLAUDE_CODE_NO_FLICKER=1 claude

Three: three lines for tmux

Inside tmux, two things break silently: Shift+Enter submits instead of inserting a newline, and desktop notifications and the progress bar never reach the outer terminal.

~/.tmux.conf, then tmux source-file ~/.tmux.conf
set -g allow-passthrough on
set -s extended-keys on
set -as terminal-features 'xterm*:extkeys'

Four: match the theme

Run /theme and pick one, or select the auto option, which detects your terminal's light or dark background and follows OS appearance changes. Claude Code does not control your terminal's own colour scheme, so a mismatch here reads as a rendering bug when it is a preference you have not set.

Running more than one

Two sessions in two tabs is fine. Beyond that, two problems appear: you lose track of which tab is doing what, and the agents start colliding in the same working tree. The second one is the expensive one, because two agents editing the same files will overwrite each other and neither will mention it.

SessionsApproach
1One terminal
2Two tabs, same repo, different files
3 or moreOne git worktree per session: claude -w name
Long-runningclaude --bg, then claude agents to watch them
Many, across machinesWorktrees plus a workbench that shows all of them at once
A worktree per agent, without managing git yourself.
claude -w feature-auth
claude -w feature-search    # in another terminal

# with its own tmux session
claude -w feature-auth --tmux

# or start it detached and come back later
claude --bg "port the auth tests to the new fixture"
claude agents

Questions people ask

Change to your repository root and run claude. The directory you launch from defines what the agent can see, so the repo root is almost always the right choice. Use --add-dir if you genuinely need access to a second tree.

Press Esc. It interrupts the current turn and keeps the work done so far, so you can redirect without starting over. Ctrl+C interrupts too and, with nothing running, clears the input on the first press and exits on the second.

Shift+Tab cycles through them, including into plan mode, which is useful the moment a task turns out to be bigger than you thought. On Windows, Alt+M does the same when the runtime does not enable VT input mode.

Ctrl+J works in every terminal with no configuration, as does typing a backslash then Enter. Shift+Enter works without setup in Ghostty, Kitty, iTerm2, WezTerm, Warp, Apple Terminal, and Windows Terminal; in VS Code, Cursor, Alacritty, and Zed, run /terminal-setup once.

Set preferredNotifChannel to terminal_bell in ~/.claude/settings.json, or configure a Notification hook to play a sound. Desktop notifications are on by default only in Ghostty, Kitty, and iTerm2, and iTerm2 needs escape-sequence alerts enabled in its own settings.

Yes, and it is a good fit for multiple sessions. Add allow-passthrough, extended-keys, and the xterm extkeys terminal feature to ~/.tmux.conf, or notifications never reach the outer terminal and Shift+Enter submits instead of inserting a newline.

Yes. Past two, give each one its own git worktree with claude -w name. Claude Code then actively blocks that session from editing the main checkout, not just from sharing a directory with another agent.

The classic renderer appends to your scrollback and can flicker or jump. Run /tui fullscreen to switch to fullscreen rendering, which keeps memory flat and adds mouse support, at the cost of native scrollback search.

Sources

Every figure above was read from these pages on August 2026. Vendors reprice without notice; if you find a stale number, tell us.

  1. Claude Code interactive mode
  2. Configure your terminal for Claude Code
  3. Run parallel sessions with worktrees
Try it

More agents than
you have tabs.

Continuum runs each session in its own worktree and shows all of them in one sidebar, with live status and phone notifications.

free app · your subscriptions · local-first