Repository navigation
Fixed session becoming permanently unresponsive on git branch names with dots - #157
Merged
oleg68 merged 1 commit intoJun 27, 2026
Merged
Conversation
When the working git branch name contains dots (e.g. refactor-menu-reorder-e9.5-e9.8), Claude Code embeds it in the input-box top border: "──────── refactor-menu-reorder-e9.5-e9.8 ──" ScreenContentDetector.detectSessionState() classifies the prompt area as found only when the line above ❯ matches isSeparatorLine() (pure dashes) or PLAN_NAME_DASHES_PATTERN (label group [\w][\w\-]* — no dots). With neither matching, the screen was mis-classified as WORKING → the session was stuck in WORKING state forever via the bidirectional READY↔WORKING sync. Fix: added isSeparatorLineWithLabel() that accepts any label text as long as the line starts/ends with box-drawing dashes and dashes make up ≥50% of its characters. Wired into both separatorAbove and separatorBelow checks. Also guarded model discovery against firing while the screen shows "esc to interrupt", preventing a second stuck-in-WORKING path on --continue sessions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
refactor-menu-reorder-e9.5-e9.8)──── refactor-menu-reorder-e9.5-e9.8 ──);detectSessionState()failed to recognize this as a separator, mis-classified the idle screen as WORKING, and the screen-sync kept forcing READY→WORKING every 500 ms--continue/--resumesessions: model discovery was fired immediately when❯appeared on screen even while Claude was actively working ("esc to interrupt"), sending/modelto a busy Claude that timed out and left the session unresponsiveRoot cause
isSeparatorLine()requires the line to be made entirely of box-drawing dashes.PLAN_NAME_DASHES_PATTERNonly allows[\w][\w\-]*in the label — dots/slashes cause no-match. With neither matching,detectSessionState()fell through toreturn WORKING.Fix
isSeparatorLineWithLabel(): accepts any label text as long as the line starts/ends with box-drawing dashes and dashes make up ≥50% of the charactersseparatorAboveandseparatorBelowchecks indetectSessionState()detectSessionState(lines) != WORKINGguard to the model discovery condition inpollScreenState()Test plan
mvn test -Dtest=ScreenContentDetectorTest— new fixtureready-named-separator-above-dotted-branchpasses (previously failed withexpected READY but was WORKING)mvn test -Dtest=ClaudeSessionControllerTest— two new tests verify model discovery is deferred while screen shows WORKING🤖 Generated with Claude Code