Description
In v1.15.9 and later, the question/select dialog completely swallows every keybind defined in OPENCODE_BASE_MODE. When a question prompt is active you can no longer scroll the message view at all — neither the literal PageUp/PageDown keys nor any custom remap (e.g. messages_page_up: ctrl+u, messages_page_down: ctrl+d).
This is a regression from v1.15.7 (and earlier). Related issue #23897 reported a narrower variant of the same problem on v1.14.20: at that time ctrl+u (messages_*_up) still worked while the dialog was open and only ctrl+d was hijacked (because app_exit defaults include ctrl+d). In v1.15.9+ both directions are dead, suggesting whatever changed in v1.15.9's "Restore question prompt key handling" commit widened the suppression to all base-mode bindings.
Version-by-version behavior (macOS arm64)
| Version |
PageUp/PageDown while question open |
ctrl+u/ctrl+d remap while question open |
| 1.14.20 |
scrolls messages (works) |
ctrl+u works; ctrl+d cancels question (#23897) |
| 1.15.7 |
scrolls messages (works) |
scrolls messages (works) |
| 1.15.9 |
dead (no action) |
dead (no action) |
| 1.15.10 |
dead |
dead |
| 1.15.11 |
dead |
dead |
v1.15.9 changelog entry: "Restore question prompt key handling" — likely the change that regressed the fall-through.
Hypothesis (root cause)
The QuestionPrompt component pushes QUESTION_MODE onto the mode stack via useOpencodeModeStack and registers useBindings({ mode: QUESTION_MODE, enabled: !store.editing, ... }). While QUESTION_MODE is active, unhandled keys do not fall through to OPENCODE_BASE_MODE where messages_page_up, messages_page_down, messages_half_page_up, messages_half_page_down, messages_line_up, and messages_line_down live.
Expected behavior: keys not consumed by QUESTION_MODE should propagate to OPENCODE_BASE_MODE (vim/nvim style mode cascading), so message-view scroll commands remain reachable while answering a prompt.
(Bug reproduces with --pure as well — plugins are not involved.)
OpenCode version
1.15.11 (also confirmed broken on 1.15.10 and 1.15.9)
Steps to reproduce
-
Use this tui.json (the broken behavior also reproduces with default keybinds, but the remap makes it obvious):
{
"$schema": "https://opencode.ai/tui.json",
"keybinds": {
"messages_page_up": "ctrl+u",
"messages_page_down": "ctrl+d",
"app_exit": "ctrl+c,<leader>q"
}
}
(Removing ctrl+d from app_exit is required to isolate the scroll regression from the older #23897 cancel behavior.)
-
Start a session and prompt the agent to ask you a question (any flow that triggers the question tool — e.g. plan-mode confirmation, multi-choice prompt).
-
While the question dialog is rendered at the bottom of the TUI, press PageUp, PageDown, ctrl+u, and ctrl+d (and the default fallbacks ctrl+alt+b, ctrl+alt+f).
Expected: message view scrolls.
Actual: nothing happens. All keys are swallowed by the question dialog mode.
Operating System
macOS 26.5 (build 25F71), Apple Silicon (arm64)
Terminal
Ghostty (with tmux 3.6a)
Related
Description
In v1.15.9 and later, the question/select dialog completely swallows every keybind defined in
OPENCODE_BASE_MODE. When a question prompt is active you can no longer scroll the message view at all — neither the literalPageUp/PageDownkeys nor any custom remap (e.g.messages_page_up: ctrl+u,messages_page_down: ctrl+d).This is a regression from v1.15.7 (and earlier). Related issue #23897 reported a narrower variant of the same problem on v1.14.20: at that time
ctrl+u(messages_*_up) still worked while the dialog was open and onlyctrl+dwas hijacked (becauseapp_exitdefaults includectrl+d). In v1.15.9+ both directions are dead, suggesting whatever changed in v1.15.9's "Restore question prompt key handling" commit widened the suppression to all base-mode bindings.Version-by-version behavior (macOS arm64)
PageUp/PageDownwhile question openctrl+u/ctrl+dremap while question openctrl+uworks;ctrl+dcancels question (#23897)v1.15.9 changelog entry: "Restore question prompt key handling" — likely the change that regressed the fall-through.
Hypothesis (root cause)
The
QuestionPromptcomponent pushesQUESTION_MODEonto the mode stack viauseOpencodeModeStackand registersuseBindings({ mode: QUESTION_MODE, enabled: !store.editing, ... }). WhileQUESTION_MODEis active, unhandled keys do not fall through toOPENCODE_BASE_MODEwheremessages_page_up,messages_page_down,messages_half_page_up,messages_half_page_down,messages_line_up, andmessages_line_downlive.Expected behavior: keys not consumed by
QUESTION_MODEshould propagate toOPENCODE_BASE_MODE(vim/nvim style mode cascading), so message-view scroll commands remain reachable while answering a prompt.(Bug reproduces with
--pureas well — plugins are not involved.)OpenCode version
1.15.11 (also confirmed broken on 1.15.10 and 1.15.9)
Steps to reproduce
Use this
tui.json(the broken behavior also reproduces with default keybinds, but the remap makes it obvious):{ "$schema": "https://opencode.ai/tui.json", "keybinds": { "messages_page_up": "ctrl+u", "messages_page_down": "ctrl+d", "app_exit": "ctrl+c,<leader>q" } }(Removing
ctrl+dfromapp_exitis required to isolate the scroll regression from the older#23897cancel behavior.)Start a session and prompt the agent to ask you a question (any flow that triggers the question tool — e.g. plan-mode confirmation, multi-choice prompt).
While the question dialog is rendered at the bottom of the TUI, press
PageUp,PageDown,ctrl+u, andctrl+d(and the default fallbacksctrl+alt+b,ctrl+alt+f).Expected: message view scrolls.
Actual: nothing happens. All keys are swallowed by the question dialog mode.
Operating System
macOS 26.5 (build 25F71), Apple Silicon (arm64)
Terminal
Ghostty (with tmux 3.6a)
Related
QUESTION_MODEhijacking the command palette (different surface, same underlying mode-stack issue)