[FEATURE] Configurable Tab-accept mode for prompt suggestions — decouple acceptance from execution

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

This is a re-filing of #16166 (auto-closed as duplicate of #14500). Both are now closed+locked. After review, #14500 was a narrower request (idle-session Enter-to-focus danger), while this issue covers broader accidental execution scenarios not addressed elsewhere:

  1. Reflexive Enter during active work — typing cargo build, reading output, then pressing Enter out of habit while a suggestion is displayed
  2. Coffee-break visual confusion — returning to a session, seeing a displayed prompt, and assuming you typed it (previous prompt was executing while you were away)
  3. Muscle-memory conflict — standard terminal shells (Bash, Zsh, Fish) require explicit Tab/Right Arrow acceptance before Enter executes; Claude Code breaks this convention

Previously filed related issues (all closed):

  • #14500 — TAB-accept-only mode (idle session focus, closed for inactivity)
  • #16166 — This issue's prior filing (auto-closed as duplicate of #14500)
  • #10878 — VSCode selection menu interrupts (different UX layer)
  • #10971 — Prevent dialogs during typing (different problem)
  • #11431 — Slash command fuzzy matching (unrelated)

None of these addressed the core request: decouple suggestion acceptance from execution.

Proposed Solution

Add a config option (via /config) for suggestion acceptance behavior:

  • Default (current): Enter accepts + executes immediately
  • Optional mode: Tab/Right Arrow accepts into input buffer; only then can Enter execute

Example setting:

{
  "promptSuggestions": {
    "acceptBehavior": "tab-only"
  }
}

Alternative Solutions

  • Disable suggestions entirely (CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false) — loses the feature's value

Priority

Medium - Would be very helpful

Feature Category

Interactive mode (TUI)

Use Case Example

Active work scenario:

  1. Type cargo build, press Enter → builds
  2. Claude suggests cargo test
  3. Reading build output, reflexively press Enter
  4. Current: cargo test executes unexpectedly
  5. Desired: suggestion sits as ghost text; Tab accepts it, then Enter executes

Coffee-break scenario:

  1. Submit a long prompt, leave for coffee
  2. Return — previous prompt finished, new suggestion is displayed
  3. Assume you typed it (visual confusion), press Enter
  4. Current: unknown suggestion executes
  5. Desired: must Tab-accept first

Additional Context

Established CLI conventions:

  • Fish shell: Right Arrow completes; Enter without completion is a no-op
  • zsh-autosuggestions: Right Arrow/Ctrl+E to complete
  • fzf: Tab selects; Enter without selection is different
  • GitHub Copilot CLI: Tab accepts; Enter without acceptance is ignored

This is a UX preference, not a breaking change. Users who prefer immediate execution keep the default.

View original on GitHub ↗

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