Follow Discord
Sweep 27 Oct 2026 · 19:04Z Build v2.1.312 531 read Stable v2.1.308 Latest v2.1.312 Next v2.1.312 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

text-editor-tool changedagents-and-tools/tool-use/text-editor-tool

Nearest release: v2.1.310, published 11 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+8added
Lines−8removed
From line 274 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits12to this page, all time

The whole hunk

from line 274, old and new numbered
/
lines
from line 274
274274<Accordion title="Example view commands">
275275 Example for viewing a file:
276276 
277 ```text wrap
277 ```json
278278 {
279279 "type": "tool_use",
280280 "id": "toolu_01A09q90qw90lq917835lq9",
from line 288
288288 
289289 Example for viewing a directory:
290290 
291 ```text wrap
291 ```json
292292 {
293293 "type": "tool_use",
294294 "id": "toolu_02B19r91rw91mr917835mr9",
from line 313
313313* `new_str`: The new text to insert in place of the old text
314314 
315315<Accordion title="Example str_replace command">
316 ```text wrap
316 ```json
317317 {
318318 "type": "tool_use",
319319 "id": "toolu_01A09q90qw90lq917835lq9",
from line 339
339339* `file_text`: The content to write to the new file
340340 
341341<Accordion title="Example create command">
342 ```text
342 ```json
343343 {
344344 "type": "tool_use",
345345 "id": "toolu_01A09q90qw90lq917835lq9",
from line 365
365365* `insert_text`: The text to insert
366366 
367367<Accordion title="Example insert command">
368 ```text
368 ```json
369369 {
370370 "type": "tool_use",
371371 "id": "toolu_01A09q90qw90lq917835lq9",
from line 560
560560 
561561Claude uses the text editor tool first to view the file:
562562 
563```text Output
563```json Output
564564{
565565 "id": "msg_01XAbCDeFgHiJkLmNoPQrStU",
566566 "model": "claude-opus-5-5",
from line 1021
10211021 
10221022Claude identifies the syntax error and uses the `str_replace` command to fix it:
10231023 
1024```text Output
1024```json Output
10251025{
10261026 "id": "msg_01VwXyZAbCdEfGhIjKlMnO",
10271027 "model": "claude-opus-5-5",
from line 1461
14611461 
14621462Finally, Claude provides a complete explanation of the fix:
14631463 
1464````text Output
1464````json Output
14651465{
14661466 "id": "msg_01IjKlMnOpQrStUvWxYzAb",
14671467 "model": "claude-opus-5-5",
Feedback