-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
P2High value, medium complexityHigh value, medium complexitytestingTests and qualityTests and qualitytoolsTool execution and MCP integrationTool execution and MCP integration
Description
Problem
The dynamic tool schema filtering feature (#2020, PR #2026) added 752 lines across 17 files with a new ToolSchemaFilter struct, embedding-based tool selection, and config-driven always-on list. Despite thorough unit tests, the feature has zero live agent session coverage.
The feature is disabled in .local/config/testing.toml (no [agent.tool_filter] section with enabled = true).
Evidence
- CI-16 session (2026-03-20):
grep 'tool schema filter' .local/testing/debug/session-ci16.log— empty - Code path in
assembly.rs: only fires whenself.tool_schema_filter.is_some(), which requires config opt-in maybe_init_tool_schema_filter()returns early whenconfig.enabled == false
Impact
Untested aspects:
- Graceful degradation when embed() fails at startup (all tools fallback)
send_status("filtering tools...")spinner visibility in CLI/TUINoEmbeddingfallback for late MCP tool registration- Actual token reduction in real sessions (the stated goal of research(tools): dynamic tool schema filtering to reduce context waste and improve selection accuracy #2020)
- Interaction with MCP tool registration after startup
- Top-K selection behavior with real tool descriptions
Proposed Fix
Add a live test session with [agent.tool_filter] enabled = true to validate the path. This requires an embedding-capable provider (OpenAI is available in testing config).
Optionally, enable the filter in .local/config/testing.toml:
[agent.tool_filter]
enabled = true
top_k = 5
always_on = ["memory_save", "memory_search", "shell"]Note: enabling this in testing.toml will add latency at startup (embeds all tool descriptions).
Related
- Feature PR: feat(tools): dynamic tool schema filtering to reduce context waste and improve selection accuracy (#2020) #2026
- Issue: research(tools): dynamic tool schema filtering to reduce context waste and improve selection accuracy #2020
- Status command gap: enh(tools): /status should report tool_filter state when enabled #2028 (tool_filter state not shown in /status)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2High value, medium complexityHigh value, medium complexitytestingTests and qualityTests and qualitytoolsTool execution and MCP integrationTool execution and MCP integration