# Improve Zed agent thread history to update across all open windows \(\#47803\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 081bb237f432a02bcfb24a2b6a5ba2d81fdcee82

Requested commit: 081bb237f432a02bcfb24a2b6a5ba2d81fdcee82

Commit: 081bb237f432a02bcfb24a2b6a5ba2d81fdcee82

Tree: 8acc1cde368e16d1110a7bc2f89b881c203306b5

Author: Joseph T\. Lyons

Committer: GitHub

## Message

```
Improve Zed agent thread history to update across all open windows (#47803)

Previously, each Agent panel created its own `ThreadStore` instance, so
thread history updates wouldn't sync between open windows. Users had to
close and reopen windows to see threads created in other windows.

Now `ThreadStore` is initialized once as a global and shared across all
windows. When any window saves a thread, ThreadStore::reload() calls
cx.notify(), which notifies all NativeAgentSessionList observers,
causing all windows' history views to refresh.

Note: This only works for the native Zed agent. It also is only
improving the history view (thread titles)—this PR does not sync edits
between multiple windows when the same thread is open in each.

Release Notes:

- Improved Zed agent thread history to update across all open windows
```

## Parents

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

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