[FEATURE] Decouple prompt suggestion acceptance from execution—require Tab/Arrow before Enter
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
Prompt suggestions are a genuinely valuable feature—but the current UX makes them dangerous enough that safety-conscious users disable them entirely, which is a net loss for everyone.
The core issue: pressing Enter simultaneously accepts a suggestion AND executes it. This violates established CLI conventions and creates real accidental-execution risk in several common scenarios:
- Reflexive Enter press — Users habitually press Enter to clear the prompt, insert a newline, or dismiss a thought. With a suggestion visible, this instantly executes an unreviewed command.
- Idle session surprise — A user returns from a break, sees text in the prompt, assumes it's something they typed earlier, and presses Enter. The suggestion executes without review.
- Multi-pane/tmux workflows — User presses Enter to focus a terminal pane; the suggestion fires immediately.
- Muscle memory conflict — In Bash, Zsh, Fish, and every major shell, completion suggestions require explicit acceptance (Tab/Right Arrow) before Enter can execute. Claude Code breaks this universal convention.
The risk is amplified in edit mode or auto-accept/skip-permission mode, where accidental execution can modify files or run commands with no confirmation gate.
Currently, disabling suggestions entirely is the only workaround—which kills the feature's value. This is a great feature with a dangerous UX; it would be a pity to force users to turn it off completely instead of offering a safe interaction mode.
Prior issues (both closed by automation, not by resolution): - #14500 — closed for inactivity (30-day autoclose) - #16166 — closed as duplicate of #14500, then #14500 itself was closed - The feature request has had multiple independent reporters and 👍 support, but keeps getting caught in the autoclose cycle.
Proposed Solution
Add a configuration option (via /config or settings.json) to decouple acceptance from execution:
| Mode | Behavior |
|------|----------|
| enter_executes (current default) | Enter accepts + executes in one keystroke |
| tab_accepts (opt-in) | Tab or Right Arrow accepts the suggestion into the input buffer; Enter then executes after user review |
Example configuration:
{
"promptSuggestions": {
"enabled": true,
"acceptBehavior": "tab_accepts"
}
}
In tab_accepts mode:
- Tab / Right Arrow → suggestion text populates the input buffer (editable, reviewable)
- Enter (with no acceptance) → ignored or treated as normal empty-line input
- Enter (after acceptance) → executes the now-reviewed prompt
This is a non-breaking, opt-in UX change. Users who like immediate execution keep the default.
Alternative Solutions
- Disable suggestions entirely (
CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false) — works but eliminates the feature - A brief delay before suggestions become "armed" — less clean, still risks accidental execution
- Visual differentiation (dimmer ghost text) — helps awareness but doesn't prevent the keystroke problem
Priority
Medium - Would be very helpful
Feature Category
Interactive mode (TUI)
Use Case Example
Scenario: Returning from a break
- Claude Code is running in a tmux pane. I step away for coffee.
- While idle, a prompt suggestion appears:
rm -rf target && cargo build --release - I return, see text in the prompt, and press Enter thinking it's my own previous input.
- Current behavior: The command executes immediately — deleting and rebuilding without my review.
- Desired behavior (with
tab_accepts): Enter does nothing. The suggestion remains as ghost text. I press Tab to accept it into the buffer, review/edit it, then press Enter to execute deliberately.
Scenario: Rapid iteration
- I run
cargo buildand it succeeds. - Claude suggests
cargo test. - While reading build output, I reflexively press Enter.
- Current:
cargo testfires unexpectedly. - Desired: Nothing happens. I consciously Tab-accept when ready.
Additional Context
Established precedent in CLI tools:
- Fish shell: Right Arrow completes suggestion; Enter alone is a no-op
- Zsh (zsh-autosuggestions): Right Arrow / Ctrl+E to accept; Enter without acceptance does nothing
- Bash (fzf): Tab to select; Enter to confirm separately
- GitHub Copilot CLI: Tab accepts; Enter without acceptance is ignored
- VS Code Copilot: Tab accepts inline suggestion; Enter inserts a newline
All of these tools decouple "accept suggestion" from "execute." Claude Code is the outlier.
Note on issue lifecycle: This request has been filed multiple times (#14500, #16166) by independent users and keeps getting auto-closed without resolution. The demand is real and recurring. Filing fresh per the bot's instructions to reference #14500 and #16166.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗