Channels: add thread-aware model overrides

This commit is contained in:
Shadow
2026-02-20 19:26:25 -06:00
committed by GitHub
parent ee8dd40509
commit f555835b09
53 changed files with 1379 additions and 1398 deletions

View File

@@ -575,15 +575,14 @@ describe("buildSubagentSystemPrompt", () => {
expect(prompt).toContain("instead of full-file `cat`");
});
it("defaults to depth 1 and maxSpawnDepth 2 when not provided", () => {
it("defaults to depth 1 and maxSpawnDepth 1 when not provided", () => {
const prompt = buildSubagentSystemPrompt({
childSessionKey: "agent:main:subagent:abc",
task: "basic task",
});
// Default maxSpawnDepth is 2, so depth-1 subagents are orchestrators.
expect(prompt).toContain("## Sub-Agent Spawning");
expect(prompt).toContain("You CAN spawn your own sub-agents");
// Should not include spawning guidance (default maxSpawnDepth is 1, depth 1 is leaf)
expect(prompt).not.toContain("## Sub-Agent Spawning");
expect(prompt).toContain("spawned by the main agent");
});
});