/plugin panel clips off the top edge in small terminal splits

Resolved 💬 2 comments Opened Feb 25, 2026 by brianc442 Closed Mar 26, 2026

Description

When running /plugin in a small terminal pane (e.g. Ghostty built-in splits), the interactive selector panel renders partially offscreen — clipped at the top edge of the pane.

Root cause

Claude Code detects that the cursor is near the bottom of the pane and correctly flips the panel to render upward. However, it doesn't check whether there is sufficient space above the cursor before choosing that direction. With a short pane (~24 rows) and the cursor partway down, the panel overflows the top edge.

The fix should check available space in both directions and either:

  • Choose the direction with more room, or
  • Clamp the panel height to fit whichever direction is chosen

Environment

  • OS: Arch Linux
  • Wayland compositor: Hyprland
  • Terminal: Ghostty (using built-in split panes)
  • Pane height: 24 rows (tput lines = 24)
  • Claude Code version: latest

Steps to reproduce

  1. Open Ghostty and create a horizontal split, leaving one pane ~24 rows tall
  2. Run claude in that pane
  3. Type /plugin and press Enter
  4. Observe the panel renders upward and is clipped at the top of the pane

Expected behavior

The panel should fit within the visible pane area, either by rendering downward, rendering upward with clamped height, or scrolling within the panel.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗