[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

  1. Create agent in ~/.claude/agents/myagent.md with valid frontmatter (name, description, model)
  2. Run /agents - agent shows up correctly in the list
  3. Run /doctor - no parse errors for the agent
  4. Type @myagent do something
  5. Expected: Agent spawns with fresh context, executes task
  6. 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

  • /doctor shows agents are recognized with no parse errors
  • /agents lists 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.

View original on GitHub ↗

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