code-execution-tool changedagents-and-tools/tool-use/code-execution-tool
Nearest release: v2.1.308, published 2 hours after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+7added
Lines−7removed
From line
938
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits23to this page, all time
The whole hunk
from line 938, old and new numbered
/
from line 938
938938
939939### Bash command response
940940
941```json Output
941```text Output
942942{
943943 "type": "server_tool_use",
944944 "id": "srvtoolu_01B3C4D5E6F7G8H9I0J1K2L3",
from line 964
964964
965965**View file:**
966966
967```json Output
967```text Output wrap
968968{
969969 "type": "server_tool_use",
970970 "id": "srvtoolu_01C4D5E6F7G8H9I0J1K2L3M4",
from line 990
990990
991991**Create file:**
992992
993```json Output
993```text Output wrap
994994{
995995 "type": "server_tool_use",
996996 "id": "srvtoolu_01D5E6F7G8H9I0J1K2L3M4N5",
from line 1013
10131013
10141014**Edit file (str\_replace):**
10151015
1016```json Output
1016```text Output wrap
10171017{
10181018 "type": "server_tool_use",
10191019 "id": "srvtoolu_01E6F7G8H9I0J1K2L3M4N5O6",
from line 1060
10601060
10611061**Common errors (all tools):**
10621062
1063```json Output
1063```text Output wrap
10641064{
10651065 "type": "bash_code_execution_tool_result",
10661066 "tool_use_id": "srvtoolu_01VfmxgZ46TiHbmXgy928hQR",
from line 1443
14431443
14441444With [streaming](https://platform.claude.com/docs/en/build-with-claude/streaming) enabled (`"stream": true`), you'll receive code execution events as they occur. The sub-tool input streams as `input_json_delta` events, and each result block arrives whole in a single `content_block_start` event:
14451445
1446```sse
1446```text
14471447event: content_block_start
14481448data: {"type": "content_block_start", "index": 1, "content_block": {"type": "server_tool_use", "id": "srvtoolu_xyz789", "name": "bash_code_execution"}}
14491449
from line 1475
14751475
14761476Code execution usage is tracked in the response:
14771477
1478```json
1478```text wrap
14791479{
14801480 "usage": {
14811481 "input_tokens": 105,
No line in this hunk matches that.