Feature: Support slash command and @-mention completion mid-sentence

Resolved 💬 3 comments Opened Feb 12, 2026 by 8scream Closed Feb 16, 2026

Problem

Currently, autocompletion for slash commands (/) and file references (@) only works when the input field is empty. Typing / or @ mid-sentence or at the end of existing text does not trigger any completion suggestions.

This prevents a very natural workflow where users describe tasks in natural language while referencing commands and files inline.

Current Behavior

| Input state | / completion | @ completion |
|---|---|---|
| Empty input field | ✅ Works | ✅ Works |
| Mid-sentence | ❌ No suggestions | ❌ No suggestions |
| End of existing text | ❌ No suggestions | ❌ No suggestions |

Expected Behavior

| Input state | / completion | @ completion |
|---|---|---|
| Empty input field | ✅ | ✅ |
| Mid-sentence | ✅ | ✅ |
| End of existing text | ✅ | ✅ |

Use Case Examples

# Currently does NOT trigger completion:
Review this file @src/utils/helper.ts and then run /dev:start

# Expected: @ and / trigger completion suggestions mid-sentence:
Review this file @[suggestions appear] and then run /[suggestions appear]

Suggested Trigger Conditions

To avoid false positives with email addresses and URLs:

  • @ trigger: Activate completion when @ is typed after a space or at the start of a line
  • / trigger: Activate completion when / is typed after a space or at the start of a line
  • No trigger: When @ or / appears mid-word (e.g., user@example.com, https://)

Technical Considerations

  • Email addresses (user@domain.com): avoided by requiring preceding space/line-start
  • URLs (https://path): avoided by the same space/line-start rule
  • Existing behavior for empty-field completion should remain unchanged
  • The completion popup positioning should adapt to cursor location within the input

Environment

  • Claude Code CLI (terminal)
  • Also relevant to IDE integrations (VS Code, JetBrains)

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗