Overview
hcom can spawn AI agents in new terminal windows, tabs, or splits depending on your terminal emulator. Supported terminals include kitty, wezterm, tmux, and platform defaults. Terminals with managed mode support both opening new windows/tabs/splits and automatically closing them when you runhcom kill.
Supported Terminals
Fully Managed (Open + Close)
kitty - Smart auto-detection:kitty-window- New windowkitty-tab- New tab (requires remote control)kitty-split- Split current window (requires remote control)kitty- Auto-selects: split if inside kitty, tab if socket available, window otherwise
wezterm-window- New windowwezterm-tab- New tab (requires mux server)wezterm-split- Split current pane (requires mux server)wezterm- Auto-selects: split if inside wezterm, tab if mux reachable, window otherwise
tmux-split- Split current panetmux- Creates detached background sessions
Open Only
These terminals open new windows but cannot automatically close onhcom kill:
Terminal.app(macOS)iTerm(macOS)Ghosttyalacrittyttab(macOS tab helper)wttab(Windows Terminal tab helper)gnome-terminal(Linux)konsole(Linux)xterm(Linux)tilix(Linux)terminator(Linux)Windows Terminalmintty(Windows/Cygwin)
Setting Your Terminal
Quick Setup
Platform Defaults
- macOS:
Terminal.app - Linux: First available of
gnome-terminal,konsole,xterm - WSL: Windows Terminal (
wt.exe) if available - Termux: Android intent system
Kitty Configuration
Kitty tabs and splits require remote control to be enabled.Enable Remote Control
Add to~/.config/kitty/kitty.conf:
Verify Remote Control
Auto-Detection
When you setterminal to kitty, hcom automatically detects the best mode:
- Inside kitty window → uses
kitty-split - Remote control available → uses
kitty-tab - Otherwise → falls back to
kitty-window
WezTerm Configuration
WezTerm tabs and splits require the mux server to be running.Start Mux Server
The mux server usually starts automatically, but you can verify:Auto-Detection
When you setterminal to wezterm, hcom automatically detects:
- Inside wezterm pane → uses
wezterm-split - Mux server reachable → uses
wezterm-tab - Otherwise → falls back to
wezterm-window
Custom Terminal Commands
You can use any terminal emulator by providing a custom command template:Available Placeholders
{script}- Path to the launch script (required){process_id}- hcom process ID{pid}- System process ID
Custom Terminal Presets
Define reusable terminal presets in~/.hcom/config.toml with both open and close commands:
Preset Fields
open- Command to launch (must include{script})close- Command to close the terminal (optional)binary- Binary name for PATH detection (optional)pane_id_env- Environment variable containing pane/tab ID (optional)app_name- macOS app bundle name (optional, for .app fallback)
Close Command Placeholders
{id}- Captured stdout fromopencommand{pid}- Process ID{pane_id}- Value frompane_id_envvariable{process_id}- hcom process ID
Example: Alacritty with tmux
Using Custom Presets
macOS App Bundle Fallback
On macOS, if a terminal’s CLI binary isn’t in PATH but the.app bundle exists, hcom automatically uses the app bundle:
Troubleshooting
”Terminal launch failed”
Check if binary is in PATH:Kitty Remote Control Not Working
Verify socket exists:Permission Denied
Make sure launch scripts are executable:Terminal Opens But Agent Doesn’t Start
Check PATH in split/tab environments: Kitty splits and wezterm tabs may have minimal PATH. hcom automatically adds common binary locations, but you can verify:Debug Mode
Print the launch script without executing:Environment Variables
Best Practices
- Use managed terminals (kitty, wezterm, tmux) for the best experience
- Enable remote control for kitty/wezterm to get tab/split support
- Test custom commands with
--terminal printbefore committing - Avoid shell injection - never use backticks,
$(), or pipes in custom commands - Use absolute paths if your terminal binary isn’t in PATH