# Fix Sonnet's regression with inserting \`\</parameter\>\</invoke\>\` \(\#41800\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/3a058138c1e4b7e18e9282588d0a898b64f4a12b)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 3a058138c1e4b7e18e9282588d0a898b64f4a12b

Requested commit: 3a058138c1e4b7e18e9282588d0a898b64f4a12b

Commit: 3a058138c1e4b7e18e9282588d0a898b64f4a12b

Tree: 9d740b62e09c5c1c82908c956b10086facc368ee

Author: Oleksiy Syvokon

Committer: GitHub

## Message

```
Fix Sonnet's regression with inserting `</parameter></invoke>` (#41800)

Sometimes, inside the edit agent, Sonnet thinks that it's doing a tool
call and closes its response with `</parameter></invoke>` instead of
properly closing </new_text>.

A better but more labor-intensive way of fixing this would be switching
to streaming tool calls for LLMs that support it.

Closes #39921

Release Notes:

- Fixed Sonnet's regression with inserting `</parameter></invoke>`
sometimes
```

## Parents

- [f2b539598e369dc166c69dcb3fc13628af7903ca](https://git.cafe/gitcafe/zed/commit/f2b539598e369dc166c69dcb3fc13628af7903ca?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/3a058138c1e4b7e18e9282588d0a898b64f4a12b?format=markdown)
