bash
Run shell commands inside a devcontainer, returning output and exit codes. Use for builds, tests, and package management.
Instructions
Run a shell command inside the project's devcontainer and return its combined stdout/stderr and exit status.
Mirrors Claude Code's built-in Bash tool, but every command executes inside the devcontainer (via devcontainer exec ... bash -lc) rather than on the host. Use it for builds, tests, package installs and any other shell work that should happen in the container environment.
The command string is interpreted by bash inside the container, so pipes, &&, ||, globs, redirects, env expansion and quoting all behave as in a normal shell.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | The shell command line to execute. It is run with `bash -lc` inside the devcontainer, so pipes, &&, globs, redirects and environment expansion all work. | |
| cwd | No | Working directory inside the container to run the command from. Defaults to the workspace root. | |
| env | No | Extra environment variables to forward into the container, either as an object map {"KEY": "VALUE"} or a list of "KEY=VALUE" strings. Forwarded via repeated --remote-env. | |
| timeout | No | Timeout in milliseconds. Defaults to 120000, capped at 600000. On timeout the process group is killed and the result is flagged as an error. | |
| description | No | Optional human-readable description of what the command does. Logged for observability; not required. | |
| workspaceFolder | No | Host path to the workspace/worktree that holds the .devcontainer config. Defaults to the server's working directory, or $DEVCONTAINER_WORKSPACE_FOLDER when set. |