[BUG]: UI becomes unresponsive when tool permission dialog appears #4072

Open
opened 2026-02-16 17:42:31 -05:00 by yindo · 1 comment
Owner

Originally created by @nickembrey on GitHub (Jan 1, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

When a tool call triggers a permission dialog (e.g., bash command, file edit), the UI becomes unresponsive. The input area seems to freeze and keyboard input is sluggish or ignored.

This appears related to #5820 (autocomplete/permission conflict) and #3846 (no response to user input), but is a distinct symptom focused on the permission dialog itself causing unresponsiveness.

Symptoms

  • Input field becomes unresponsive when permission dialog appears
  • Keyboard events are delayed or not processed
  • UI may show visual artifacts or text appearing in wrong places
  • Sometimes need to wait several seconds before input is accepted

Possible Causes (from code analysis)

  1. Keyboard event conflicts: permission.tsx has its own useKeyboard handler that may conflict with other handlers in session/index.tsx
  2. Diff rendering blocking: Large diffs in the permission preview (EditBody component) could block the main thread
  3. State synchronization: Permission state syncing via useSync might be causing render blocking

Relevant Code Locations

  • packages/opencode/src/cli/cmd/tui/routes/session/permission.tsx - Permission prompt component with keyboard handler
  • packages/opencode/src/cli/cmd/tui/routes/session/index.tsx:1024-1033 - Permission rendering and prompt disable logic
  • packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx - Prompt component that gets disabled during permissions

OpenCode version

1.0.223

Steps to reproduce

  1. Start opencode
  2. Ask the agent to run a bash command or edit a file (with permission set to "ask")
  3. When the permission dialog appears, try to interact with the UI
  4. Observe sluggishness/unresponsiveness

Operating System

macOS

Terminal

Ghostty / iTerm2

Originally created by @nickembrey on GitHub (Jan 1, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description When a tool call triggers a permission dialog (e.g., bash command, file edit), the UI becomes unresponsive. The input area seems to freeze and keyboard input is sluggish or ignored. This appears related to #5820 (autocomplete/permission conflict) and #3846 (no response to user input), but is a distinct symptom focused on the permission dialog itself causing unresponsiveness. ### Symptoms - Input field becomes unresponsive when permission dialog appears - Keyboard events are delayed or not processed - UI may show visual artifacts or text appearing in wrong places - Sometimes need to wait several seconds before input is accepted ### Possible Causes (from code analysis) 1. **Keyboard event conflicts**: `permission.tsx` has its own `useKeyboard` handler that may conflict with other handlers in `session/index.tsx` 2. **Diff rendering blocking**: Large diffs in the permission preview (`EditBody` component) could block the main thread 3. **State synchronization**: Permission state syncing via `useSync` might be causing render blocking ### Relevant Code Locations - `packages/opencode/src/cli/cmd/tui/routes/session/permission.tsx` - Permission prompt component with keyboard handler - `packages/opencode/src/cli/cmd/tui/routes/session/index.tsx:1024-1033` - Permission rendering and prompt disable logic - `packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx` - Prompt component that gets disabled during permissions ### OpenCode version 1.0.223 ### Steps to reproduce 1. Start opencode 2. Ask the agent to run a bash command or edit a file (with permission set to "ask") 3. When the permission dialog appears, try to interact with the UI 4. Observe sluggishness/unresponsiveness ### Operating System macOS ### Terminal Ghostty / iTerm2
yindo added the opentuiperf labels 2026-02-16 17:42:31 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 1, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #5820: Autocomplete dropdown conflicts with permission dialog - visual overlap and keyboard event capture
  • #3846: No response to user input - general UI unresponsiveness with keyboard input
  • #4061: Session hangs after file write tool execution with massive latency spike
  • #4092: Better navigation of output and non-blocking agent permission requests

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 1, 2026): This issue might be a duplicate of existing issues. Please check: - #5820: Autocomplete dropdown conflicts with permission dialog - visual overlap and keyboard event capture - #3846: No response to user input - general UI unresponsiveness with keyboard input - #4061: Session hangs after file write tool execution with massive latency spike - #4092: Better navigation of output and non-blocking agent permission requests Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4072