Agent Teams: Add zellij terminal multiplexer support for split-pane mode

Status Open
Maintainer reply None cached
Activity 11 comments · opened Feb 8, 2026

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 (like tmux 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.

View original on GitHub ↗

11 Comments

github-actions[bot] · 6 months ago

Found 1 possible duplicate issue:

  1. https://github.com/anthropics/claude-code/issues/23574

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

kmelkon · 6 months ago

Not a duplicate — #23574 is about WezTerm support, this is about Zellij support. Different terminal multiplexers with different CLIs and APIs.

junebash · 6 months ago

I would think that zellij should take priority over tmux in auto mode, given tmux often comes preinstalled, but with zellij, you have to go out of your way to use it.

But otherwise, yes please!

suren-atoyan · 6 months ago

+1 to zellij support; I was very surprised when I figured out that it's not supported yet

@kmelkon thanks for the detailed integration guide. I hope it helps speed up the process

stanislc · 6 months ago

I built a working shim for this: zellij-claude-teams

It's a fake tmux binary that intercepts Claude Code's tmux calls and routes them through zellij action. Agent teammates spawn as real zellij panes. Tested on Claude Code 2.1.63, works on macOS and Linux.

A few things I ran into that would be relevant for native integration:

  • Environment inheritance works differently than tmux. In tmux, child panes inherit the parent's full environment. In zellij, new-pane starts clean — so env vars like CLAUDECODE, CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS, etc. are lost. The shim snapshots the parent environment to a file and restores it in each new pane.
  • No way to target a specific pane with write-chars. It only works on the currently focused pane — there's no --pane-id flag. So tmux send-keys -t %3 "command" can't be translated directly. The shim uses a named pipe (FIFO) per pane instead: the pane process waits on its pipe, and send-keys writes the command there. This avoids any focus dependency.
  • new-pane always steals focus. There's no --no-focus flag in zellij. The shim works around this by immediately running move-focus in the opposite direction to return focus to the original pane.
  • The actual surface area is small. Claude Code calls ~20 different tmux subcommands, but only 5 do real work (split-window, send-keys, kill-pane, display-message, has-session). The rest — things like select-layout, resize-pane, set-option, break-pane — can safely return exit 0 without doing anything, since zellij handles layout automatically.

Feel free to use the repo for inspiration or as a temporary workaround.

vimkim · 5 months ago

zellij is the best terminal multiplexer! (I'm a heavy tmux user for 8+ years and zellij user for 2+ years. I never regret). Please support zellij.

kimba74 · 5 months ago

Yes, please! Native Zellij support would be fantastic.

+1

junaed-moloco · 5 months ago

+1

NightXlt · 4 months ago

+1, Native Zellij support would be amazing.

zhangxd1989 · 4 months ago

+1

ojhermann · 1 month ago

+1 as another zellij user. The conceptual lift looks small: zellij action new-pane -- <cmd> maps almost one-to-one onto what the tmux driver already does with split-window, and zellij detection is a single env-var check ($ZELLIJ) exactly like $TMUX. So this reads more like adding a third pane-spawn driver alongside the existing tmux/iTerm2 ones than a from-scratch integration — in line with the implementation guide above.