#Claude Code Teams

cmux claude-teams launches Claude Code with agent teams enabled. When Claude spawns teammate agents, they appear as native cmux splits instead of tmux panes, with full sidebar metadata and notifications.

#Usage

cmux claude-teams
cmux claude-teams --continue
cmux claude-teams --model sonnet

All arguments after claude-teams are forwarded to Claude Code. The command defaults teammate mode to auto and sets the environment so Claude uses cmux splits.

#How it works

cmux claude-teams creates a tmux shim script and configures the environment so Claude Code thinks it's running inside tmux. When Claude issues tmux commands to manage teammate panes, the shim translates them into cmux socket API calls.

  • Geçerli yüzeyin geçici shim dizininde bir tmux shim'i oluşturur. Yol, yüzey UUID'sini içerir ve her panelde ve her önyüklemede değişir; bu nedenle sabit bir yol verilemez
  • Claude Teams başlatma oturumunda tmux'u simüle etmek için TMUX ve TMUX_PANE'i ayarlar
  • Prepends the shim directory to PATH so Claude finds the shim before real tmux
  • Enables CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 and sets teammate mode to auto

Shim yalnızca CMUX_CLAUDE_TEAMS_CMUX_BIN ayarlandığında cmux'a yönlendirir; aksi halde bir sonraki gerçek tmux çalıştırılabilirine şeffaf biçimde geçer. Bu nedenle which tmux Claude Teams yakalamasının etkin olup olmadığını göstermez.

#Environment variables

VariablePurpose
TMUXcmux claude-teams komutunu çalıştıran oturum için sentetik tmux soket yolu
TMUX_PANEcmux claude-teams komutunu çalıştıran oturum için sentetik tmux bölme tanımlayıcısı; oluşturulan ajan panellerinde boştur
CMUX_SURFACE_IDGeçerli yüzeyin UUID'si; oluşturulan bir ajan panelinde bu değeri yüzey tanımlayıcısı olarak kullanın
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMSEnables Claude Code agent teams feature
CMUX_SOCKET_PATHPath to the cmux control socket for the shim to connect to

Sentetik TMUX, TMUX_PANE ve ilgili tmux uyumluluk değerleri, oluşturulan panelleri değil cmux claude-teams komutunu çalıştıran oturumu açıklar. Bir ajan panelinden CMUX_SURFACE_ID kullanın ve cmux tree --json çalıştırın; çıktının caller nesnesi çağıran paneli tanımlar.

#Directories

PathPurpose
Sistemin geçici dizini altında yüzey başına dizin (sabit yol yok)Etkin tmux shim'ini içerir ve o yüzey için PATH'in başına eklenir
~/.cmuxterm/tmux-compat-store.jsontmux-compat arabellekleri, kancaları ve bölme yerleşimi/düzeni durumu için kalıcı depolama

Bölme yönlendirme anahtarları şunlardır:

  • lastSplitSurfaceHer çalışma alanı UUID'sini son bölmenin oluşturduğu yüzey UUID'sine eşler. Bir sonraki main-vertical bölmenin nereye yerleşeceğini belirleyen ajan sütunu dayanağını başlatır.
  • mainVerticalLayoutsHer çalışma alanı UUID'sini mainSurfaceId (ana veya lider yüzey) ve lastColumnSurfaceId (ajan sütunundaki en alt yüzey) ile eşler. Sonraki takım arkadaşı bölmeleri bu sütunu hedefler ve aşağı doğru yığılır.

Bir takım arkadaşı paneli mevcut bir yüzeyin yanında bölme olarak değil arkasında sekme olarak göründüğünde bu yönlendirme anahtarlarını inceleyin.

#Supported tmux commands

The shim translates these tmux commands into cmux operations:

  • new-session, new-windowcreates a new cmux workspace
  • split-windowsplits the current cmux pane
  • send-keyssends text to a cmux surface
  • capture-panereads terminal text from a cmux surface
  • select-pane, select-windowfocuses a cmux pane or workspace
  • kill-pane, kill-windowcloses a cmux surface or workspace
  • list-panes, list-windowslists cmux panes or workspaces