Skip to content

fix: detect claude selection dialogs in narrow panes - #3165

Draft
caner-akca wants to merge 2 commits into
herdrdev:masterfrom
caner-akca:issue/2868-claude-code-selection-dialog-reports-idl
Draft

fix: detect claude selection dialogs in narrow panes#3165
caner-akca wants to merge 2 commits into
herdrdev:masterfrom
caner-akca:issue/2868-claude-code-selection-dialog-reports-idl

Conversation

@caner-akca

@caner-akca caner-akca commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

The bug

When a Claude Code pane is narrower than about 50 columns and Claude opens a selection dialog (for example AskUserQuestion), herdr agent explain and the socket API report idle even though the dialog is on screen waiting for input. Widening the same pane to 50 columns flips the same dialog to blocked.

Root cause

The live_blocked_form rule in src/detect/manifests/claude.toml required the contiguous substring esc to cancel (and contiguous sibling hints such as enter 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 reported idle. The rule had only been exercised with wide-pane captures.

What changed

  • src/detect/manifests/claude.toml: the footer hints of live_blocked_form match across a single line wrap (regex with 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 reports blocked at every width, not only for esc to cancel. Manifest version bumped to 2026.08.24.1 (updated_at likewise) 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-website passes).
  • src/detect/manifest/tests.rs: claude_wrapped_blocker_footer_is_blocked (the reporter's exact 48-column capture; fails on master with left: 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 match live_blocked_form), and claude_wrap_tolerant_blocker_leaves_neighbouring_screens_alone (negative controls: streaming, overlay, and transcript screens keep their existing states).
  • docs/next/CHANGELOG.md: one ### Fixed line.

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 (excluding live_handoff_keeps_agent_started_pane_after_agent_exits and live_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

@kangal-bot kangal-bot added the ai-review Trigger automated AI reviews for pull requests admitted by the PR gate label Aug 24, 2026
@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 190f350e-0540-4f6f-9724-cfa5540bd730

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Trigger automated AI reviews for pull requests admitted by the PR gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants