[FEATURE] Prevent prompts and dialogs from appearing while user is actively typing
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Description:
Problem
Claude Code currently displays prompts, permission requests, and other dialogs at any time during execution, including while
the user is actively typing. This creates multiple negative outcomes:
- Lost Input: When a dialog appears, focus shifts away from the input field. Any text being typed is lost or interrupted.
- Accidental Actions: User pressing Enter to complete their message instead triggers the dialog action they didn't see.
- Wasted Time: User must retype their context, question, or clarification from scratch.
- Poor UX: Interruption breaks concentration and workflow.
- Frustration: Repeated occurrences significantly degrade the user experience.
Current Behavior
- Dialogs (permissions, confirmations, etc.) appear immediately when Claude encounters them
- No detection of active user input state
- Focus shifts to dialog, breaking user's typing flow
- Typed content during dialog appearance is lost
Technical Considerations
- Input field should maintain focus during Claude's execution
- Typing detection should be lightweight and reliable
- Queue should handle multiple pending dialogs appropriately
- Visual indicator that dialogs are queued (optional)
Proposed Solution
Desired Behavior
- Detect active typing: Monitor input field for active typing state
- Queue all prompts: Hold permission requests, confirmations, and other dialogs when typing detected
- Display after typing pause: Show queued dialogs only when:
- User stops typing (500-1000ms delay after last keystroke)
- User explicitly submits message
- No active input detected for reasonable timeout
Alternative Solutions
I learn to touch type and stop looking at the keyboard while typing?
This is a significant UX issue that affects every session where users need to provide additional context during execution.
While users could avoid the issue by watching the screen constantly, the tool should adapt to natural user behavior rather than requiring perfect attention.
Priority
High - Significant impact on productivity
Feature Category
CLI commands and flags
Use Case Example
Real-World Scenario
- User asks Claude to perform a task
- User starts typing additional context or clarification (eyes on keyboard)
- Claude encounters a permission request or other prompt
- Dialog appears, stealing focus
- User continues typing but input goes nowhere
- User looks up, realizes context is lost
- User must dismiss dialog and retype everything
Additional Context
Benefits
- Preserves user input and context
- Prevents accidental dialog actions
- Respects user's focus and workflow
- Maintains security without interrupting active work
- Significantly improves overall user experience
This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗