Skip to content

User input is discarded when permission or question prompt is triggered #22479

@pedropombeiro

Description

@pedropombeiro

Description

When typing text in the input field that has not yet been submitted, any permission prompt or question dialog triggered by OpenCode causes the typed text to be discarded/lost. The user must retype their input after responding to the prompt.

This affects all types of interruptions:

  • Permission prompts (e.g. ask-gated bash commands, edit permissions)
  • Question prompts from the model

Steps to reproduce

  1. Start an OpenCode session
  2. While the model is responding and triggers a permission prompt (e.g. for a bash command with "ask" permission), begin typing your next message in the input field
  3. Observe that after the permission dialog appears, the typed-but-not-submitted text is gone

Expected behavior

Typed-but-not-submitted input should be preserved across permission/question prompts.

Environment

  • OpenCode version: v1.4.3
  • OS: macOS (darwin)
  • Verified this is not caused by:
    • Any installed plugins (tested with all plugins disabled)
    • tmux (tested outside tmux)
    • Hammerspoon keybindings (tested with Hammerspoon quit)
    • Custom tui.json keybindings

Additional context

This started occurring approximately 2-3 weeks ago (late March / early April 2026).

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)opentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions