chat-open bench: click a subagent line named by its task; a failed click says what the page shows
Follow-up to #36070 and #36002 (#36060). Leo, 2026-11-05: "things just don't f***ing open up fast enough on the right. / links. subagents. all".
Part of the main-thread hang push (manaflow-ai/cmuxterm-hq#6338, comment 6597127823), where Leo also said: "i frequently see this / but claude: / and codex: / have much more useful right click things and dont get the application not responding thing".
What was wrong
After #36070 the chat-open subagent case still found no line to click: every open came back no visible element matches, n=10 at base.
- The running tray and a finished line name a subagent by its task first ("Audit area 3: ..."), so no element's text is the name alone.
- No finished line (
button.cv-subagent-done) is drawn while the tray holds the subagents.
What the bench does now:
- It tries each subagent's task after its name.
- Then it tries the enabled buttons of the finished line and the tray line (
:not([disabled]), which covers #36060's review follow-up). - When nothing matches, the open's reply carries a
probeof the subagent selectors the page shows, plus itschat_state, so the next failure names its cause.
Tests (red at base, green at head)
scripts/cmux-next/tests/test_chat_open_bench.pySubagentClickTests:test_a_line_named_by_its_task_is_clicked_by_its_task,test_a_line_matched_by_no_text_is_clicked_by_its_selectorandtest_no_shown_line_keeps_the_error_and_says_what_the_page_showsfail at base and pass at head.- 4
OpenTestsfail the same way at base and at head (base reds, untouched). - In the bench at 1afb16d5 plus this commit (step c13f1372, display Mac, n=5 per condition), 10 of 10 opens were valid. The same bench at #36070's tip gave 0 of 10 (step b3a04e49).
Performance
This PR changes only the measurement.
| metric | before | after | delta | harness |
|---|---|---|---|---|
| chat-open subagent valid opens at 1afb16d5 (n=10) | 0 | 10 | +10 | b3a04e49 โ c13f1372 |
Risk
Low. The change is a bench script only. It adds no timers or observers.
Changelog
- None (bench only).
Agent session: agent session
๐ค Generated with Claude Code
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith ยท Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Makes the chat-open bench click subagent lines that are named by their task, and makes a failed click report what the page actually shows.
The bench previously clicked subagents by name only, which matched nothing once the tray and finished lines started reading the task first ("Audit area 3: ..."). It now tries each subagent's task after its name, then the finished-line and tray-line buttons by selector; when nothing matches, the open's reply carries a probe of which subagent selectors the page shows and its chat state, so the next failure names its cause. Bench script only โ no app behavior changes.
Tests
SubagentClickTestsintest_chat_open_bench.pyfailed at base and pass at head; tests cover task-named lines, selector fallback, and the no-match probe.