[FEATURE] Decouple prompt suggestion acceptance from execution—require Tab/Arrow before Enter

Resolved 💬 3 comments Opened Feb 14, 2026 by gwpl Closed Mar 16, 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

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:

  1. 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.
  2. 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.
  3. Multi-pane/tmux workflows — User presses Enter to focus a terminal pane; the suggestion fires immediately.
  4. 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

  1. Claude Code is running in a tmux pane. I step away for coffee.
  2. While idle, a prompt suggestion appears: rm -rf target && cargo build --release
  3. I return, see text in the prompt, and press Enter thinking it's my own previous input.
  4. Current behavior: The command executes immediately — deleting and rebuilding without my review.
  5. 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

  1. I run cargo build and it succeeds.
  2. Claude suggests cargo test.
  3. While reading build output, I reflexively press Enter.
  4. Current: cargo test fires unexpectedly.
  5. 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.

View original on GitHub ↗

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