## Context Previously we were very eagerly dropping threads from memory. However, reloading threads has a cost: - For our agent, we have to replay events, which is lossy - It's slower for external agents - Some agents don't support reloading So we keep the most recent 5 idle threads (or all threads who can't be reloaded) and clean up our list after every insertion. ## Self-Review Checklist <!-- Check before requesting review: --> - [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) - [ ] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - N/A --------- Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
4 files changedLine totals unavailable