# agent: Fix issue with streaming tools when model produces invalid JSON \(\#52891\) · gitcafe/zed

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

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

Visibility: public

Requested revision: e2bba5526aad44206abe1f54db8a593b06ae34d3

Requested commit: e2bba5526aad44206abe1f54db8a593b06ae34d3

Commit: e2bba5526aad44206abe1f54db8a593b06ae34d3

Tree: 47184f8c76ffc6c41664740046eb2ffd7742ba1d

Author: Bennet Bo Fenner

Committer: GitHub

## Message

```
agent: Fix issue with streaming tools when model produces invalid JSON (#52891)

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

- N/A
```

## Parents

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

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