Skip to content

fix(tools): prevent composite disabled_toolsets from stripping explicitly enabled tools - #60273

Closed
isheng-eqi wants to merge 3 commits into
NousResearch:mainfrom
isheng-eqi:fix/disabled-toolset-preserve-enabled
Closed

fix(tools): prevent composite disabled_toolsets from stripping explicitly enabled tools#60273
isheng-eqi wants to merge 3 commits into
NousResearch:mainfrom
isheng-eqi:fix/disabled-toolset-preserve-enabled

Conversation

@isheng-eqi

Copy link
Copy Markdown
Contributor

What does this PR do?

Composite toolsets like safe and debugging re-list tools shared by other enabled toolsets. When a composite appears in disabled_toolsets, subtracting the full toolset silently strips tools from explicitly enabled toolsets — the model receives Tools: 0 with no warning, and tool calls fail silently.

The existing non-core-delta protection from #33924 covers hermes-* bundles and posture toolsets (coding) but missed safe and debugging — any composite with includes.

Related Issue

Fixes #58281

Type of Change

  • Bug fix

Changes Made

  • model_tools.py: Extend _compute_tool_definitions() to detect any composite toolset with includes — not just hermes-* and postures. Use bundle_non_core_tools() for these composites so shared tools from enabled toolsets are preserved.
  • tests/test_disabled_toolset_enabled_preservation.py: 6 tests covering debugging, safe, coding, hermes-cli, and edge cases

How to Test

  1. Set agent.enabled_toolsets: [terminal, file] and agent.disabled_toolsets: [debugging]
  2. Run hermes chat -v -q "run date in terminal"
  3. Verify the tool list is not empty and terminal tools work

@alt-glitch alt-glitch added type/bug Something isn't working comp/tools Tool registry, model_tools, toolsets area/config Config system, migrations, profiles P2 Medium — degraded but workaround exists labels Jul 7, 2026
@isheng-eqi
isheng-eqi force-pushed the fix/disabled-toolset-preserve-enabled branch from 4c96161 to 798abc5 Compare July 7, 2026 15:46
@isheng-eqi

Copy link
Copy Markdown
Contributor Author

Branch contaminated — rebuilding with clean base from upstream/main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles comp/tools Tool registry, model_tools, toolsets P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: [Bug]: Disabling the coding toolset silently strips explicitly-enabled terminal/file tools — model receives Tools: 0

2 participants