Repository navigation
Fixed model combo not becoming active with blocking startup dialog - #100
Merged
oleg68 merged 1 commit intoApr 29, 2026
Conversation
When Claude starts with --continue/--resume, it may show a "Resuming session" choice dialog before the input prompt is ready. discoverModels() was triggered immediately on the STARTING→READY transition, while this dialog was still visible. The /model command sent to the PTY was blocked until the user dismissed the dialog, but by then discovery had already timed out (16×300ms) with empty results. MAX_MODEL_DISCOVERY_ATTEMPTS=1 prevented any retry, so the model combo stayed disabled for the whole session. Fix: pollScreenState() now skips discoverModels() while any choice menu is visible on screen (via detectChoiceMenu) or already shown to the user (model.getActiveChoiceMenu() != null). Once the blocking dialog is dismissed, the next poll finds a clean screen and starts discovery. Also removed `final` from the class declaration and made discoverModels() package-private to allow test subclassing (needed for the regression test). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
oleg68
deleted the
bugfix/model-combo-not-populated-with-blocking-dialog
branch
April 29, 2026 07:53
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
--continue/--resume, Claude may show a "Resuming session" choice dialog before the input prompt is readydiscoverModels()was triggered immediately on READY, sent/modelto PTY, but Claude couldn't process it until the dialog was dismissedMAX_MODEL_DISCOVERY_ATTEMPTS=1prevented retry → model combo stayed disabled for the whole sessionpollScreenState()now defersdiscoverModels()while any choice menu is visible on screen or shown to the user; discovery starts cleanly after the dialog is dismissedTest plan
mvn test— 721 tests pass🤖 Generated with Claude Code