BashCommand
Execute bash commands with support for background tasks, status checks, and text/special key input. Returns command status and current working directory.
Instructions
Execute a bash command. This is stateful (beware with subsequent calls).
Status of the command and the current working directory will always be returned at the end.
The first or the last line might be
(...truncated)if the output is too long.Always run
pwdif you get any file or directory not found error to make sure you're not lost.Do not run bg commands using "&", instead use this tool.
You must not use echo/cat to read/write files, use ReadFiles/FileWriteOrEdit
In order to check status of previous command, use
status_checkwith empty command argument.Only command is allowed to run at a time. You need to wait for any previous command to finish before running a new one.
Programs don't hang easily, so most likely explanation for no output is usually that the program is still running, and you need to check status again.
Do not send Ctrl-c before checking for status till 10 minutes or whatever is appropriate for the program to finish.
Only run long running commands in background. Each background command is run in a new non-reusable shell.
On running a bg command you'll get a bg command id that you should use to get status or interact.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | type of action. | |
| command | No | Set only if type="command" | |
| status_check | No | Set only if type="status_check" | |
| send_text | No | Set only if type="send_text" | |
| send_specials | No | Set only if type="send_specials" | |
| send_ascii | No | Set only if type="send_ascii" | |
| is_background | No | Set only if type="command" and running the command in background | |
| bg_command_id | No | Set only if type!="command" and doing action on a running background command | |
| wait_for_seconds | No | ||
| thread_id | Yes |