Skip to content

Commit a103899

Browse files
committed
Allow base agent to spawn any agent
1 parent af85eb3 commit a103899

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

backend/src/tools/handlers/tool/spawn-agent-utils.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,11 @@ export async function validateAndGetAgentTemplate(
173173
if (!agentTemplate) {
174174
throw new Error(`Agent type ${agentTypeStr} not found.`)
175175
}
176+
const BASE_AGENTS = ['base', 'base-lite', 'base-max', 'base-experimental']
177+
// Base agent can spawn any agent
178+
if (BASE_AGENTS.includes(parentAgentTemplate.id)) {
179+
return { agentTemplate, agentType: agentTypeStr }
180+
}
176181

177182
const agentType = getMatchingSpawn(
178183
parentAgentTemplate.spawnableAgents,

0 commit comments

Comments
 (0)