bash
Execute shell commands with persistent sessions. Sessions maintain working directory, environment variables, and state across calls. Use session_id for multiple independent sessions.
Instructions
Execute shell commands with persistent session support. Sessions maintain working directory, environment variables, and shell state across calls. Use session_id to manage multiple independent shell sessions. Use disconnect=true to close a session. Platform: bash/sh on Unix, PowerShell/git-bash/cmd on Windows (auto-detected, best available).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | Shell command to execute | |
| cwd | No | Initial working directory (only used when creating a new session) | |
| session_id | No | Session identifier for persistent shell. Default: default | |
| timeout_sec | No | Command timeout in seconds (default 120, max 600) | |
| disconnect | No | Close the shell session: true or false. Default: false |