[FEATURE] Prompt history recall — Ctrl+R search + inline autosuggestions (zsh-autosuggestions style)
Problem
Reusing past prompts in Claude Code is painful. There's no way to:
- Search through prompts you've typed before
- Get inline suggestions as you type (like
zsh-autosuggestions)
Current workaround: copy-pasting from external notes (I've been using WeChat's file transfer assistant as a scratchpad 😅).
Project-specific prompts are too narrow to justify a full /skill file, but broad enough that I type them repeatedly across sessions.
Proposed Solution
Two complementary features, in order of implementation complexity:
1. Ctrl+R — Fuzzy search over prompt history (lower effort)
- Every submitted prompt is saved to a history store (similar to shell
~/.zsh_history) Ctrl+Ropens a fuzzy search picker (fzf-style) over past prompts- Selected prompt fills the input box (not auto-submitted — user can edit first)
- History scoped by project directory, with option to search all-projects
2. Inline autosuggestions while typing (higher effort, higher value)
- As the user types, a gray ghost-text suggestion appears showing the best-matching past prompt
→orTabaccepts the suggestion (does not submit — fills input for further editing)- Identical UX to
zsh-autosuggestions/ Warp Terminal's command history - Fallback gracefully if no match found (no ghost text shown)
Why this matters
The input box already supports up-arrow history cycling (see #32400, #15631), but that's sequential, not searchable. For users who reuse project-specific prompts frequently, fuzzy search is an order-of-magnitude better UX.
Related issues: #25877 (predictive text), #32400 (history scoping), #26304 (agent Ctrl+R)
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗