claude-code - 💡(How to fix) Fix AskUserQuestion: no way to view truncated preview content ("X lines hidden")

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…

When using AskUserQuestion with the preview field, long preview content gets truncated with a ── × ── N lines hidden ── indicator, but there is no keyboard affordance to scroll, expand, or view the hidden content. The visible footer only exposes Enter, ↑/↓ (navigate options), n (notes), Tab (switch questions), and Esc — none of which act on the preview pane.

Root Cause

The agent doc for AskUserQuestion explicitly recommends previews for "concrete artifacts that users need to visually compare" — e.g. ASCII mockups, code snippets, diagram variations. Those are exactly the cases where the content tends to exceed a few lines, and where comparing options requires seeing the whole artifact, not just the top of it.

Workarounds today are awkward:

  • Resize the terminal larger and hope the agent re-asks.
  • Ask the agent in "Chat about this" to paste the full preview into the conversation.
  • Tell the agent to break previews into smaller chunks (defeats the point of a side-by-side comparison UI).

It's not always practical to run the CLI in a full-screen window (split panes, tmux layouts, IDE-embedded terminals, etc.).

Fix Action

Fix / Workaround

Workarounds today are awkward:

  • Resize the terminal larger and hope the agent re-asks.
  • Ask the agent in "Chat about this" to paste the full preview into the conversation.
  • Tell the agent to break previews into smaller chunks (defeats the point of a side-by-side comparison UI).
RAW_BUFFERClick to expand / collapse

Summary

When using AskUserQuestion with the preview field, long preview content gets truncated with a ── × ── N lines hidden ── indicator, but there is no keyboard affordance to scroll, expand, or view the hidden content. The visible footer only exposes Enter, ↑/↓ (navigate options), n (notes), Tab (switch questions), and Esc — none of which act on the preview pane.

Repro

  1. Run Claude Code in a terminal that isn't full-screen.
  2. Have the agent call AskUserQuestion with an option whose preview is longer than the available pane height.
  3. The preview renders with ── × ── 11 lines hidden ── (or similar) and there's no way to see the rest without resizing the terminal larger and re-triggering the question.

Screenshot: the right pane shows "11 lines hidden" with no visible control to expand it.

<img width="1300" height="696" alt="Image" src="https://github.com/user-attachments/assets/97c4a465-1304-4d79-ba0d-0b9a0f00ddd2" />

Why this matters

The agent doc for AskUserQuestion explicitly recommends previews for "concrete artifacts that users need to visually compare" — e.g. ASCII mockups, code snippets, diagram variations. Those are exactly the cases where the content tends to exceed a few lines, and where comparing options requires seeing the whole artifact, not just the top of it.

Workarounds today are awkward:

  • Resize the terminal larger and hope the agent re-asks.
  • Ask the agent in "Chat about this" to paste the full preview into the conversation.
  • Tell the agent to break previews into smaller chunks (defeats the point of a side-by-side comparison UI).

It's not always practical to run the CLI in a full-screen window (split panes, tmux layouts, IDE-embedded terminals, etc.).

Suggested fix

Introduce a focused-pane model with / to move focus between the left (options) pane and the right (preview) pane. Footer hints and active keybinds change based on which pane is focused:

  • Left pane focused (default — current behavior):

    • ↑/↓ — navigate options
    • Enter — select
    • n — add notes
    • — focus preview pane
    • Tab / Esc — unchanged
  • Right pane focused:

    • ↑/↓ — scroll preview line-by-line
    • PgUp / PgDn (or Space / b) — scroll by page
    • g / G — jump to top / bottom
    • — return focus to options
    • Enter — select the currently-focused option (so users don't have to leave the preview to commit)

The footer would re-render to show only the keys relevant to the focused pane, mirroring the pattern used in tools like lazygit / k9s.

Environment

  • Claude Code CLI, Opus 4.7 (1M context)
  • macOS (Darwin 25.2.0), zsh
  • Terminal: standard window, not full-screen

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