Skip to content

agent: Fix session not found error#53999

Merged
bennetbo merged 5 commits intomainfrom
fix-session-not-found-issue
Apr 15, 2026
Merged

agent: Fix session not found error#53999
bennetbo merged 5 commits intomainfrom
fix-session-not-found-issue

Conversation

@bennetbo
Copy link
Copy Markdown
Member

@bennetbo bennetbo commented Apr 15, 2026

Adds ref-counting to native agent sessions. This ensures that we do not drop the session when close_connection is called in the case where there are still other ConversationView's holding a reference to AcpThread.
Also guards against a race condition on load, by relying on a shared task and storing loading sessions inside pending_sessions: HashMap<acp::SessionId, PendingSession>>

Self-Review Checklist:

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content is consistent with the UI/UX checklist
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Release Notes:

  • N/A

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Apr 15, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label Apr 15, 2026
@bennetbo bennetbo marked this pull request as ready for review April 15, 2026 17:40
@bennetbo bennetbo requested review from benbrandt April 15, 2026 18:04
@bennetbo bennetbo enabled auto-merge (squash) April 15, 2026 18:07
@bennetbo bennetbo merged commit dfe6b87 into main Apr 15, 2026
52 of 54 checks passed
@bennetbo bennetbo deleted the fix-session-not-found-issue branch April 15, 2026 18:15
@zed-zippy zed-zippy Bot added the PR state:needs review Used to label PRs that are in need of a post-merge approval label Apr 15, 2026
@MrSubidubi MrSubidubi removed the PR state:needs review Used to label PRs that are in need of a post-merge approval label Apr 15, 2026
bennetbo added a commit that referenced this pull request Apr 16, 2026
Follow up to #53999

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

- N/A
@bennetbo
Copy link
Copy Markdown
Member Author

/cherry-pick preview

github-actions Bot pushed a commit that referenced this pull request Apr 16, 2026
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
@eholk eholk mentioned this pull request Apr 16, 2026
18 tasks
eholk pushed a commit that referenced this pull request Apr 16, 2026
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
eholk pushed a commit that referenced this pull request Apr 16, 2026
Follow up to #53999

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

- N/A
eholk added a commit that referenced this pull request Apr 16, 2026
We're doing another preview release today to get our latest parallel
agents features out there. This PR is a rollup of all the changes we
need to cherry pick.

- [x] 7a26e48 from
#54081
- [x] #54066
- [x] #53992
- [x] #54079
- [x] #54057
- [x] #54056
- [x] #54052
- [x] #53999
- [x] #54009
- [x] #53539 (already cherry
picked as 25e02cb)
- [x] #54070
- [x] #54053
- fix `run_tests.yml`: 67e92b5
- [x] #53979
- [x] #53884
- [x] #54067
- [x] #54014 (already on
branch)
- [x] #54030 (already on
branch)
- [x] #54094

Release Notes:

- N/A

---------

Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Co-authored-by: Neel <neel@zed.dev>
Co-authored-by: Richard Feldman <richard@zed.dev>
G36maid pushed a commit to G36maid/zed that referenced this pull request Apr 29, 2026
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
G36maid pushed a commit to G36maid/zed that referenced this pull request Apr 29, 2026
Follow up to zed-industries#53999

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #ISSUE

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.

3 participants