Skip to content

Warp mode + interactive Q&A: all input captured (mouse clicks, Enter, Ctrl+C) — user must force-close terminal #27302

Closed as not planned

Description

@transportrefer

Description

When using warp mode (/warp) in a worktree session and the agent triggers the interactive Q&A mode (e.g., via the question tool during planning/decision-making), all user input is completely captured — no action can be taken:

  • Mouse clicks on confirm/cancel buttons do nothing
  • Enter key does nothing
  • Ctrl+C (or Cmd+C) does not exit — normally this would abort the interactive Q&A
  • The only way to recover is to force-close the terminal window (Ghostty + Fish)

When the session is forcibly terminated, OpenCode reports "interactive Q&A aborted by user" on next launch, confirming the question was never dismissed.

Root Cause Hypothesis

The warp flow (/warp) manipulates a dialog stack via dialog.clear(), dialog.replace(), etc. It appears the warp dialog lifecycle leaves a modal overlay or event capture layer that intercepts all input — both mouse and keyboard — and never releases it. The entire TUI event loop for the session becomes blocked.

Key code locations:

  • packages/opencode/src/cli/cmd/tui/routes/session/question.tsx — QuestionPrompt with onMouseUp and key bindings
  • packages/opencode/src/cli/cmd/tui/component/dialog-workspace-create.tsx — warp dialog lifecycle
  • packages/opencode/src/cli/cmd/tui/ui/ — dialog/overlay components

The fact that even Ctrl+C is captured suggests the issue is at the TUI event loop or dialog overlay level, not just the QuestionPrompt component.

Severity

High — user is completely locked out of the session and must force-kill the terminal, potentially losing unsaved work/context.

Steps to Reproduce

  1. Start OpenCode in a worktree with warp mode enabled (/warp)
  2. Issue a command that causes the agent to use the question tool (interactive Q&A)
  3. The question prompt appears
  4. Try clicking buttons, pressing Enter, pressing Ctrl+C — none work
  5. Must force-close the terminal window (e.g., Ghostty + Fish) to recover

Workaround

None in-session. Only recovery is force-closing the terminal.

Environment

  • OpenCode version: latest (dev branch)
  • Mode: warp (/warp)
  • Platform: macOS
  • Terminal: Ghostty + Fish

Related Code

  • packages/opencode/src/cli/cmd/tui/routes/session/question.tsx
  • packages/opencode/src/cli/cmd/tui/component/dialog-workspace-create.tsx
  • packages/opencode/src/cli/cmd/tui/ui/ (dialog overlay components)

Activity

  1. changed the title [-]Warp mode + interactive Q&A: confirm button does nothing, cannot cancel, stuck in question prompt[/-] [+]Warp mode + interactive Q&A: confirm/cancel buttons do not respond (mouse clicks swallowed)[/+] on May 13, 2026
  2. changed the title [-]Warp mode + interactive Q&A: confirm/cancel buttons do not respond (mouse clicks swallowed)[/-] [+]Warp mode + interactive Q&A: all input captured (mouse clicks, Enter, Ctrl+C) — user must force-close terminal[/+] on May 13, 2026
  3. transportrefer commented on May 13, 2026

    @transportrefer
    Author

    Update after reproducing this outside /warp:

    This no longer looks specific to /warp, Ghostty/fish, or Secure Keyboard Entry. I found a narrower reproduction around the interactive Q&A custom-answer state:

    1. Open a multi-step question prompt.
    2. On the last question, choose/open the custom answer option (Type your own answer / Other).
    3. Leave that custom answer editor open/selected, then move to the Confirm tab.
    4. The Confirm screen is visible and tabs/options can still be clicked, but Enter/confirm does nothing.
    5. If I type a value into the custom answer field, for example option 1, and submit that edit, Confirm starts working again.

    Looking at packages/opencode/src/cli/cmd/tui/routes/session/question.tsx, this appears to be stale store.editing state:

    • selectTab(index) changes tab and selected, but does not clear editing.
    • The Confirm submit binding is in the non-editing bindings: enabled: dialog.stack.length === 0 && !store.editing.
    • The edit bindings are enabled only with store.editing && !confirm().
    • So when store.editing === true and confirm() === true, neither the edit Return binding nor the Confirm Return binding is active.

    That also explains why clicking/navigating between steps still works while Confirm itself does not. A likely fix is to clear editing when leaving a question tab, or ensure the Confirm tab can submit/escape even if a stale custom-answer editor state is true.

  4. luksch commented on May 20, 2026

    @luksch

    same here on cachyos with the opencode plugin in vs code.

  5. dreamorosi commented on Jun 13, 2026

    @dreamorosi

    I'm facing the same issue and it's blocking /warp usage - @kommander any chance you could look into this and see if the linked PR solves it?

  6. rekram1-node commented on Jun 23, 2026

    @rekram1-node
    Collaborator

    Automated: closing question issues.

    GitHub Issues are for bug reports and feature requests only — questions / support are no longer tracked here.

    If this is a bug or feature request, please open a new issue with the appropriate template.

  7. rekram1-node commented on Jun 23, 2026

    @rekram1-node
    Collaborator

    Reopening – this was incorrectly closed by automated question-issue cleanup. Sorry for the noise.

  8. github-actions commented on Aug 23, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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