I run four or more Claude Code agents at once, and until recently they all shared one working tree. Two agents editing the same repo means one of them eventually builds against the other's half-finished changes. Git worktrees fix that cleanly. What nobody warned me about is that the fix multiplies a different problem I already had: forgetting which folder a session lives in. Taming Claude Code Sessions 路 Part 5 of 6 1 2 3 4 5 6 馃И Tested with Claude Code 2.1.x 路 macOS The symptom # With several agents in one directory, the working tree is shared mutable state. Agent A refactors a partial, agent B runs the build, and B’s “failure” is really A’s work in flight. I had been dodging this by scoping agents to different subdirectories, which works until it does not.
Once you're comfortable with AI coding agents, you start running several at once: one refactoring here, one writing tests there, one stuck waiting for your approval. Keeping them straight is its own little skill. Taming Claude Code Sessions 路 Part 4 of 6 1 2 3 4 5 6 馃И Tested with Claude Code 2.1.x 路 macOS / Linux Here are two ways to do it: a lightweight tmux plugin, and (briefly) dedicated “AI terminal” apps.
If you use tmux, you've hit this: ten windows open and they're all named `zsh` or `node`. Which one had your AI agent running? No idea. Let's make tmux label windows usefully. Taming Claude Code Sessions 路 Part 3 of 6 1 2 3 4 5 6 馃И Tested with Claude Code 2.1.x 路 macOS / Linux New to tmux? It’s a “terminal multiplexer”: it splits one terminal into many windows and panes that survive disconnects. The only vocabulary you need here: a window is like a browser tab inside tmux; the bar at the bottom lists them. The prefix is the key you press before a tmux command, commonly Ctrl+b (mine is Ctrl+a). Why everything is named zsh # By default tmux has a setting called automatic-rename turned on. It renames each window after whatever program is running in it. A shell? zsh. A Node program (like Claude Code)? node. Helpful in theory, useless when everything collapses to the same word.
After years of refining my terminal workflow, I've landed on a stack I genuinely enjoy using every day: **Ghostty** as the terminal emulator, **tmux** with **sesh** for session management, and **Neovim** with **LazyVim** for editing. Everything runs on macOS (Apple Silicon) with a consistent Catppuccin Mocha theme across all tools.