We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec544c6 commit f2a4d8fCopy full SHA for f2a4d8f
packages/agent-runtime/src/main-prompt.ts
@@ -108,10 +108,10 @@ export async function mainPrompt(
108
throw new Error(`Agent template not found for type: ${agentType}`)
109
}
110
111
- const updatedSubagents = uniq([
112
- ...mainAgentTemplate.spawnableAgents,
113
- ...availableAgents,
114
- ])
+ const updatedSubagents = agentId
+ ? // Use only the spawnable agents from the main agent template if an agent ID is specified
+ mainAgentTemplate.spawnableAgents
+ : uniq([...mainAgentTemplate.spawnableAgents, ...availableAgents])
115
mainAgentTemplate.spawnableAgents = updatedSubagents
116
localAgentTemplates[agentType] = mainAgentTemplate
117
0 commit comments