opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Blocked TAB switching during predefined answer selection and logical inconsistency in Plan Mode prompts

Open patryksztuczka opened this issue 22 hours ago • 1 comments

Description

In the new experimental Plan Mode, the UI captures the keyboard focus when predefined answers (buttons) are presented to the user. This prevents the use of the TAB key to manually switch from Plan Mode to Build Mode.

Furthermore, there is a logical inconsistency: the agent often generates "Execute Plan" or "Apply Fix" as a predefined answer while still in Plan Mode. Since Plan Mode lacks write permissions, selecting these leads to a failed attempt, unnecessary re-prompts, and wasted tokens.

Questions for the Team:

  • Should "Execute" actions even be offered as predefined answers in Plan Mode?
  • Wouldn't it be more consistent if predefined answers in Plan Mode were reserved for clarifying doubts or refining the plan, rather than triggering execution that the current mode doesn't support?

Workaround Currently, the only way to bypass this is to:

  1. Press ESC to dismiss the predefined answers/question mode.
  2. Use TAB to manually switch to Build Mode.
  3. Manually type the command to execute the plan.

Plugins

none

OpenCode version

1.1.20

Steps to reproduce

  1. Enter Plan Mode and describe a task.
  2. Wait for the agent to generate a plan. If you are "lucky" (the agent's generation is non-deterministic), it will offer a predefined answer such as "Execute Plan" or "Yes, apply fix."
  3. Try to press TAB to switch to Build Mode while these options are visible; the key is blocked.
  4. Select the "Execute" option.
  5. Observe the agent failing or asking for a mode switch, consuming extra tokens in the process.

Screenshot and/or share link

Image Image Image

Operating System

macOS 14.6

Terminal

Ghostty

patryksztuczka avatar Jan 16 '26 11:01 patryksztuczka