Skip to content

agent: Fix race-condition for LSP tool registration - #56044

Merged
bennetbo merged 2 commits into
mainfrom
fix-lsp-tool-feature-flag-race
May 7, 2026
Merged

agent: Fix race-condition for LSP tool registration#56044
bennetbo merged 2 commits into
mainfrom
fix-lsp-tool-feature-flag-race

Conversation

@bennetbo

@bennetbo bennetbo commented May 7, 2026

Copy link
Copy Markdown
Member

This fixes a race condition where the thread would not get the LSP tools at startup if the feature flag was not resolved yet.
We now always add the tools, but filter them out when we start a new turn if the feature flag is not set.

Release Notes:

  • N/A

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label May 7, 2026
@bennetbo
bennetbo requested a review from cameron1024 May 7, 2026 12:14
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label May 7, 2026

@cameron1024 cameron1024 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, other than the diagnostic tool issue

Comment thread crates/agent/src/thread.rs Outdated
@bennetbo
bennetbo enabled auto-merge May 7, 2026 12:51
@bennetbo
bennetbo added this pull request to the merge queue May 7, 2026
Merged via the queue into main with commit 7556cf8 May 7, 2026
49 of 51 checks passed
@bennetbo
bennetbo deleted the fix-lsp-tool-feature-flag-race branch May 7, 2026 13:50
jonx pushed a commit to jonx/zed-aros that referenced this pull request Jul 17, 2026
…6044)

This fixes a race condition where the thread would not get the LSP tools
at startup if the feature flag was not resolved yet.
We now always add the tools, but filter them out when we start a new
turn if the feature flag is not set.

Release Notes:

- N/A
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
…6044)

This fixes a race condition where the thread would not get the LSP tools
at startup if the feature flag was not resolved yet.
We now always add the tools, but filter them out when we start a new
turn if the feature flag is not set.

Release Notes:

- N/A
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 staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants