[FEATURE] Configurable keybinding for prompt suggestion acceptance—require Tab before Enter execution
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):
Enteraccepts and executes immediately
- Optional mode:
Tab(orRight Arrow) accepts the suggestion into the input buffer; only then canEnterexecute 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.
- I type
cargo buildand pressEnter→ builds successfully.
- Claude suggests the next logical command:
cargo test.
- While reading the build output, I reflexively press
Enterto clear the prompt and think about the next step.
- Current behavior:
cargo testexecutes immediately—unexpected.
- Desired behavior:
Enterdoes nothing (or just clears); the suggestion sits as ghost text. I pressTabto accept it into the buffer, review it, then pressEnterto 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:
fzfandzsh-autosuggestionsrequireRight ArroworCtrl+Eto complete;Enteralone is a no-op.
- GitHub Copilot CLI: Suggestions are accepted via
Tab;Enterwithout acceptance is ignored.
- Fish shell:
Right Arrowcompletes the suggestion;Enterwithout 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.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗