feat(delegate): remove model-facing toolsets arg — subagents inherit parent's - #56386
Merged
Conversation
…nherit parent's The model could pass `toolsets` (top-level and per-task) to delegate_task, letting it choose which toolsets a subagent got. Toolset selection is a capability-scoping decision the model should not control; subagents inherit the parent's enabled toolsets, period. - Remove `toolsets` from the delegate_task() signature, the registry handler, the top-level + per-task JSON schema, and the live dispatch path (run_agent._dispatch_delegate_task — this forwarded it on every model call). - Single-task and per-task child builds now pass toolsets=None so _build_child_agent resolves to pure parent inheritance. - Drop the now-dead _SUBAGENT_TOOLSETS / _TOOLSET_LIST_STR schema-hint block. - _build_child_agent keeps its internal toolsets param + intersection helpers (internal API; fed the inherited value only). - Tests: schema assertions flipped to assertNotIn; added a regression test proving the dispatch path never forwards a smuggled model `toolsets`. - Docs: update delegate_task signature refs in the autonomous-ai-agents skill.
This was referenced Jul 1, 2026
Closed
This was referenced Jul 1, 2026
13 tasks
waefrebeorn
pushed a commit
to waefrebeorn/slermes
that referenced
this pull request
Jul 2, 2026
…nherit parent's (NousResearch#56386) The model could pass `toolsets` (top-level and per-task) to delegate_task, letting it choose which toolsets a subagent got. Toolset selection is a capability-scoping decision the model should not control; subagents inherit the parent's enabled toolsets, period. - Remove `toolsets` from the delegate_task() signature, the registry handler, the top-level + per-task JSON schema, and the live dispatch path (run_agent._dispatch_delegate_task — this forwarded it on every model call). - Single-task and per-task child builds now pass toolsets=None so _build_child_agent resolves to pure parent inheritance. - Drop the now-dead _SUBAGENT_TOOLSETS / _TOOLSET_LIST_STR schema-hint block. - _build_child_agent keeps its internal toolsets param + intersection helpers (internal API; fed the inherited value only). - Tests: schema assertions flipped to assertNotIn; added a regression test proving the dispatch path never forwards a smuggled model `toolsets`. - Docs: update delegate_task signature refs in the autonomous-ai-agents skill.
Jasper6439
pushed a commit
to Jasper6439/hermes-agent
that referenced
this pull request
Jul 5, 2026
…nherit parent's (NousResearch#56386) The model could pass `toolsets` (top-level and per-task) to delegate_task, letting it choose which toolsets a subagent got. Toolset selection is a capability-scoping decision the model should not control; subagents inherit the parent's enabled toolsets, period. - Remove `toolsets` from the delegate_task() signature, the registry handler, the top-level + per-task JSON schema, and the live dispatch path (run_agent._dispatch_delegate_task — this forwarded it on every model call). - Single-task and per-task child builds now pass toolsets=None so _build_child_agent resolves to pure parent inheritance. - Drop the now-dead _SUBAGENT_TOOLSETS / _TOOLSET_LIST_STR schema-hint block. - _build_child_agent keeps its internal toolsets param + intersection helpers (internal API; fed the inherited value only). - Tests: schema assertions flipped to assertNotIn; added a regression test proving the dispatch path never forwards a smuggled model `toolsets`. - Docs: update delegate_task signature refs in the autonomous-ai-agents skill.
habarmc1223-sudo
pushed a commit
to habarmc1223-sudo/hermes-agent-fluxmem
that referenced
this pull request
Jul 8, 2026
…nherit parent's (NousResearch#56386) The model could pass `toolsets` (top-level and per-task) to delegate_task, letting it choose which toolsets a subagent got. Toolset selection is a capability-scoping decision the model should not control; subagents inherit the parent's enabled toolsets, period. - Remove `toolsets` from the delegate_task() signature, the registry handler, the top-level + per-task JSON schema, and the live dispatch path (run_agent._dispatch_delegate_task — this forwarded it on every model call). - Single-task and per-task child builds now pass toolsets=None so _build_child_agent resolves to pure parent inheritance. - Drop the now-dead _SUBAGENT_TOOLSETS / _TOOLSET_LIST_STR schema-hint block. - _build_child_agent keeps its internal toolsets param + intersection helpers (internal API; fed the inherited value only). - Tests: schema assertions flipped to assertNotIn; added a regression test proving the dispatch path never forwards a smuggled model `toolsets`. - Docs: update delegate_task signature refs in the autonomous-ai-agents skill.
santhreal
pushed a commit
to santhreal/hermes-agent
that referenced
this pull request
Jul 13, 2026
…nherit parent's (NousResearch#56386) The model could pass `toolsets` (top-level and per-task) to delegate_task, letting it choose which toolsets a subagent got. Toolset selection is a capability-scoping decision the model should not control; subagents inherit the parent's enabled toolsets, period. - Remove `toolsets` from the delegate_task() signature, the registry handler, the top-level + per-task JSON schema, and the live dispatch path (run_agent._dispatch_delegate_task — this forwarded it on every model call). - Single-task and per-task child builds now pass toolsets=None so _build_child_agent resolves to pure parent inheritance. - Drop the now-dead _SUBAGENT_TOOLSETS / _TOOLSET_LIST_STR schema-hint block. - _build_child_agent keeps its internal toolsets param + intersection helpers (internal API; fed the inherited value only). - Tests: schema assertions flipped to assertNotIn; added a regression test proving the dispatch path never forwards a smuggled model `toolsets`. - Docs: update delegate_task signature refs in the autonomous-ai-agents skill.
19 tasks
Gravezzz
pushed a commit
to Gravezzz/hermes-agent
that referenced
this pull request
Jul 21, 2026
…nherit parent's (NousResearch#56386) The model could pass `toolsets` (top-level and per-task) to delegate_task, letting it choose which toolsets a subagent got. Toolset selection is a capability-scoping decision the model should not control; subagents inherit the parent's enabled toolsets, period. - Remove `toolsets` from the delegate_task() signature, the registry handler, the top-level + per-task JSON schema, and the live dispatch path (run_agent._dispatch_delegate_task — this forwarded it on every model call). - Single-task and per-task child builds now pass toolsets=None so _build_child_agent resolves to pure parent inheritance. - Drop the now-dead _SUBAGENT_TOOLSETS / _TOOLSET_LIST_STR schema-hint block. - _build_child_agent keeps its internal toolsets param + intersection helpers (internal API; fed the inherited value only). - Tests: schema assertions flipped to assertNotIn; added a regression test proving the dispatch path never forwards a smuggled model `toolsets`. - Docs: update delegate_task signature refs in the autonomous-ai-agents skill.
SasugaTV
pushed a commit
to SasugaTV/hermes-agent
that referenced
this pull request
Jul 21, 2026
Upstream ba0bc01 (NousResearch#56386) removed the model-facing toolsets arg from delegate_task on the grounds that toolset selection should not be a model-controlled surface. This fork intentionally keeps it (see patch/delegate-task-model-toolsets) so a manager agent can narrow a delegated sub-agent tool surface. Flip the two regression tests upstream added to assert the fork intended behavior instead of permanently failing.
leewenjie
pushed a commit
to leewenjie/hermes-agent
that referenced
this pull request
Aug 7, 2026
…nherit parent's (NousResearch#56386) The model could pass `toolsets` (top-level and per-task) to delegate_task, letting it choose which toolsets a subagent got. Toolset selection is a capability-scoping decision the model should not control; subagents inherit the parent's enabled toolsets, period. - Remove `toolsets` from the delegate_task() signature, the registry handler, the top-level + per-task JSON schema, and the live dispatch path (run_agent._dispatch_delegate_task — this forwarded it on every model call). - Single-task and per-task child builds now pass toolsets=None so _build_child_agent resolves to pure parent inheritance. - Drop the now-dead _SUBAGENT_TOOLSETS / _TOOLSET_LIST_STR schema-hint block. - _build_child_agent keeps its internal toolsets param + intersection helpers (internal API; fed the inherited value only). - Tests: schema assertions flipped to assertNotIn; added a regression test proving the dispatch path never forwards a smuggled model `toolsets`. - Docs: update delegate_task signature refs in the autonomous-ai-agents skill.
counterposition
added a commit
to counterposition/hermes-agent
that referenced
this pull request
Aug 14, 2026
…Research#56386 Upstream ba0bc01 (NousResearch#56386) removed the model-facing delegate_task toolsets= arg and deleted _SUBAGENT_TOOLSETS entirely -- subagents now unconditionally inherit the parent's enabled toolsets. The fork's repo-read availability test (added alongside the repo-read toolset in 24356ef48) imported the now-deleted symbol and broke post-rebase. Rewrite the assertion against the mechanism that replaced it: repo-read must survive _strip_blocked_tools(), the filter subagents' inherited toolsets pass through. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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