Skip to content

TUI: collapsed permission prompt silently clips long shell commands #51820

Open

Description

@kernel-oops

Description

In the v2 TUI, the collapsed permission prompt is capped at 15 rows. When a request's body is longer than that (typically a multi-line shell command, such as a heredoc that writes a script and then runs it), the body is clipped silently: nothing in the prompt says that more of the command exists below the cut.

The full command can be seen by toggling fullscreen, but nothing in the collapsed prompt says so, so it's easy to approve or reject a command after reading only its first few lines.

Steps to reproduce

  1. Let an agent request permission for a shell command of 20+ lines (for example cat > script.js <<'EOF' … EOF followed by node script.js).
  2. Look at the collapsed permission prompt.

Expected: the prompt indicates that part of the request is hidden and how to see it.
Actual: the command stops mid-way with no indication, and the last lines (often the part that actually runs something) are not visible.

OpenCode version

v2 branch

Operating System

Linux

Activity

  1. github-actions commented on Sep 28, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of an existing issue. Please check:

  2. kernel-oops commented on Sep 28, 2026

    @kernel-oops
    ContributorAuthor

    Related but not the same: #50903 covers edit diffs in the compact prompt not being scrollable and the scroll keys not being configurable (on 1.x). This issue is about v2's compact prompt clipping long shell commands with no indication that anything is hidden. #51821 adds "… N more lines · to view all" to the collapsed prompt; it doesn't add scrolling or configurable keys, so #50903 stays separate.

  3. opencodejr commented on Oct 28, 2026

    @opencodejr
    Contributor

    Thanks for the clear report, @kernel-oops!

    To restate it: when a permission request's body (usually a long multi-line shell command) is taller than the collapsed prompt's 15-row cap, the prompt should say that part of it is hidden and how to see the rest, rather than cutting it off without notice.

    This works as currently designed. The collapsed prompt has a fixed height, and the fullscreen toggle is how you see the whole request. Its shortcut is always shown in the prompt's footer, but nothing tells you whether the content was actually cut off. So I've filed this as a feature request for a truncation indicator rather than a bug. It's a fair point, since it's easy to approve a command after reading only its first lines and missing the part that runs something.

    Maintainers will consider it. Until then, using the fullscreen shortcut shown in the prompt footer before approving long commands is the way to see the full request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions