Skip to content

tui: question tool form covers full screen with no way to read the transcript #53506

Closed as not planned

Description

@ngtienchung

Summary

The question tool form takes over the entire TUI view, leaving no way to read
the transcript that explains why the question is being asked. It cannot be
shrunk, minimized, or moved to the background. The permission prompt already has
a fullscreen toggle (permission.prompt.fullscreen, bound to Ctrl+F); question
forms have no equivalent.

Environment

  • opencode version: 2.0.24
  • OS: Microsoft Windows NT 10.0.19045.0 (win32 x64)
  • Terminal: Windows Terminal, TERM=xterm-256color, truecolor
  • Shell: PowerShell 7 as the tool shell
  • Install/channel: npm global CLI, latest
  • Active plugins: none

Reproduction

  1. Start an OpenCode session in a repository with enough prior output to review.
  2. Send a request that requires a decision partway through, for example:
    "Refactor the auth module. Before you start, check the existing tests."
  3. The agent reads files, runs commands, and then calls the question tool.
  4. The form replaces the whole view.

Expected Behavior

A pending question form should leave the transcript readable, matching the
permission prompt, which offers permission.prompt.fullscreen to collapse a
fullscreen dialog into a panel.

Actual Behavior

The form occupies the full viewport and there is no way to reach the transcript
behind it.

  • Ctrl+F (permission.prompt.fullscreen) has no effect. The binding is
    registered only for dialogs that set fullscreen: true, and question forms
    never do.
  • Ctrl+B (session.background) does not apply. It targets running shell and
    subagent tools only.
  • Esc cancels the question outright. It is not a hide-and-return toggle.
  • PgUp / PgDn scroll within the form, not the conversation.

Requesting a form makes it the active view rather than an overlay. The form root
box is sized to the full viewport, so the message list is not rendered underneath
it:

function view(o) {
  if (o.permission) return { type: "permission", request: o.permission }
  if (o.form) return { type: "form", request: o.form }
  return { type: "prompt" }
}

By contrast, the permission dialog opts into the shared dialog's expanded state,
which is what makes Ctrl+F work:

...t.fullscreen
  ? [{ id: "permission.prompt.fullscreen",
       title: "Toggle permission fullscreen",
       run: () => setExpanded(p => !p) }]
  : []

Ctrl+B filters on tool name and never matches the question tool:

const name = toolName(part.name)
return name === "shell" || name === "subagent"

Additional Context

Frequency: every time the agent calls question. Fully consistent.

Workarounds available today:

  • Esc to cancel, then re-ask in plain text. Loses the structured choices and
    the agent has to be prompted again.
  • Instruct the agent in AGENTS.md to print all findings and command output
    before calling question, so the form does not need to carry that context.
    Works, but relies on model compliance rather than a UI affordance.

Possible fixes, in rough order of effort:

  1. Add a form.fullscreen binding for question forms, mirroring
    permission.prompt.fullscreen.
  2. Render question forms as a resizable panel instead of replacing the view.
  3. Update the question tool description to require the agent to surface its
    findings before asking, so the decision is answerable without the transcript.

Option 1 appears to be the smallest change: the form component already tracks
answer state per field and already handles PgUp / PgDn, so it mainly needs
the expanded/shrunk presentation the dialog component already has.

Activity

  1. github-actions commented on Oct 6, 2026

    @github-actions
    Contributor

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

    • #37173: A TUI question form blocks the prior conversation, with a request for a show/hide toggle.
    • #23515: A question pane obscures the conversation context behind it.

    For keybind-related issues, please also check our pinned keybinds documentation: #4997

  2. ngtienchung commented on Oct 6, 2026

    @ngtienchung
    Author

    Duplicate of #37173, which is the open TUI issue for this exact behavior. Posting the version, environment, and code-level analysis there instead.

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