Agent Teams: Add zellij terminal multiplexer support for split-pane mode
Feature Request
Agent Teams currently supports split-pane mode for tmux and iTerm2, automatically opening each teammate in its own pane. Zellij — a modern terminal multiplexer growing in popularity — has no integration, forcing users to fall back to in-process mode.
Why
Zellij is increasingly adopted as a tmux alternative due to its discoverability, sane defaults, and native floating panes. Users running Claude Code inside zellij should get the same split-pane experience as tmux users.
Implementation Guide
Zellij exposes everything needed via zellij action CLI commands, analogous to how tmux uses tmux split-window / tmux send-keys.
Detection
Zellij sets environment variables when running inside a session:
ZELLIJ=0 # Present when inside zellij
ZELLIJ_SESSION_NAME=work # Current session name
ZELLIJ_PANE_ID=3 # Current pane ID
Detection is simply: process.env.ZELLIJ !== undefined
This mirrors the existing tmux detection (TMUX env var).
Spawning a teammate pane
# Split right with a command, named after the agent
zellij action new-pane \
--direction right \
--name "researcher" \
-- claude --teammate-mode in-process ...
# Or split down
zellij action new-pane \
--direction down \
--name "implementer" \
-- claude ...
Key flags:
--direction right|down— controls split direction (liketmux split-window -h/-v)--name <NAME>— labels the pane (visible in zellij UI, no need for a separate rename step)--close-on-exit— auto-close pane when agent finishes (optional)--cwd <DIR>— set working directory-- <COMMAND>...— the command to run in the new pane
Alternative: new tab per agent
zellij action new-tab --name "researcher"
# Then the command runs in that tab
Alternative: floating panes (unique to zellij)
zellij action new-pane \
--floating \
--name "researcher" \
--width 50% --height 50% \
-- claude ...
This has no tmux equivalent and could be a zellij-specific bonus feature.
Writing to a pane
zellij action write-chars "some input" # Types into the focused pane
Mapping to existing tmux integration
| tmux command | zellij equivalent |
|---|---|
| tmux split-window -h cmd | zellij action new-pane -d right -- cmd |
| tmux split-window -v cmd | zellij action new-pane -d down -- cmd |
| tmux send-keys "text" Enter | zellij action write-chars "text\n" |
| tmux select-pane -t N | zellij action focus-next-pane (or move-focus) |
| tmux rename-window "name" | --name flag on new-pane / new-tab |
| $TMUX detection | $ZELLIJ detection |
teammateMode setting
Add "zellij" as a valid value alongside "tmux", and update "auto" to detect $ZELLIJ:
auto priority: iTerm2 > tmux > zellij > in-process
Current workaround
claude --teammate-mode in-process
Works but loses the multi-pane visibility that makes the teams feature compelling.
This issue has 11 comments on GitHub. Read the full discussion on GitHub ↗