claude-code - 💡(How to fix) Fix [BUG] /agents Library list does not auto-scroll viewport — selection past first page is invisible

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Error Messages/Logs

Root Cause

Additional Information — Root cause from the binary

Code Example

P.map((C) => Jq.createElement(uD_, {
  key: `${C.agentType}-${C.source}`,
  agent: C,
  activeSelection: X,
  runningByType: O
}))

---

let U = O ?? Math.min(Math.floor(C * 0.8), 30)
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report
  • I am using the latest version of Claude Code

What's Wrong?

When opening /agents and navigating into the Library tab, the list renders all available agents top-to-bottom. As soon as the active selection moves below the visible terminal viewport, the highlight is no longer visible — the cursor keeps moving on / PgDn, but the rendered list does not scroll to follow it.

For users with many installed agents (I have ~170 in ~/.claude/agents/, primarily from a plugin/marketplace bundle), this makes the picker unusable past the first page. You can press Enter on a selection you can't see.

What Should Happen?

The Library list should keep the active selection within the visible viewport — either by virtualizing the rendered list with a scroll offset that follows the cursor, or by using the same paginated picker primitive used by the slash-command autocomplete (which already supports Type to filter + visible-window scrolling).

Steps to Reproduce

  1. Install Claude Code 2.1.119 on macOS.
  2. Populate ~/.claude/agents/ with 50+ agent definitions (any plugin marketplace with a large agent bundle reproduces this; mine is ~170 files).
  3. Run /agents inside a Claude Code session.
  4. Press Tab to focus the Library tab.
  5. Press repeatedly past the bottom of the visible list.

Observed: the highlighted row scrolls offscreen below; the rendered list never advances. PgDn behaves the same way. Selection state continues internally, so pressing Enter selects an unseen agent.

Expected: the list scrolls so the highlighted row stays visible.

Error Messages/Logs

No errors — purely a rendering/viewport bug.

Claude Code Version

2.1.119 (Claude Code) — Homebrew Cask install (/opt/homebrew/Caskroom/claude-code/2.1.119/claude).

Regression

Unknown — this is the first time I've had a library this large, so I can't say whether earlier versions handled it correctly. The bug itself is reliably reproducible on every attempt with the steps above on 2.1.119.

OS / Terminal

  • OS: macOS (Darwin 25.4.0, arm64)
  • Terminal: iTerm2

Additional Information — Root cause from the binary

Inspecting strings inside the shipped binary, the /agents Library list component (referred to as s6K in the minified bundle) renders the full filtered agent list eagerly:

P.map((C) => Jq.createElement(uD_, {
  key: `${C.agentType}-${C.source}`,
  agent: C,
  activeSelection: X,
  runningByType: O
}))

There is no slice(start, end), no visibleCount prop, no scroll-offset state, and no useEffect that adjusts the rendered window when the active selection (Y) changes. Compare to the autocomplete picker (VD_ in the same bundle), which does take a visibleCount and renders a windowed slice — that one works correctly.

The status line of the Library picker hints only at the supported keys:

<TAB>/<Shift+TAB> switch tabs · <↑>/<↓> navigate · Enter select · Esc close

…confirming there's no filter/search input and no documented PgDn behavior to mitigate the missing scroll.

The parent component also caps the rendered height at:

let U = O ?? Math.min(Math.floor(C * 0.8), 30)

i.e. ≤30 rows regardless of terminal size, so even maximizing the terminal window cannot expose more of the list. With ~170 agents, ~140 are unreachable in any usable way.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING