Feature: user-configurable prompt input completion source (frecency/history inline autosuggest)

Status Open
Maintainer reply None cached
Activity 0 comments · opened Jul 25, 2026

What

Expose a user-configurable completion source for the prompt input — inline, as-you-type suggestions (frecency/history-backed) that render as ghost text and accept with Tab, the same way Claude Code already renders inline completions for / commands, @ file paths, and :emoji: shortcodes.

Why

Claude Code already ships the exact UI primitive for this: it renders inline prompt completions internally for slash-commands, @-paths, and (recently) :emoji: shortcodes. There is currently no public extension point to feed custom completions into that same surface:

  • The plugin/hook system operates at tool-execution and lifecycle events.
  • The closest hook, UserPromptSubmit, fires on Enter — it can add context or modify the submitted prompt, but it can't surface suggestions while typing.

So there's no way to get history- or frecency-based inline autosuggest at the prompt.

Use case

Heavy TUI users repeatedly type the same short phrases into the prompt ("merge it", "yes dispatch", "recommend next steps", etc.). Shell tools like zsh-autosuggestions/fish deliver perfect inline ghost-text autosuggest — but only in the shell's own line editor, never in the Claude Code prompt widget, which is Claude Code's own input.

OS-level workarounds don't reach it either: on X11, IME candidate windows aren't cursor-anchored, and a full-screen raw-mode TUI clobbers the terminal's preedit rendering entirely (well-documented on GitHub Copilot CLI, architecturally the same kind of Node TUI). The only thing that can render an inline, cursor-anchored, as-you-type suggestion inside the prompt is Claude Code itself — which is why this needs to be a first-party extension point.

Proposed shape (open to alternatives)

Any one of:

  1. A custom completion source API (plugin/config) that Claude Code queries with the in-progress input and renders the returned candidates in the existing inline-completion UI (accept with Tab, cycle, etc.).
  2. A built-in history/frecency autosuggest for the prompt (like zsh-autosuggestions), toggleable — reusing your existing inline-completion renderer.

Either would let users get low-friction, zero-invocation phrase completion at the prompt without hacky external keyboard overlays. Given the rendering machinery already exists (slash/@/emoji), the incremental surface seems small.

Environment

Claude Code CLI in a terminal (Alacritty) + tmux on Linux/X11. Not terminal- or OS-specific — the ask is a first-party prompt-completion extension point.

View original on GitHub ↗