# agent: Pull diagnostics \(\#56663\) · gitcafe/zed

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

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

Visibility: public

Requested revision: e82c04b356468416c40f38d5909123e3af596f93

Requested commit: e82c04b356468416c40f38d5909123e3af596f93

Commit: e82c04b356468416c40f38d5909123e3af596f93

Tree: c4a1cd40582efd12fda45d8c444d79c8d862fd1d

Author: Cameron Mcloughlin

Committer: GitHub

## Message

```
agent: Pull diagnostics (#56663)

Currently, the `diagnostics` tool queries the current state of the
workspace. However, if the LSP is slow to update diagnostics, this can
lead to stale diagnostics being given to the agent.

This PR changes the `diagnostics` tool to attempt to pull fresh
diagnostics. If it fails, it informs the agent and falls back to the old
behaviour (not all LSPs support pull-based diagnostics).

Release Notes:

- N/A or Added/Fixed/Improved ...
```

## Parents

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

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