[Feature Request] Add Ghostty as a split-pane backend for agent teams (teammateMode)
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Ghostty users cannot use split-pane mode for agent teams. The current teammateMode setting only supports tmux and iTerm2 as backends. Ghostty is a fast, GPU-accelerated, cross-platform terminal emulator with a growing user base — yet Ghostty users are forced to either:
- Run tmux inside Ghostty (redundant overhead for a terminal that already has native splits)
- Use in-process mode (no visual split panes)
Proposed Solution
Add a Ghostty backend for teammateMode that spawns teammates in native Ghostty split panes.
Ghostty's split capabilities
Ghostty already has split-pane actions internally:
| Action | Description |
|--------|-------------|
| new_split:right / new_split:down | Create a new split in the specified direction |
| goto_split:right / goto_split:previous | Focus an adjacent split by direction or creation order |
| resize_split:up,10 | Resize a split |
| toggle_split_zoom | Zoom a split to fill the tab |
| equalize_splits | Equalize all split sizes |
Current blocker: programmatic API
Ghostty's keybinding actions exist but there is no stable CLI/IPC mechanism to invoke them programmatically yet. The Ghostty team is actively working on platform-specific IPC approaches:
- macOS: AppleScript / App Intents framework (in development)
- Linux: D-Bus integration (planned)
- Tracking discussion: ghostty-org/ghostty#2353
Suggested implementation approach
Once Ghostty exposes a programmatic API, integration would follow the same pattern as tmux/iTerm2:
| Operation | tmux | Ghostty (anticipated) |
|-----------|------|-----------------------|
| Split pane | tmux split-window -h -- cmd | AppleScript / D-Bus new_split:right + run command |
| Focus pane | tmux select-pane -t N | goto_split:next or pane ID targeting |
| Detection | $TMUX env var | $TERM_PROGRAM=ghostty (already set) |
Detection is straightforward — Ghostty sets TERM_PROGRAM=ghostty in the environment.
Phased approach
- Phase 1 (now): Track this as a known request; monitor Ghostty's IPC API progress
- Phase 2 (when Ghostty ships CLI/IPC): Implement the Ghostty backend for
teammateMode - Phase 3: Update
"auto"detection priority:iTerm2 > tmux > ghostty > in-process
Alternative Solutions
- Running tmux inside Ghostty works but adds unnecessary complexity for users who chose Ghostty specifically to avoid tmux
- In-process mode works but loses the multi-pane visibility that makes agent teams compelling
Priority
Medium - Significant impact on productivity
Feature Category
CLI commands and flags
Additional Context
Related issues:
- #23574 — WezTerm split-pane backend (same motivation, different terminal)
- #24122 — Zellij split-pane support
- #23572 — tmux/iTerm2 silent fallback bug
Ghostty references:
- Ghostty homepage: https://ghostty.org/
- Split keybind actions: https://ghostty.org/docs/config/keybind/reference
- Scripting API discussion: https://github.com/ghostty-org/ghostty/discussions/2353
- GitHub: https://github.com/ghostty-org/ghostty (50k+ stars)
Environment:
- Claude Code version: latest
- OS: macOS (Darwin 25.2.0, arm64)
- Terminal: Ghostty
17 Comments
Found 2 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Yes, would love to have this
"Running tmux inside Ghostty works" wait it does? I can't use the panes properly.
second this, big reason I moved from iterm2 to ghostty was claudes early terminal setup support. Not a tmux user, tried it out with agent teams in ghostty and wound up with claude party x 7.
Now that AppleScript is supported in Ghostty), can we leverage it for this feature?
Maybe not yet:
``
We're treating this as a preview feature in 1.3. The AppleScript functionality didn't get as much time as other features to test in our pre-release builds, so we expect we'll make breaking API changes and add significant new features in 1.4 based on user feedback.``The blocker mentioned in this issue is now resolved — Ghostty v1.3.0 shipped full AppleScript support on macOS.
Here's the concrete API mapping for a
GhosttyBackend, mirroring the existingITermBackend:| ITermBackend (it2 CLI) | GhosttyBackend (AppleScript via osascript) |
|---|---|
|
it2 session split -v|split terminal direction right with configuration cfg||
it2 session split -s <id>|split terminal direction down with configuration cfg|| Send command via CLI |
input text "cmd" to terminal+send key "enter"|| Parse session ID from output |
get id of terminal|| Kill pane |
close terminal|Detection:
TERM_PROGRAM=ghosttyenv var. AppleScript is enabled by default (macos-applescript = true).See also #35351 for additional context.
@eliyastein Fair point about the preview status, but I don't think it should block this. A few reasons:
split,input text,send key,get id,close. These are fundamental operations unlikely to be removed, even if the syntax shifts.ITermBackendwent through similar evolution with theit2CLI. When APIs change, you update the backend. The abstraction layer (PaneBackendinterface) isolates the rest of Claude Code from those details.Worth starting the implementation now and adapting if 1.4 changes things.
This impacts
cmuxas well which is increasingly our org's preferred terminal, because it is based onghostty.I built gx-ghostty for this — programmatic Ghostty control via AppleScript + Accessibility API. Send text, read scrollback, split/spawn/close terminals, all with UUID-based addressing. No tmux, no clipboard, no focus stealing.
Includes an
it2shim that makes Claude Code'sTeamCreatework with Ghostty split panes. macOS + Ghostty 1.3+, single Swift file.Install instructions at the top of the README. Point your Claude at the repo and it can set itself up.
Bump
Related: #26572 proposes a CustomPaneBackend protocol that would unblock Ghostty (and WezTerm, Zellij) by decoupling agent teams from the tmux CLI entirely. I've posted field evidence there from a working 8-agent setup that uses tmux only as a viewport.
Lil bump
Bump
Bump
Bump
Bump! Waiting