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
- Start OpenCode in a worktree with warp mode enabled (
/warp)
- Issue a command that causes the agent to use the
question tool (interactive Q&A)
- The question prompt appears
- Try clicking buttons, pressing Enter, pressing Ctrl+C — none work
- 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)
Description
When using warp mode (
/warp) in a worktree session and the agent triggers the interactive Q&A mode (e.g., via thequestiontool during planning/decision-making), all user input is completely captured — no action can be taken: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 viadialog.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 withonMouseUpand key bindingspackages/opencode/src/cli/cmd/tui/component/dialog-workspace-create.tsx— warp dialog lifecyclepackages/opencode/src/cli/cmd/tui/ui/— dialog/overlay componentsThe 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
/warp)questiontool (interactive Q&A)Workaround
None in-session. Only recovery is force-closing the terminal.
Environment
/warp)Related Code
packages/opencode/src/cli/cmd/tui/routes/session/question.tsxpackages/opencode/src/cli/cmd/tui/component/dialog-workspace-create.tsxpackages/opencode/src/cli/cmd/tui/ui/(dialog overlay components)