Summary
When a session is created with customAgents defined, calling rpc.fleet.start() ignores the registered custom agents entirely. Sub-agents are dispatched as built-in types (explore, general-purpose, etc.), never as the custom agents registered in the session config.
Steps to Reproduce
const session = await client.createSession({
onPermissionRequest: async () => ({ approved: true }),
customAgents: [{
name: 'my-researcher',
displayName: 'My Researcher',
description: 'A custom agent that only reads files.',
prompt: 'You are a focused research agent. Only read files.',
tools: ['view', 'grep'],
infer: false,
}],
});
// Confirm registered:
const agentList = await session.rpc.agent.list();
// → { agents: [{ name: 'my-researcher', ... }] } ✓ registered
await session.rpc.fleet.start({ prompt: 'Research X in parallel' });
session.on('subagent.started', (data) => {
console.log(data.agentName);
// → 'explore' ← always built-in, never 'my-researcher'
});
Observed Behaviour
Fleet dispatches explore built-ins regardless of customAgents config. The custom agent is visible in rpc.agent.list() immediately before the fleet call, confirming registration is not the issue.
Spike data (2026-03-17):
{
"agentNamesObserved": ["explore", "explore"],
"subagentCount": 2,
"answer": "PARTIAL — dispatched built-in names, not custom names"
}
Expected Behaviour
One of:
fleet.start() uses custom agents when registered in the session
fleet.start() accepts agentNames: string[] to specify which agents to dispatch
- Documentation clarifies fleet only uses built-in types (so callers know not to expect otherwise)
Impact
- Custom agent tool restrictions (
customAgents[n].tools) cannot be applied to fleet workers
- Custom system prompts are ignored during fleet
- Fleet workers always get unrestricted built-in agent capabilities regardless of session config
Environment
- SDK:
@github/copilot-sdk v0.1.32
- CLI: latest
- Node: v24.13.1
Summary
When a session is created with
customAgentsdefined, callingrpc.fleet.start()ignores the registered custom agents entirely. Sub-agents are dispatched as built-in types (explore,general-purpose, etc.), never as the custom agents registered in the session config.Steps to Reproduce
Observed Behaviour
Fleet dispatches
explorebuilt-ins regardless ofcustomAgentsconfig. The custom agent is visible inrpc.agent.list()immediately before the fleet call, confirming registration is not the issue.Spike data (2026-03-17):
{ "agentNamesObserved": ["explore", "explore"], "subagentCount": 2, "answer": "PARTIAL — dispatched built-in names, not custom names" }Expected Behaviour
One of:
fleet.start()uses custom agents when registered in the sessionfleet.start()acceptsagentNames: string[]to specify which agents to dispatchImpact
customAgents[n].tools) cannot be applied to fleet workersEnvironment
@github/copilot-sdkv0.1.32