# --tmux Flag

> It opens a worktree session in its own tmux panes.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** claude --tmux, --tmux=classic

## Think of it like

It is like you give each new job its own desk. It has its own lamp and chair.

## Definition

--tmux opens a tmux session for a worktree, so the work gets its own panes in the terminal. It only works with --worktree, which gives the session its own copy of the files. On iTerm2 it uses iTerm2's own panes. Write --tmux=classic to get plain tmux instead.

## Example

Lucy runs three tasks at once. Each starts with claude -w and --tmux, so each has its own branch and its own panes she can switch between.

## Example code

```bash
claude -w feature-auth --tmux
```

Start a worktree in its own tmux session.

## Why it matters

Side-by-side tasks stay apart on screen as well as in the files.

## Common mistake

Using --tmux alone. It needs --worktree too, or Claude Code will not start.

## Three principles

- **Needs --worktree.** Always.
- **Own panes.** In the terminal.
- **=classic.** Plain tmux.

## Related terms

- [Worktree Isolation](https://learn.benibix.com/term/ai/worktree-isolation)
- [Agent Teams](https://learn.benibix.com/term/ai/agent-teams)

## Taught in

- [Cloud and Server Commands](https://learn.benibix.com/learn/ai-claude-code-commands/cloud-and-server-commands): Claude Code Commands, 17/17

![One repository, two worktrees side by side, each with its own branch and its own Claude session.](https://learn.benibix.com/diagrams/cc-worktree-isolation.svg)

---

Source: https://learn.benibix.com/term/ai/tmux-flag
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
