[FEATURE] Configurable keybinding for prompt suggestion acceptance—require Tab before Enter execution

Resolved 💬 3 comments Opened Jan 3, 2026 by gwpl Closed Jan 7, 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

Claude Code's prompt suggestions (v2.0.76+) accept and execute on a single Enter press. This creates accidental execution risk: users often press Enter reflexively (to clear input, insert a newline, or dismiss a thought) and unintentionally trigger a complex or destructive command.

In standard terminal shells (Bash, Zsh, Fish), completion suggestions require explicit acceptance via Tab or Right Arrow before Enter can execute. This two-step workflow prevents accidents and aligns user expectations with established CLI conventions.

Additionally user after coming from e.g. coffee break may see displayed prompt and assume that wrote it when previous prompt was being executed and was waiting for previous one to finish. It is visual-muscle memory typical workflow with claude code to already prepare next prompt while previous is executing. Displaying other may make user to accidentally accept not their prompt after longer execution of previous one.

Currently, disabling suggestions entirely is the only workaround—which eliminates the feature's value.

Proposed Solution

Add a configuration option (accessible via /config) to change suggestion acceptance behavior:

  • Default (current): Enter accepts and executes immediately
  • Optional mode: Tab (or Right Arrow) accepts the suggestion into the input buffer; only then can Enter execute it

Example setting name: suggestion_acceptance_mode with options ["enter_executes" | "tab_accepts"]

This decouples acceptance from execution, requiring deliberate user confirmation before any command runs.

Alternative Solutions

  • Disable suggestions entirely (current workaround—loses the feature's utility)

Priority

Medium - Would be very helpful

Feature Category

Interactive mode (TUI)

Use Case Example

Scenario: I'm iterating on a Rust build in the terminal.

  1. I type cargo build and press Enter → builds successfully.
  1. Claude suggests the next logical command: cargo test.
  1. While reading the build output, I reflexively press Enter to clear the prompt and think about the next step.
  1. Current behavior: cargo test executes immediately—unexpected.
  1. Desired behavior: Enter does nothing (or just clears); the suggestion sits as ghost text. I press Tab to accept it into the buffer, review it, then press Enter to run it.

This prevents accidental execution while preserving the suggestion's value as a drafting aid.

Additional Context

Similar behavior in established tools:

  • Bash/Zsh: fzf and zsh-autosuggestions require Right Arrow or Ctrl+E to complete; Enter alone is a no-op.
  • GitHub Copilot CLI: Suggestions are accepted via Tab; Enter without acceptance is ignored.
  • Fish shell: Right Arrow completes the suggestion; Enter without completion has no effect.

Technical consideration: This is a UX preference, not a breaking change. Users who like immediate execution can keep the default; those who prefer safety can opt into tab_accepts mode.

View original on GitHub ↗

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