#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 sonnetAll 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
| Variable | Purpose |
|---|---|
TMUX | مسار مقبس tmux اصطناعي للجلسة التي شغّلت cmux claude-teams |
TMUX_PANE | معرّف جزء tmux اصطناعي للجلسة التي شغّلت cmux claude-teams؛ يكون فارغًا في لوحات الوكلاء التي تم إنشاؤها |
CMUX_SURFACE_ID | معرّف UUID للسطح الحالي؛ استخدمه كمعرّف للسطح داخل لوحة وكيل مُنشأة |
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS | Enables Claude Code agent teams feature |
CMUX_SOCKET_PATH | Path 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
| Path | Purpose |
|---|---|
| دليل لكل سطح ضمن الدليل المؤقت للنظام (لا يوجد مسار ثابت) | يحتوي على 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-window→ creates a new cmux workspacesplit-window→ splits the current cmux panesend-keys→ sends text to a cmux surfacecapture-pane→ reads terminal text from a cmux surfaceselect-pane,select-window→ focuses a cmux pane or workspacekill-pane,kill-window→ closes a cmux surface or workspacelist-panes,list-windows→ lists cmux panes or workspaces