fix(cli): monitor prompt handoff no longer races repaint teardown - #105973
Merged
Merged
Conversation
4 tasks
teknium1
force-pushed
the
fix/monitor-paint-ci
branch
from
September 8, 2026 20:29
518a1e0 to
497ef9e
Compare
Contributor
૮ >ﻌ< ა ci reviewran on 497ef9e — fix(cli): keep monitor repaints safe during prompt handoff
|
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.
CLI monitor repaint requests no longer race the nested application's event-loop teardown.
Root cause: prompt_toolkit's thread-safe
invalidate()readsapp.loopmultiple times; a queued modal frame can finish the nested application between those reads and leave a worker callingcall_soon_threadsafe(loop=None).This was found in the first-attempt output of CI run 34263993728 for #105960 (retry passed), not a reported user-machine incident. This PR is separate from the UI work and does not modify it.
Validation
RuntimeError: no running event loop; unchanged secret test passesin_terminal()monitor and secret callbacktests/cli/+tests/hermes_cli/, retries disabledNative evidence uses a disposable credential-free profile and the shipped CLI widget/callback implementations; it controls worker scheduling to reproduce the race, not a live model request or historical CI scheduler replay. An earlier interrupted directory run also hit
test_update_success_when_head_moves; the completed directory run passed that file.Infographic