Allow parent-child agents to always see and message each other#723
Merged
Conversation
…comment - Add tests for senderRepoRoot=null + parent/child (the primary path the null-guard removal unlocked, previously untested) - Add comment documenting the trust assumption on parentAgentId Co-Authored-By: Claude Opus 4.6 <[email protected]>
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
addressableAgents(), so spawned agents can coordinate with their parent regardless of which git repository each is working insenderRepoRootnull guards fromsendMessageandlistAgentsForAgent— parent/child matches don't require a resolvable repo rootDetails
Previously, agents could only see/message other agents in the same git repository unless the global "cross-repo messaging" toggle was enabled. This meant a parent agent that launched a child into a different repo couldn't communicate with it without turning on the global setting.
Now the
addressableAgents()function — the single visibility boundary for bothlist_agentsanddispatch_send_message— checks for direct parent/child relationships before applying repo-root filtering. Only one-hop relationships qualify (grandchildren are excluded by design).Test plan
mcp-handlers.test.ts(8 new)pnpm run checkpassessettings.spec.tspasses (cross-repo toggle still works)🤖 Generated with Claude Code