feat(delegate): remove model-facing toolsets arg — subagents inherit parent's - #332
Merged
Conversation
|
Review Complete Risk: 🟡 Medium (40/100) — no findings · 281 LOC across 7 files PR #332 removes the Files Reviewed (7 files) |
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
The model can no longer choose which toolsets a subagent gets — subagents always inherit the parent's enabled toolsets.
delegate_taskexposed a model-controllabletoolsetsarg (top-level and per-task) that let the model select the subagent's capability set. Toolset selection is a capability-scoping decision the model shouldn't make; the parent's toolset is the authoritative floor.Changes
tools/delegate_tool.py: removetoolsetsfrom thedelegate_task()signature, the registry handler, and both JSON schema blocks (top-level + per-task). Single-task and per-task child builds passtoolsets=None→ pure parent inheritance. Drop the now-dead_SUBAGENT_TOOLSETS/_TOOLSET_LIST_STRschema-hint block.run_agent.py:_dispatch_delegate_task(the live model path) no longer forwardstoolsets— it did on every delegation, so this is the load-bearing removal._build_child_agentkeeps its internaltoolsetsparam + intersection helpers (internal API, fed only the inherited value).assertNotIn; new regression test proves the dispatch path never forwards a smuggled modeltoolsets.delegate_tasksignature references in the autonomous-ai-agents skill (+ built docs, en/zh).Validation
toolsetsin schemadelegate_task(toolsets=...)TypeErrortests/tools/test_delegate.py+test_async_delegation.pyTargeted tests green (171/171). E2E verified with real imports: static + dynamic schema clean, public signature rejects
toolsets, internal inheritance machinery intact.Infographic
Mirror-of: NousResearch#56386
NousResearch#56386