[FEATURE] Add "TAB accept only" mode for prompt suggestions to prevent accidental execution

Resolved 💬 5 comments Opened Dec 18, 2025 by wbingli Closed Feb 14, 2026

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

The current prompt suggestion feature uses Enter to both accept the suggestion AND execute it in one keystroke. This creates a dangerous UX issue in idle sessions:

  1. User has an active Claude Code session but is working elsewhere (other terminal panes, applications, etc.)
  2. A prompt suggestion appears in the idle session
  3. User presses Enter to activate/focus the terminal (common behavior in tmux, multi-pane setups, or just to check which terminal is active, or in VIM mode)
  4. The suggestion is immediately accepted and executed without any opportunity for review

This is particularly risky in edit mode or auto-accept/skip permission mode, where accidental execution can lead to unintended file modifications or command execution with no confirmation prompt.

Proposed Solution

Add a configuration option for "TAB accept only" mode where:

  • TAB: Accepts the suggestion into the prompt input (but does NOT execute)
  • ⌘+Enter: Accept and Submit prompt suggestion

This ensures users always have a chance to review what they're about to execute before it runs.

Proposed Configuration

{
"promptSuggestions": {
"enabled": true,
"acceptBehavior": "tab-only" // or "enter-executes" (current default)
}
}

Or a simpler toggle in /config:
Prompt suggestion accept behavior: [TAB only] / [Enter accepts & executes]

Alternative Solutions

Current workaround is to completely disable suggestions via CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false or the /config toggle, but this loses the benefit of suggestions entirely. There's no middle ground option.

Priority

Medium - Would be very helpful

Feature Category

Interactive mode (TUI)

Use Case Example

  1. I have Claude Code running in one tmux pane, with other panes for shells, editors, etc.
  2. I'm working in another pane/window and Claude Code session is idle
  3. A prompt suggestion appears in the idle Claude Code session (I don't notice it)
  4. I press Enter to switch focus or check the terminal state
  5. Current behavior: The suggestion is immediately executed without my review
  6. Desired behavior: Enter does nothing to the suggestion; I must press TAB to accept it first, giving me a chance to review what I'm about to execute

Additional Context

_No response_

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗