[FEATURE] Plugin-provided inline autocomplete with custom trigger (e.g. `#` for issues)

Status Open
Maintainer reply None cached
Activity 1 comment · opened Sep 22, 2026

Summary

Let plugins register their own inline autocomplete for the prompt input, triggered by a character or prefix (for example #). It would work like the built-in @ file picker, but the suggestions would come from a plugin.

Use case

I'm building claude-issue-picker, a plugin that lets you reference GitHub issues from the prompt. The UX I want:

> fix this bug #lo
  ┌─────────────────────────────────┐
  │ #42  Login crash on cold start  │
  │ #38  Logout button misaligned   │
  └─────────────────────────────────┘

Type # and a filtered list of open issues shows up while you type. Picking one inserts #42 into the prompt before you submit.

Why it can't be built today

  • Hooks only run after submit. UserPromptSubmit gets the finished prompt. No hook runs while you're typing.
  • Hooks can't rewrite the prompt. They can only add additionalContext. My workaround has Claude call AskUserQuestion after the prompt is sent. That costs a model turn, the transcript keeps the raw #, and it feels much slower than inline completion.
  • fileSuggestion doesn't fit. It only runs after @, it's meant for file paths, and it's a user setting, so a plugin can't ship it. If I put issues in the @ list, they get mixed in with files.
  • Keybindings can't do it either. A keybinding can't open a picker filled by a command.

Proposal (any one of these would unblock it)

  1. Plugin autocomplete providers. Something like this in plugin.json:

``json
"autocomplete": [
{ "trigger": "#", "command": "${CLAUDE_PLUGIN_ROOT}/scripts/suggest.js" }
]
`
The command gets the current token on stdin (for example
{"query": "lo", "cwd": "..."}) and returns [{ "insert": "#42", "label": "Login crash on cold start", "detail": "bug" }]. It could use the same debounce and timeout rules as fileSuggestion`.

  1. A generic fileSuggestion with a configurable trigger. Allow more than one entry, each with its own trigger character, and let plugins contribute entries.
  2. Prompt rewriting in UserPromptSubmit. Let the hook return an updatedPrompt. This isn't inline, but it would at least keep the transcript accurate and avoid the extra turn.

Option 1 fits best. Plugins could use it for Jira and Linear tickets, Slack channels, snippets, and so on.

Question

If there's already a supported way to do this that I've missed, I'd love a pointer.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗