# agent: Re-add workaround for language model behavior with empty tool result \(\#37196\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 1c2e2a00fe87d8a9820d5d23f4828482f94c57f9

Requested commit: 1c2e2a00fe87d8a9820d5d23f4828482f94c57f9

Commit: 1c2e2a00fe87d8a9820d5d23f4828482f94c57f9

Tree: 3ee9edaa3b02ce87092fc90991f305d63bf01f29

Author: Cole Miller

Committer: GitHub

## Message

```
agent: Re-add workaround for language model behavior with empty tool result (#37196)

This is just copying over the same workaround here:


https://github.com/zed-industries/zed/blob/a790e514af4d6957aa1a14cc8190b2ff24a0484c/crates/agent/src/thread.rs#L1455-L1459

Into the agent2 code.

Release Notes:

- agent: Fixed an issue where some tool calls in the Zed agent could
return an error like "`tool_use` ids were found without `tool_result`
blocks immediately after"
```

## Parents

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

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