Show agent name from frontmatter instead of file path in @ autocomplete
Resolved 💬 1 comment Opened Apr 13, 2026 by nicolasksq Closed May 24, 2026
Description
When typing @ to invoke a custom agent defined in .claude/agents/, the autocomplete typeahead shows the full file path (e.g., .claude/agents/trainer.md) instead of the name field from the agent's YAML frontmatter.
Current behavior
Typing @ shows:
.claude/agents/trainer.md
Expected behavior
Typing @ should show the agent's name from frontmatter:
trainer (agent)
Given a file .claude/agents/trainer.md with:
---
name: trainer
description: Personal endurance coach
---
The autocomplete should display trainer (or trainer (agent)) rather than the file path. This would make agent invocation feel more natural and consistent with how agents are documented.
Why it matters
- Cleaner UX — users define a
namefield specifically for identification - File paths are an implementation detail that shouldn't leak into the user experience
- Makes it easier to discover and invoke agents, especially for third parties cloning a repo with custom agents
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗