Slash commands highlighted mid-sentence but not dispatched
Description
Registered skills/commands get syntax-highlighted in the CLI input regardless of position, but only dispatch when they lead the message. The highlighting creates a false affordance — the user sees visual confirmation that the command was recognized, but it silently doesn't fire.
Steps to reproduce
- Register a skill (e.g.,
/raise-pr) that appears highlighted in the CLI input - Send the command in three positions:
| Input | Highlighted? | Dispatched? |
|-------|-------------|-------------|
| /raise-pr | Yes | Yes — <command-name> tag injected |
| /raise-pr with trailing args | Yes | Yes — <command-name> + <command-args> injected |
| ok do this /raise-pr | Yes | No — arrives as plain text |
Expected behavior
If a command is highlighted (visually acknowledged as recognized), it should either:
- Dispatch in all positions where it's highlighted, or
- Only highlight in positions where it will actually dispatch
Actual behavior
The highlighter fires on all positions. The dispatcher only fires on leading position. The model receives no signal in case 3 — no tag, no forced tool call, nothing. The command is indistinguishable from arbitrary text by the time it reaches the model.
Impact
The model falls back to generative interpretation of the user's intent and may ad-hoc the task rather than following the registered workflow. The user has no indication this happened because the highlight suggested recognition.
Environment
- Claude Code CLI (terminal)
- Skills registered via
.claude/configuration