Agent Discovery Failure: Markdown Files Not Recognized in /agent Directory

Status Fixed / completed
Maintainer reply ✓ Yes — ant-kurt
Activity 4 comments · opened Aug 14, 2025 · closed Aug 14, 2025
💡 Likely answer: A maintainer (ant-kurt, collaborator) responded on this thread — see the highlighted reply below.

Bug Description
I have .md files in /agent but claude code says i have no agents... Even if i do it in claude code and generate a agent, it still does not appear in my agents list.

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 1.0.80
  • Feedback ID: 75e6f11a-142f-4947-a85d-d0cc2a2e5d1d

Errors

[{"error":"Error: Agent file /Users/janisjankewitz/.claude/agents/README.md is missing required 'name' in frontmatter\n    at _W8 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2344:1724)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2344:282\n    at Array.map (<anonymous>)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2344:212\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async Object.call (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3354:3325)","timestamp":"2025-08-14T13:01:39.884Z"},{"error":"ReferenceError: location is not defined\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2344:424\n    at Array.map (<anonymous>)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2344:212\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async Object.call (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3354:3325)","timestamp":"2025-08-14T13:01:39.890Z"},{"error":"Error: Agent file /Users/janisjankewitz/.claude/agents/README.md is missing required 'name' in frontmatter\n    at _W8 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2344:1724)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2344:282\n    at Array.map (<anonymous>)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2344:212\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async R (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3350:25528)","timestamp":"2025-08-14T13:02:17.241Z"},{"error":"ReferenceError: location is not defined\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2344:424\n    at Array.map (<anonymous>)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2344:212\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async R (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3350:25528)","timestamp":"2025-08-14T13:02:17.243Z"}]

View original on GitHub ↗

4 Comments

github-actions[bot] · 1 year ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/5758
  2. https://github.com/anthropics/claude-code/issues/5715
  3. https://github.com/anthropics/claude-code/issues/5289

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

nodnarbnitram · 1 year ago

Your error message says why (Agent file /Users/janisjankewitz/.claude/agents/README.md is missing required 'name') ).

You have a README.md in your agents folder. I ran into this as well with having a CLAUDE.md in my agents directory. Must have been a bad update, because mine worked for a while with the non-agent markdown in my agent folder before.

ant-kurt collaborator · 1 year ago

1.0.81 adds a fix to prevent a single non-parseable config from preventing the rest of the agents from loading.

github-actions[bot] · 1 year ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.