fix(tui): stop long-lived timer thread accumulation#558
Open
cbusillo wants to merge 2 commits intojust-every:mainfrom
Open
fix(tui): stop long-lived timer thread accumulation#558cbusillo wants to merge 2 commits intojust-every:mainfrom
cbusillo wants to merge 2 commits intojust-every:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
Recent Every Code crash logs showed the TUI exhausting the 32-thread lightweight background pool over long-lived sessions. The original composer cleanup fixed one real leak, but fresh logs still showed saturation with
rate-reset-refreshparticipating as a second long-lived sleeper path. This PR fixes both accumulation sites together.Validation
cargo test -p code-tui drop_stops_running_animation_thread -- --nocapturecargo test -p code-tui repeated_rate_limit_reschedules_do_not_consume_lightweight_threads -- --nocapturePROFILE=release-prod ./build-fast.shRuntime check
release-prodbinary locallyt3codesession on the new build run for about 3 hours with no newbackground thread spawn rejectedentries after session start in~/.code/debug_logs/critical.log.2026-03-10