diff --git a/src/agents/metis.ts b/src/agents/metis.ts index 4959d935c..4285696ed 100644 --- a/src/agents/metis.ts +++ b/src/agents/metis.ts @@ -296,7 +296,6 @@ const metisRestrictions = createAgentToolRestrictions([ "write", "edit", "apply_patch", - "task", ]) export function createMetisAgent(model: string): AgentConfig { diff --git a/src/agents/momus.ts b/src/agents/momus.ts index 0c5ea6496..d6891d75c 100644 --- a/src/agents/momus.ts +++ b/src/agents/momus.ts @@ -286,7 +286,6 @@ export function createMomusAgent(model: string): AgentConfig { "write", "edit", "apply_patch", - "task", ]); const base = { diff --git a/src/agents/tool-restrictions.test.ts b/src/agents/tool-restrictions.test.ts index 2ee0880d2..572429827 100644 --- a/src/agents/tool-restrictions.test.ts +++ b/src/agents/tool-restrictions.test.ts @@ -9,6 +9,7 @@ import { createMetisAgent } from "./metis" import { createAtlasAgent } from "./atlas" import { createSisyphusAgent } from "./sisyphus" import { createHephaestusAgent } from "./hephaestus" +import { getAgentToolRestrictions } from "../shared/agent-tool-restrictions" const TEST_MODEL = "anthropic/claude-sonnet-4-5" @@ -85,6 +86,19 @@ describe("read-only agent tool restrictions", () => { expect(permission[tool]).toBe("deny") } }) + + test("allows task delegation while remaining ineligible for team membership", () => { + // given + const agent = createMomusAgent(TEST_MODEL) + + // when + const permission = agent.permission as Record + const sessionRestrictions = getAgentToolRestrictions("momus") + + // then + expect(permission["task"]).toBeUndefined() + expect(sessionRestrictions["task"]).toBeUndefined() + }) }) describe("Metis", () => { @@ -100,6 +114,19 @@ describe("read-only agent tool restrictions", () => { expect(permission[tool]).toBe("deny") } }) + + test("allows task delegation while remaining ineligible for team membership", () => { + // given + const agent = createMetisAgent(TEST_MODEL) + + // when + const permission = agent.permission as Record + const sessionRestrictions = getAgentToolRestrictions("metis") + + // then + expect(permission["task"]).toBeUndefined() + expect(sessionRestrictions["task"]).toBeUndefined() + }) }) describe("Atlas", () => { diff --git a/src/shared/agent-tool-restrictions.ts b/src/shared/agent-tool-restrictions.ts index bf72de6d8..8bd7c4f88 100644 --- a/src/shared/agent-tool-restrictions.ts +++ b/src/shared/agent-tool-restrictions.ts @@ -28,13 +28,11 @@ const AGENT_RESTRICTIONS: Record> = { metis: { write: false, edit: false, - task: false, }, momus: { write: false, edit: false, - task: false, }, "multimodal-looker": {