Skip to content

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

@transportrefer

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)

Metadata

Metadata

Assignees

Labels

No labels
No labels

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