#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.

  • ينشئ shim لـ tmux في دليل shim المؤقت للسطح الحالي. يتضمن المسار UUID الخاص بالسطح ويتغير لكل لوحة وعند كل تشغيل للنظام، لذلك لا يمكن ذكر مسار ثابت
  • يضبط TMUX وTMUX_PANE لمحاكاة tmux في جلسة تشغيل Claude Teams
  • 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 الطلبات إلى cmux فقط عند ضبط CMUX_CLAUDE_TEAMS_CMUX_BIN؛ وإلا فإنها تمررها بشفافية إلى ملف tmux التنفيذي الحقيقي التالي. لذلك لا توضح which tmux ما إذا كان اعتراض Claude Teams نشطًا.

#Environment variables

VariablePurpose
TMUXمسار مقبس tmux اصطناعي للجلسة التي شغّلت cmux claude-teams
TMUX_PANEمعرّف جزء tmux اصطناعي للجلسة التي شغّلت cmux claude-teams؛ يكون فارغًا في لوحات الوكلاء التي تم إنشاؤها
CMUX_SURFACE_IDمعرّف UUID للسطح الحالي؛ استخدمه كمعرّف للسطح داخل لوحة وكيل مُنشأة
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMSEnables Claude Code agent teams feature
CMUX_SOCKET_PATHPath to the cmux control socket for the shim to connect to

تصف القيم الاصطناعية TMUX وTMUX_PANE والقيم المرتبطة بتوافق tmux الجلسة التي شغّلت cmux claude-teams، وليس اللوحات المُنشأة. من داخل لوحة وكيل، استخدم CMUX_SURFACE_ID وشغّل cmux tree --json؛ يحدد كائن caller في المخرجات اللوحة المستدعية.

#Directories

PathPurpose
دليل لكل سطح ضمن الدليل المؤقت للنظام (لا يوجد مسار ثابت)يحتوي على shim النشط لـ tmux ويُضاف إلى بداية PATH لذلك السطح
~/.cmuxterm/tmux-compat-store.jsonتخزين دائم لمخازن tmux-compat المؤقتة والخطافات وحالة موضع/تخطيط الانقسامات

مفاتيح توجيه التقسيم هي:

  • lastSplitSurfaceيربط UUID كل مساحة عمل بـ UUID السطح الذي أنشأه آخر تقسيم. ويهيئ مرساة عمود الوكلاء التي تحدد موضع تقسيم main-vertical التالي.
  • mainVerticalLayoutsيربط UUID كل مساحة عمل بـ mainSurfaceId (السطح الرئيسي أو القائد) وlastColumnSurfaceId (السطح الأدنى في عمود الوكلاء). تستهدف تقسيمات teammate اللاحقة ذلك العمود وتتراكم إلى الأسفل.

افحص مفاتيح التوجيه هذه عندما تظهر لوحة teammate كعلامة تبويب خلف سطح موجود بدلًا من ظهورها كتقسيم بجانبه.

#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