Execute a ${SHELL} command. Use this tool to explore the filesystem, run Windows scripts, collect system information, install packages, etc., whenever the agent is running on Windows.

Note that you are running on Windows, so make sure to use Windows commands, paths, and conventions.

**IMPORTANT - When to use other tools instead:**
- **For editing text files**: ALWAYS use `StrReplaceFile` tool instead of shell commands like `(Get-Content ... | ForEach-Object ...)`, or text redirection. The `StrReplaceFile` tool is more reliable, cross-platform, and shows diffs for approval.
- **For writing new files**: Use `WriteFile` tool instead of shell redirection (`>`, `>>`, `Out-File`).
- **For reading file contents**: Use `ReadFile` tool instead of `type` or `Get-Content`.
- **For searching within files**: Use `Grep` tool instead of `findstr` or `Select-String` commands.

**Output:**
The stdout and stderr streams are combined and returned as a single string. Extremely long output may be truncated. When a command fails, the exit code is provided in a system tag.

**Guidelines for safety and security:**
- Every tool call starts a fresh ${SHELL} session. Environment variables, `cd` changes, and command history do not persist between calls.
- Do not launch interactive programs or anything that is expected to block indefinitely; ensure each command finishes promptly. Provide a `timeout` argument for potentially long runs.
- Avoid using `..` to leave the working directory, and never touch files outside that directory unless explicitly instructed.
- Never attempt commands that require elevated (Administrator) privileges unless explicitly authorized.

**Guidelines for efficiency:**
- Chain related commands with `;` and use `if ($?)` or `if (-not $?)` to conditionally execute commands based on the success or failure of previous ones.
- Redirect or pipe output with `>`, `>>`, `|`, and leverage `for /f`, `if`, and `set` to build richer one-liners instead of multiple tool calls.
- Reuse built-in utilities (e.g., `findstr`, `where`) to filter, transform, or locate data in a single invocation.

**Commands available:**
- Shell environment: `cd`, `dir`, `set`, `setlocal`, `echo`, `call`, `where`
- File operations: `type` (use ReadFile tool instead), `copy`, `move`, `del`, `erase`, `mkdir`, `rmdir`, `attrib`, `mklink`
- Text/search: `find`, `findstr` (use Grep tool instead), `more`, `sort`, `Get-Content` (do NOT use shell commands for editing - use StrReplaceFile tool)
- System info: `ver`, `systeminfo`, `tasklist`, `wmic`, `hostname`
- Package management: `pip`, `npm`, `choco`, `winget`, etc.
- Build/run commands: `msbuild`, `dotnet`, `npm run`, `python`, `node`, etc.
- Archives/scripts: `tar`, `Compress-Archive`, `powershell`, `python`, `node`
- Other: Any other binaries available on the system PATH; run `where <command>` first if unsure.
