From 12f5671070270792ca9a8e87f3808899522a4fa6 Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Thu, 26 Feb 2026 12:14:48 -0600 Subject: [PATCH] store: tmux cc() alias in ~/.zshrc for auto-named Claude Code sessions --- ...-auto-named-claude-code-sessions-56e448.md | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 graph/configurations/tmux-cc-alias-in-zshrc-for-auto-named-claude-code-sessions-56e448.md diff --git a/graph/configurations/tmux-cc-alias-in-zshrc-for-auto-named-claude-code-sessions-56e448.md b/graph/configurations/tmux-cc-alias-in-zshrc-for-auto-named-claude-code-sessions-56e448.md new file mode 100644 index 00000000000..d60fd4ae62d --- /dev/null +++ b/graph/configurations/tmux-cc-alias-in-zshrc-for-auto-named-claude-code-sessions-56e448.md @@ -0,0 +1,29 @@ +--- +id: 56e448c8-1a23-46bb-9a2e-a40c3b048188 +type: configuration +title: "tmux cc() alias in ~/.zshrc for auto-named Claude Code sessions" +tags: [tmux, zshrc, alias, claude-code, claude-home, agent-teams, configuration] +importance: 0.55 +confidence: 0.8 +created: "2026-02-26T18:14:48.637636+00:00" +updated: "2026-02-26T18:14:48.637636+00:00" +--- + +# tmux cc() alias for Claude Code session management + +## Purpose +Always run Claude Code inside tmux to enable Agent Teams tmux pane splitting and remote-control session persistence. + +## Function definition (in ~/.zshrc, Aliases section) + +```zsh +cc() { tmux new -s "${1:-$(basename $PWD)}" -A; } +``` + +## Behavior +- `cc` — creates/attaches a tmux session named after the current directory basename +- `cc custom-name` — creates/attaches a session with an explicit name +- `-A` flag: attaches if session already exists, creates new if not + +## Why tmux is required for Agent Teams +Claude Code's experimental Agent Teams feature auto-detects tmux via the `$TMUX` env var and uses tmux split panes for sub-agent teammates. Without tmux, Agent Teams falls back to a non-visual mode.