[BUG] Duplicate agent listings showing same path as both User and Project agents

Resolved 💬 7 comments Opened Nov 11, 2025 by alvaroludolf Closed Jan 13, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Description:

  • Agents defined in ~/.claude/agents/ are appearing twice in the /agents list
  • Both "User agents" and "Project agents" sections show the same path: /home/alvaroludolf/.claude/agents
  • No .claude/agents/ directory exists in the project directory
  • The project only has .claude/settings.local.json with permissions configuration
  • Issue persists after restarting Claude Code
  • Expected behavior: Agents should only appear once under "User agents" since they're globally defined

This is what I get when I type /agents

> /agents
╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Agents                                                                                                                                                                                                                                                                                                                                                                │
│ 6 agents                                                                                                                                                                                                                                                                                                                                                              │
│                                                                                                                                                                                                                                                                                                                                                                       │
│ ❯ Create new agent                                                                                                                                                                                                                                                                                                                                                    │
│                                                                                                                                                                                                                                                                                                                                                                       │
│   User agents (/home/alvaroludolf/.claude/agents)                                                                                                                                                                                                                                                                                                                     │
│   devops-specialist · sonnet ⚠ overridden by projectSettings                                                                                                                                                                                                                                                                                                          │
│   frontend-architect · sonnet ⚠ overridden by projectSettings                                                                                                                                                                                                                                                                                                         │
│                                                                                                                                                                                                                                                                                                                                                                       │
│   Project agents (/home/alvaroludolf/.claude/agents)                                                                                                                                                                                                                                                                                                                  │
│   devops-specialist · sonnet                                                                                                                                                                                                                                                                                                                                          │
│   frontend-architect · sonnet                                                                                                                                                                                                                                                                                                                                         │
│                                                                                                                                                                                                                                                                                                                                                                       │
│   Built-in agents (always available)                                                                                                                                                                                                                                                                                                                                  │
│   general-purpose · sonnet                                                                                                                                                                                                                                                                                                                                            │
│   statusline-setup · sonnet                                                                                                                                                                                                                                                                                                                                           │
│   Explore · haiku                                                                                                                                                                                                                                                                                                                                                     │
│   Plan · sonnet                                                                                                                                                                                                                                                                                                                                                       │
│                                                                                                                                                                                                                                                                                                                                                                       │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
   Press ↑↓ to navigate · Enter to select · Esc to go back

The devops-specialist was created as a project agent but then I moved it to the ~/.claude/agents. Currently there is no project .claude/agents directory.

What Should Happen?

I was expecting the list of agents to show only once as User Agents and not duplicated.

Error Messages/Logs

Steps to Reproduce

I created a project agent.
I created a user agent.
I asked claude to move the project agent to the user user agent directory.
I asked claude to make all project agents into user agents.
The issue persist with the /agents

Claude Model

Sonnet (default)

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.0.37 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

WSL (Windows Subsystem for Linux)

Additional Information

Not sure if there is an impact on this or this is just a visual issue. But I cannot find anything in my environment to generate this issue.

View original on GitHub ↗

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