-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[Feature request] Per-agent tool visibility for custom sub-agents #1019
Description
Feature Request
Allow tools to be visible to a custom sub-agent but hidden from the main/parent agent. Currently, both availableTools and excludedTools are session-global and affect all agents equally.
Problem
The SDK runtime auto-delegates to a sub-agent when the main agent cannot handle the request (e.g., lacks the required tools). However, when both the main agent and sub-agent have access to the same tools, the main agent always handles directly, delegation never triggers.
There is no way to register a tool definition on the session (so the SDK has the schema) while hiding it from the main agent's tool list. The tools field on CustomAgentConfig can only restrict a sub-agent's view of globally-available tools; it cannot grant exclusive access.
What's been tried
| Approach | Result |
|---|---|
Remove tools from session tools |
SDK error "Unknown tool name" - no definition means nobody can call it |
excludedTools on session |
Tools blocked globally - sub-agent started but failed because it also couldn't call the excluded tools |
| System prompt instructions to "delegate" | LLM ignores - calls available tool directly |
| Rewriting tool descriptions with "MUST delegate" | LLM ignores - tool presence overpowers description text |
tools whitelist on CustomAgentConfig |
Only restricts sub-agent; main agent still has full access. Also affected by #947 for custom tool names |
Use case
There are subagents that use tools that generate a huge amount of context. For cases like this, the idea is to keep the main agent acting like an orchestrator, and keep its context clean and let the subagent consume its own context in isolation with those tools. The "large context generating" tools should not be invocable from the main agent to force delegation.
Versions
- SDK: @github/copilot-sdk 0.2.0 / 0.2.1
- Runtime: @github/copilot 1.0.17
##Related issues