[BUG] @ agent invocation no longer works in 2.1.x - only references, doesn't invoke
Resolved 💬 2 comments Opened Jan 13, 2026 by JDRV-space Closed Feb 27, 2026
Description
In previous versions, typing @agentname would directly invoke a custom agent from ~/.claude/agents/ with fresh context.
In 2.1.x, @ now only adds a reference (shows as @"agentname (agent)" with quotes) but doesn't invoke. The agent instructions load into context but no agent spawns.
Steps to reproduce
- Create agent in
~/.claude/agents/myagent.mdwith valid frontmatter (name, description, model) - Run
/agents- agent shows up correctly in the list - Run
/doctor- no parse errors for the agent - Type
@myagent do something - Expected: Agent spawns with fresh context, executes task
- Actual: Just inserts
@"myagent (agent)"as a reference with quotes, no invocation occurs
Environment
- Version: 2.1.6
- OS: macOS
- Install method: native
Additional context
/doctorshows agents are recognized with no parse errors/agentslists all custom agents correctly- The
@typeahead recognizes agents and autocompletes them - But selecting an agent only inserts a reference, doesn't invoke
Workaround
Added a CLAUDE.md rule forcing Claude to invoke via Task tool when seeing @ references. Works but shouldn't be necessary.
Request
Restore direct @agent invocation, or provide an alternative user-facing syntax (e.g., /agent-name or !agent-name) for users to directly spawn agents with fresh context.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗