Skip to content

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

Merged
JosephTLyons merged 2 commits intomainfrom
sync-agent-history-between-window-instances
Jan 28, 2026
Merged

Improve Zed agent thread history to update across all open windows#47803
JosephTLyons merged 2 commits intomainfrom
sync-agent-history-between-window-instances

Conversation

@JosephTLyons
Copy link
Collaborator

@JosephTLyons JosephTLyons commented Jan 27, 2026

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

Previously, each AgentPanel created its own ThreadStore instance, so thread
history wouldn't sync between 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. Third-party agents (Claude Code,
Gemini, Codex, etc.) manage their own thread storage externally via ACP.
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 27, 2026
@JosephTLyons JosephTLyons changed the title Share ThreadStore globally across all windows Improve Zed agent thread history to update across all open windows Jan 27, 2026
@JosephTLyons JosephTLyons marked this pull request as ready for review January 28, 2026 19:01
@JosephTLyons JosephTLyons merged commit 081bb23 into main Jan 28, 2026
29 checks passed
@JosephTLyons JosephTLyons deleted the sync-agent-history-between-window-instances branch January 28, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant