Follow Discord
Sweep 31 Oct 2026 · 01:10Z Build v2.1.316 534 read Stable v2.1.309 Latest v2.1.316 Next v2.1.316 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

bash-tool changedagents-and-tools/tool-use/bash-tool

Recorded here
Lines+57added
Lines−4removed
From line 2 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits15to this page, all time

## Availability ### API support #### [Messages API](https://platform.claude.com/docs/en/build-with-claude/working-with-messages) ### Data handling

The whole hunk

from line 2, old and new numbered
/
lines
from line 2
22title: Bash tool
33url: https://platform.claude.com/docs/en/agents-and-tools/tool-use/bash-tool
44description: Let Claude request shell commands that your application runs in a persistent bash session and returns as tool results.
5featureMetadata:
6 status: ga
7 zdr:
8 eligibility: eligible
9 note: Excludes [Covered Models](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements). Client-side tool run in your environment.
10 supportedModels:
11 - claude-fable-5-1
12 - claude-mythos-5-1
13 - claude-fable-5
14 - claude-mythos-5
15 - claude-mythos-preview
16 - claude-opus-5-5
17 - claude-opus-5
18 - claude-sonnet-5-5
19 - claude-sonnet-5
20 - claude-haiku-5-5
21 - claude-haiku-4-5-20251001
22 - claude-opus-4-8
23 - claude-opus-4-7
24 - claude-opus-4-6
25 - claude-sonnet-4-6
26 - claude-opus-4-5-20251101
27 - claude-sonnet-4-5-20250929
28 supportedPlatforms:
29 Claude API: ga
30 Claude Platform on AWS: ga
31 Amazon Bedrock: ga
32 Amazon Bedrock (InvokeModel): ga
33 Claude Models on Google Cloud (Google managed): ga
34 Microsoft Foundry: ga
535---
636 
7<Note>
8 To learn how zero data retention (ZDR) applies to this feature, see [API and data retention](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention).
9</Note>
10 
1137The bash tool is a [client tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/how-tool-use-works): Claude doesn’t run commands itself. When you include the tool in a request, Claude replies with a `tool_use` block that names the command to run. Your application runs that command in a bash session it owns and returns the output in a `tool_result` block.
1238 
1339Your application keeps one bash process alive across tool calls, so state persists between commands. The working directory, environment variables, and any files a command creates are still there for the next command.
from line 2000
19742000 Connect Claude to external tools and APIs. See where tools run, when Claude calls them, and which tool fits your task.
19752001 </Card>
19762002</CardGroup>
2003 
2004## Availability
2005 
2006Bash tool is available on every model and eligible for zero data retention and HIPAA readiness.
2007 
2008### API support
2009 
2010#### [Messages API](https://platform.claude.com/docs/en/build-with-claude/working-with-messages)
2011 
2012* Availability: Available
2013 
2014| Status | Cloud platforms |
2015| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2016| Available | Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Amazon Bedrock (InvokeModel)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) |
2017 
2018### Data handling
2019 
2020[Data handling overview](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#feature-eligibility)
2021 
2022| Item | Zero data retention | HIPAA |
2023| ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
2024| Status | Eligible (excludes [Covered Models](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements)) | Eligible |
2025| Details | Client-side tool run in your environment. | — |
2026 
2027Applicable endpoints:
2028 
2029* `/v1/messages` with `bash` tool
19772030 
Feedback