fix(delegate-task): replace mutual exclusion throw with category-wins override

This commit is contained in:
Sami Jawhar
2026-03-29 14:58:56 +00:00
parent 3dc11ea620
commit 3905d07273
2 changed files with 14 additions and 13 deletions
+6 -3
View File
@@ -465,7 +465,7 @@ describe("sisyphus-task", () => {
expect(args.subagent_type).toBe("Sisyphus-Junior")
}, { timeout: 10000 })
test("rejects when both category and subagent_type are provided", async () => {
test("prefers category over subagent_type when both are provided", async () => {
//#given
const { createDelegateTask } = require("./tools")
@@ -516,8 +516,11 @@ describe("sisyphus-task", () => {
load_skills: [],
}
//#when + #then
await expect(tool.execute(args, toolContext)).rejects.toThrow("mutually exclusive")
//#when
await tool.execute(args, toolContext)
//#then - category takes precedence, subagent_type is overridden to sisyphus-junior
expect(args.subagent_type).toBe("Sisyphus-Junior")
}, { timeout: 10000 })
test("proceeds without error when systemDefaultModel is undefined", async () => {