rulesync icon indicating copy to clipboard operation
rulesync copied to clipboard

claudecode import: subagents in subfolders of `.claude/agents/` are not found

Open artgas1 opened this issue 2 months ago • 0 comments

Summary

rulesync import --targets claudecode --features subagents only looks at the top level of .claude/agents/. Claude Code scans that directory recursively, so subagents organized in subfolders are silently skipped.

From the Claude Code subagents docs:

Claude Code scans .claude/agents/ and ~/.claude/agents/ recursively, so you can organize definitions into subfolders such as agents/review/ or agents/research/. The subdirectory path doesn't affect how a subagent is identified or invoked, because identity comes only from the name frontmatter field.

Reproduction (rulesync 21.0.0)

.claude/agents/review/security-reviewer.md:

---
name: security-reviewer
description: Reviews code for security issues
tools: Read, Grep, Glob
---
You are a read-only security reviewer.
rulesync import --targets claudecode --features subagents

Actual

No subagent files found for claudecode. Skipping import.
No files imported for enabled features: subagents

Expected

The subagent is imported, found recursively, and identified by its name frontmatter. If duplicate names are found across subfolders, a warning would help, since Claude Code then loads only one of them.

artgas1 avatar Sep 26 '26 12:09 artgas1