# agent: Fix an issue with messages containing trailing whitespace \(\#33643\) · gitcafe/zed

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

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

Visibility: public

Requested revision: ca0bd53bede259c78f78bd4f0ab10303ea3c8b0b

Requested commit: ca0bd53bede259c78f78bd4f0ab10303ea3c8b0b

Commit: ca0bd53bede259c78f78bd4f0ab10303ea3c8b0b

Tree: 9ffb988242a053f241df8aedd67fcbbd7f7366c8

Author: Bennet Bo Fenner

Committer: GitHub

## Message

```
agent: Fix an issue with messages containing trailing whitespace (#33643)

Seeing this come up in our server logs when sending requests to
Anthropic: `final assistant content cannot end with trailing
whitespace`.


Release Notes:

- agent: Fixed an issue where Anthropic requests would sometimes fail
because of malformed assistant messages
```

## Parents

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

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