Bash

A built-in definition supplied to the request when the tools option was omitted.

Captured description

Executes a bash command and returns its output.

  • Working directory persists between calls, but prefer absolute paths β€” cd in a compound command can trigger a permission prompt. Shell state (env vars, functions) does not persist; the shell is initialized from the user’s profile.
  • IMPORTANT: Avoid using this tool to run cat, head, tail, sed, awk, or echo commands, unless explicitly instructed or after you have verified that a dedicated tool cannot accomplish your task. Instead, use the appropriate dedicated tool as this will provide a much better experience for the user.
  • timeout is in milliseconds: default 120000, max 600000.
  • run_in_background runs the command detached: it keeps running across turns and re-invokes you when it exits. No & needed. Foreground sleep is blocked; use Monitor with an until-loop to wait on a condition.

Git

  • Interactive flags (-i, e.g. git rebase -i, git add -i) are not supported in this environment.
  • Use the gh CLI for GitHub operations (PRs, issues, API).
  • Commit or push only when the user asks. If on the default branch, branch first.
  • End git commit messages with: Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
  • End PR bodies with: πŸ€– Generated with Claude Code

Input schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "command": {
      "description": "The command to execute",
      "type": "string"
    },
    "timeout": {
      "description": "Optional timeout in milliseconds (max 600000)",
      "type": "number"
    },
    "description": {
      "description": "Clear, concise description of what this command does in active voice. Never use words like \"complex\" or \"risk\" in the description - just describe what it does.\n\nFor simple commands (git, npm, standard CLI tools), keep it brief (5-10 words):\n- ls β†’ \"List files in current directory\"\n- git status β†’ \"Show working tree status\"\n- npm install β†’ \"Install package dependencies\"\n\nFor commands that are harder to parse at a glance (piped commands, obscure flags, etc.), add enough context to clarify what it does:\n- find . -name \"*.tmp\" -exec rm {} \\; β†’ \"Find and delete all .tmp files recursively\"\n- git reset --hard origin/main β†’ \"Discard all local changes and match remote main\"\n- curl -s url | jq '.data[]' β†’ \"Fetch JSON from URL and extract data array elements\"",
      "type": "string"
    },
    "run_in_background": {
      "description": "Set to true to run this command in the background.",
      "type": "boolean"
    },
    "dangerouslyDisableSandbox": {
      "description": "Set this to true to dangerously override sandbox mode and run commands without sandboxing.",
      "type": "boolean"
    }
  },
  "required": [
    "command"
  ],
  "additionalProperties": false
}

Independent estimate

~1,034 tokens

The captured tool object was counted against the common baseline. This value supports comparison and is not additive.