[BUG] /agents command reports no agents even when there are several valid ones
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?
Claude Code /agents command reports no agents. I have several defined in ~/.claude/agents, tested on another machine that they work, they were all also generated with claude /agents command. Technically the newly created agent is shown in /agents in the instance that created them, but don't show anymore after a restart.
What Should Happen?
I would see all the agents.
Error Messages/Logs
No errors shown even with --debug
Steps to Reproduce
I'm honestly not sure. It feels like I have some weird local configuration thing that breaks it. I'm running MacOS 15.7, claude is native installed, purging configs didn't help.
Claude Model
None
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
1.0.128 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
No response
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/5289
- https://github.com/anthropics/claude-code/issues/7429
- https://github.com/anthropics/claude-code/issues/7459
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
Had the same problem - custom commands AND agents not showing up in /help even though search was working.
Found the culprit was my ripgrep config. I had --color=always in my ~/.ripgreprc which was embedding ANSI color codes in file paths during Claude Code's discovery process. It was trying to read files like [0m[1m[32m/path/to/command.md[0m instead of the actual path.
Fixed it by changing --color=always to --color=auto in my ripgrep config. Still get colors in terminal but Claude Code gets clean paths for file discovery.
Worth checking if you have custom ripgrep settings - might be the same issue.
How did you even diagnose that? I found no way to introspect what's going on with agents.
Well --debug output the log into a file. And once , claude is run with debug, you can trigger the slash command that will log the issue why it is not working. This is how I found the issue.
I didnt see anything for /agents in --debug, but I'll try a slash command. Was this also on mac? Because on linux it works with the same dotfiles, which is again, weird.
mg-dev25 @.***> ezt írta (időpont: 2025. szept. 28., Vas 12:16):
mg-dev25 left a comment (anthropics/claude-code#8283) https://github.com/anthropics/claude-code/issues/8283#issuecomment-3342793423
Well --debug output the log into a file. And once , claude is run with debug, you can trigger the slash command that will log the issue why it is not working. This is how I found the issue.
— Reply to this email directly, view it on GitHub https://github.com/anthropics/claude-code/issues/8283#issuecomment-3342793423, or unsubscribe https://github.com/notifications/unsubscribe-auth/BTFWME36GH25JKVFRGWCMR33U6YQVAVCNFSM6AAAAACHVZGL6GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGNBSG44TGNBSGM . You are receiving this because you authored the thread.Message ID: @.***>
No, I am not on Mac, but this issue was starting from the version 1.1.111 and all future versions.
I know this was not a claude code issue for my setup because in Docker container it was working fine so I was looking for an issue with my current config, And check the difference between my host system and the docker container and check the official documentation for claude code to the environment variable that claude uses.
The agent identify the issue above and for me it was resolving the problems. I'm using version 1.1.126
It's definitely a claude code issue if a third-party configuration breaks functionality. People might configure all sorts of esoteric stuff in their ripgrep. And escape sequences should be handled anyway if it can make it into input.
@mg-dev25 I would suggest you open an issue specifically for ripgrep.
My problem turned out to be something related to installation: only the npm -g version worked, brew or native did not. No idea why.
Do you even still have the /agents command? As far as I can tell it was deleted in v2.0.0.
@cruftyoldsysadmin No it was not delete, I have for 2.0.0 and 2.0.1 Run with --debug and trigger /agents and /help to see if he output error
Do you even still have the
/agentscommand? As far as I can tell it was deleted in v2.0.0.
It's not deleted if you run claude, but it's missing from the Claude Code VS Code Plugin IDE for an unknown reason. The plugin update is a big mess overall, I'll be switching back to 1.something for a while, until they fix all the problems (bad interaction with allowed commands, no /agents or custom commands, @agent not working as well, which is not surprising due to the previous remark, etc.).
This bug can be fixed by installing the native version and removing all corrupt settings. Uninstall claude, then curl -fsSL https://claude.ai/install.sh | bash -s latest, /doctor, fix the corrupt settings, and then try it
@mg-dev25 The problem in the end was that Anthropic's Visual Studio extension is irreparably broken. Once I deleted it and went to native installation, it was fixed.
The VSCode extension is really, really bad.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.