Repository navigation
fix(subagents): follow symlinked .rulesync in MCP tools and address #3187 follow-ups - #3232
Merged
Merged
Conversation
…ested-subagent follow-ups
- MCP subagent tools no longer reject a symlinked `.rulesync` or
`.rulesync/subagents`; only the part below the subagents directory is
confined, matching the CLI and the other MCP features.
- MCP subagent paths must be a `.md` file under `.rulesync/subagents/`;
the directory itself is rejected. Document the path contract.
- Replace the `filePattern.startsWith("**/")` check with an explicit
`supportsNestedPaths` meta flag.
- Warn when nested subagents targeting a name-keyed tool share a name.
- Document that `.rulesync/subagents/` subdirectories are now loaded.
- Add tests for flat-import name dedupe and the flat-target skip for
DeepAgents and Roo.
Refs #3227
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… directory Address review: skip symlinked files in list, reject dot-prefixed path segments, treat a missing subagents directory as not found / no-op, tighten test assertions and doc wording. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Y4MwhqMc6s4ct5MzMReGJj
dyoshikawa
force-pushed
the
resolve-issue-3227-subagent-followups
branch
from
September 30, 2026 13:09
9d052af to
1bd8823
Compare
Owner
Author
|
@dyoshikawa Thank you! |
dyoshikawa
added a commit
that referenced
this pull request
Oct 1, 2026
…-mcp-followups fix(subagents): address MCP subagents follow-ups from #3232 review
cacarico
pushed a commit
to cacarico/rulesync
that referenced
this pull request
Oct 1, 2026
…review Key the nested duplicate-name warning on the name each tool resolves (Kimi Code override and lowercasing), check supportsNestedPaths in both directions, log intended symlink skips in MCP list at debug level, and document that MCP subagent writes follow a symlinked .rulesync outside the project. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Y4MwhqMc6s4ct5MzMReGJj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-ups from the #3187 review collected in #3227.
.rulesync—list/get/put/deleteno longer run thecwd → .rulesync/subagentsrealpath check, so a symlinked.rulesyncor.rulesync/subagents(e.g. into a dotfiles repo) works again, as it did before fix(claudecode): import nested subagents #3187 and as the CLIgeneratepath does. The check below the subagents directory (subagentsDir → target file) stays forget,putanddelete. Decision:getkeeps it too (the issue suggested writes/deletes only), andlistnow applies the same guard per file, solistandgetagree: a symlink below.rulesync/subagents/(file or directory) is neither listed nor read. A missing.rulesync/subagents/makesgetreport not found anddeletea no-op instead of a misleading symlink error. The existing test that asserted the old rejection is rewritten to assert that list/get/put/delete succeed through both link points.--deletesweep — resolved by 08fb67a in fix(claudecode): import nested subagents #3187 (invalid Markdown is skipped on import and excluded from the sweep). Valid but unmanaged nested agents are still swept; that is documented and matches the top-level behavior, so no change..mdfile under.rulesync/subagents/; the directory itself (""relative path), non-.mdpaths, paths with a dot-prefixed segment (skipped bylistandgenerate) and bare file names are rejected. Documented indocs/reference/mcp-server.md.docs/reference/file-formats.md: subdirectories of.rulesync/subagents/are now loaded.filePattern.startsWith("**/")replaced with an explicitsupportsNestedPathsmeta flag (claudecode, claudecode-legacy, kimi-code), with a test pinning the flag to the recursive patterns.name(both are still written).name; the flat-target skip now covers cursor, DeepAgents and Roo. The case-only path collision test (Review/Agent.mdvsreview/agent.md) already landed with fix(claudecode): import nested subagents #3187.Not in this PR
findFilesByGlobsalready dedupes results by real file, but two self-referencing links still make the walk grow until ELOOP. A depth cap needs a chosen limit (and silently drops deeper files), so it is left for a separate decision. HenceRefs #3227.Test plan
pnpm cicheckpasses locally.Refs #3227
🤖 Generated with Claude Code