Key Features
- Persistent Sessions: State maintained between commands
- Multiple Sessions: Run concurrent terminal sessions
- Long-Running Commands: Support for background processes
- Interactive Process Support: Send input to running processes
- Special Key Support: Full control sequences (Ctrl+C, arrow keys, etc.)
- Working Directory Tracking: Automatic tracking of current directory
Parameters
The bash command to execute. Can be empty to check output of running commands (will wait for timeout period to collect output).Supported special keys and sequences (based on tmux key names):
- Control sequences: C-c, C-d, C-z, C-a, C-e, C-k, C-l, C-u, C-w, etc.
- Navigation keys: Up, Down, Left, Right, Home, End
- Page keys: PageUp, PageDown, PgUp, PgDn
- Function keys: F1-F12
- Special keys: Enter, Escape, Space, Tab, BTab, BSpace, DC, IC
- Meta/Alt sequences: M-key (e.g., M-f, M-b)
- Shift sequences: S-key (e.g., S-F6, S-Tab)
If true, the command is sent as input to a currently running process. If false, the command is executed as a new bash command.Note: Special keys (C-c, C-d, etc.) automatically work when a process is running - you don’t need to set is_input=true for them. Use is_input=true for regular text input to running processes.
Optional timeout in seconds for command execution. CAPPED AT 60 SECONDS. If not provided, uses default wait (30s). On timeout, the command keeps running and the tool returns with status ‘running’.
Identifier for the terminal session. Use different IDs to manage multiple concurrent terminal sessions.
If true, don’t automatically add Enter/newline after the command. Useful for:
- Interactive prompts where you want to send keys without submitting
- Navigation keys in full-screen applications
- Multi-step commands
Response
Command output
Exit code of the command (only for completed commands)
The executed command
The terminal session ID
Command status: ‘completed’ or ‘running’
Current working directory after command execution
Examples
Basic Commands
Long-Running Commands
Interactive Processes
Multiple Terminal Sessions
Vim Navigation
Important Notes
Timeout Behavior: Commands are NEVER killed on timeout - they keep running in background. Timeout only controls how long to wait before returning current output.
Best Practices
- Persistent Session: Environment variables, current directory, and running processes persist between commands
-
Long-Running Commands:
- Commands never get killed automatically
- Set timeout to control how long to wait for output
- For daemons/servers, append ’&’ to run in background
- Use empty command "" to check progress
- Multiple Terminals: Use different terminal_id values to run multiple concurrent sessions
-
Interactive Processes:
- Special keys (C-c, C-d, etc.) work automatically when a process is running
- Use is_input=true for regular text input to running processes
- Use no_enter=true for Vim navigation, password typing, or multi-step commands
- Output Handling: Large outputs are automatically truncated. The tool provides the most relevant parts of the output for analysis.
Special Keys Reference
Common tmux key names:- BSpace (not Backspace)
- DC (not Delete)
- IC (not Insert)
- Escape (not Esc)
- Enter (not Return)
- Space (not Spacebar)