Claude Code mod pane facts: own panes, delayed isShown, and closeOnEscape
FactVerified 2 Oct 2026Holds anywhere
Fact. A statement and the evidence for it.
Statement#
In a Claude Code mod, $.ui.panes() lists only the mod's own panes, not Claude Code's diff panel. Its isShown can read false right after $.ui.open returns, because Claude Code brings the pane to the front a moment later, so a "pane is hidden" check made right after the open call gives false warnings. Do not open a mod pane with closeOnEscape if the user needs to return to the prompt: Esc then closes the pane, and a later diff panel leaves only Diff. Without it, Esc hands the keyboard back and the pane stays open as a tab in the dock. The dock shows one panel at a time, and a mod can close only its own panes.
Evidence#
Observed with the rkb mod panes.
Also found by searching
- $.ui.panes() lists only the mod's own panes
- isShown reads false right after $.ui.open returns
- do not open a mod pane with closeOnEscape if the user needs to return to the prompt
- a mod can close only its own panes