Skip to content

wezterm-pane-control

Control WezTerm panes from natural language. Say “split a new tallow session to the right” or “close this panel when you’re done” and the LLM translates to wezterm cli calls.

Looking for the full picture? The WezTerm Integration guide covers this extension plus turn status signaling, tab bar indicators, and WezTerm Lua configuration.

Registers a single compound wezterm_pane tool with an action discriminator. Only active when WEZTERM_PANE is set — in any other terminal, the extension is a silent no-op.

ActionWhat it does
listList panes in the current tab with IDs, titles, sizes
splitSplit current pane (left/right/top/bottom), optionally run a command
closeKill a pane by ID (defaults to current pane)
focusActivate a pane by ID or direction
zoomToggle/set zoom state
resizeAdjust pane size directionally
send_textPaste text into a target pane
read_textGet visible text from a pane
spawn_tabOpen a new tab with optional command
move_to_tabDetach a pane into its own tab

The extension checks process.env.WEZTERM_PANE at load time. If the variable is absent, no tool is registered and no system prompt context is injected. Zero overhead outside WezTerm.

When active, a small context block (~50 tokens) is appended via before_agent_start:

# WezTerm Pane Control
You are running in WezTerm pane 42. Use the wezterm_pane tool
to manage panes: split, close, focus, zoom, resize, send/read
text, or spawn new tabs. Use action "list" to see all panes in
the current tab.

Splitting with a command spawns it in the new pane:

"split a new tallow session to the right"
→ wezterm cli split-pane --right -- tallow
"open a bottom panel at 30% with haiku"
→ wezterm cli split-pane --bottom --percent 30 -- tallow --model claude-haiku-4-20250414

Closing the current pane terminates the tallow process. This is intentional for requests like “when you’re done, close this panel”. The tool logs a warning before executing: Closing current pane (pane $ID). This will terminate this session.

Subagents run in the same pane as isolated contexts. Use wezterm_pane with split + command: ["tallow"] to spawn a visually separate tallow instance in an adjacent pane instead.

Background tasks run shell commands in the same process. send_text can paste commands into other panes for work that should run in a separate terminal context.