[Feature Request] Inline prompt autosuggestions while typing (zsh-autosuggestions style)
Problem
When typing prompts in Claude Code's interactive REPL, there's no inline autocomplete or ghost-text suggestion based on prompt history or context. The only suggestion mechanism fires after Claude responds (grayed-out next-prompt suggestions), and even that only appears ~50% of the time.
This means every prompt must be typed out fully from scratch, even when repeating similar patterns ("look at the ...", "run the ...", "check if ...").
Proposed Solution
Add inline ghost-text autosuggestions while typing, similar to how zsh-autosuggestions works in the shell:
- As the user types, show a grayed-out completion based on:
- Prompt history (current session + cross-session if persisted)
- Context-aware predictions (file names, recent tool outputs, conversation context)
- Tab to accept the suggestion
- Keep typing to dismiss/override
- Could leverage the existing prompt suggestion infrastructure but trigger it keystroke-by-keystroke rather than only post-response
Why This Matters
Power users spend significant time in the CC REPL typing repetitive prompt patterns. Shell users are accustomed to history-based autosuggestions and the absence of this in CC feels like a regression in input ergonomics.
The current post-response suggestions are helpful but insufficient -- they only cover "what's next" not "finish what I'm typing."
Possible Implementation
- Hook into the existing Ink-based input component
- Maintain a prompt history ring buffer (already partially exists for Up/Down arrow navigation)
- Use prefix matching against history + optional fuzzy matching
- Render suggestion as dimmed text after cursor (same visual pattern as the existing post-response suggestions)
Environment
- Claude Code (terminal REPL mode)
- macOS / iTerm2
- Would benefit all terminal users regardless of OS
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗