fix: detect claude selection dialogs in narrow panes - #3165
Draft
caner-akca wants to merge 2 commits into
Draft
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
7 tasks
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.
The bug
When a Claude Code pane is narrower than about 50 columns and Claude opens a selection dialog (for example
AskUserQuestion),herdr agent explainand the socket API reportidleeven though the dialog is on screen waiting for input. Widening the same pane to 50 columns flips the same dialog toblocked.Root cause
The
live_blocked_formrule insrc/detect/manifests/claude.tomlrequired the contiguous substringesc to cancel(and contiguous sibling hints such asenter to select/↑/↓ to navigate). Detection runs over rendered screen rows, and Claude soft-wraps that footer below ~50 columns (Esc to/cancel), so the required evidence stopped matching and the known-agent fallback reportedidle. The rule had only been exercised with wide-pane captures.What changed
src/detect/manifests/claude.toml: the footer hints oflive_blocked_formmatch across a single line wrap (regexwith a bounded separator: spaces/tabs or one newline, never a blank line). All hint phrases in that rule get the same treatment so the dialog reportsblockedat every width, not only foresc to cancel. Manifestversionbumped to2026.08.24.1(updated_atlikewise) so hosts with a cached remote manifest pick up the new rule.website/agent-detection/claude.toml: published copy kept byte-identical to the bundled manifest (scripts/agent_detection_manifest_check.py --require-websitepasses).src/detect/manifest/tests.rs:claude_wrapped_blocker_footer_is_blocked(the reporter's exact 48-column capture; fails on master withleft: Idle, right: Blocked),claude_selection_dialog_is_blocked_at_every_wrap_width(50/48/40/34/24-column wraps and an indented continuation row, all must matchlive_blocked_form), andclaude_wrap_tolerant_blocker_leaves_neighbouring_screens_alone(negative controls: streaming, overlay, and transcript screens keep their existing states).docs/next/CHANGELOG.md: one### Fixedline.No engine, API, or state changes; the change is confined to the Claude manifest rule and its tests.
Verification
just test-one claude_wrapped_blocker_footer_is_blocked: exit 100 on master (left: Idle, right: Blocked), exit 0 with the fix.just ci(excludinglive_handoff_keeps_agent_started_pane_after_agent_exitsandlive_handoff_keeps_unmanaged_agent_name_bound_to_saved_session, which fail on this macOS host on clean master as well),just windows-lint, and the maintenance test suite: green.python3 scripts/agent_detection_manifest_check.py --require-website: ok.refs #2868