Repository navigation
fix(subagents): address MCP subagents follow-ups from #3232 review - #3253
Merged
Merged
Conversation
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
Only the intended symlink and outside-root skips are logged at debug level, and the docs warning now mentions directory creation and reads. 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.
Closes #3241
Summary
warnAboutDuplicateNamesnow runs after conversion and keys onToolSubagent.getImportIdentity(), so akimi-code.nameoverride (and Kimi's lowercasing) is taken into account. A test covers two nested Kimi agents that clash only through the override. Note: Kimi Code's name schema rejects uppercase, so aReviewer/reviewerpair cannot reach the warning (the conversion already fails); the override case is the reachable one.supportsNestedPathstest checks both directions. Targets flagged withsupportsNestedPathsmust equal the targets whosefilePatternstarts with**/.docs/reference/mcp-server.mdnow warns that MCPsubagentput/deletefollow a symlinked.rulesynceven outside the project. No runtime warning was added: the MCP module logger is constructed withsilent: true, so a warning would never surface.list. An intentionally skipped symlinked entry below.rulesync/subagents/is logged at debug level instead oferror(whichConsoleLoggerprints even when silent). Real read failures still log aterror.putSubagenton main already re-checks the path after eachensureDirand right before writing, so the remaining window is only between the final check andwriteFileContent(and check →removeFilein delete). Closing it fully needsO_NOFOLLOW-style opens in the sharedwriteFileContent/removeFilehelpers insrc/utils/file.ts, which is a codebase-wide, POSIX-specific change outside the scope of this small follow-up.Test plan
pnpm cicheck🤖 Generated with Claude Code
https://claude.ai/code/session_01Y4MwhqMc6s4ct5MzMReGJj