[FEATURE] Configurable Tab-accept mode for prompt suggestions — decouple acceptance from 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
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:
- Reflexive Enter during active work — typing
cargo build, reading output, then pressing Enter out of habit while a suggestion is displayed - 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)
- 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:
- Type
cargo build, press Enter → builds - Claude suggests
cargo test - Reading build output, reflexively press Enter
- Current:
cargo testexecutes unexpectedly - Desired: suggestion sits as ghost text; Tab accepts it, then Enter executes
Coffee-break scenario:
- Submit a long prompt, leave for coffee
- Return — previous prompt finished, new suggestion is displayed
- Assume you typed it (visual confusion), press Enter
- Current: unknown suggestion executes
- 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.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗