core: add verification that at least 1 primary agent is enabled, add regression tests (#5881)

This commit is contained in:
Aiden Cline 2025-12-20 19:36:22 -08:00 • committed by GitHub
commit d3922f0965
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -262,6 +262,14 @@ export namespace Agent {
}
}
const hasPrimaryAgents = Object.values(result).filter((a) => a.mode !== "subagent" && !a.hidden).length > 0
if (!hasPrimaryAgents) {
throw new Config.InvalidError({
path: "config",
message: "No primary agents are available. Please configure at least one agent with mode 'primary' or 'all'.",
})
}
return result
})