diff --git a/src/agents/builtin-agents/sisyphus-agent.test.ts b/src/agents/builtin-agents/sisyphus-agent.test.ts index b32ede5af..0f42a26b6 100644 --- a/src/agents/builtin-agents/sisyphus-agent.test.ts +++ b/src/agents/builtin-agents/sisyphus-agent.test.ts @@ -109,6 +109,40 @@ describe("maybeCreateSisyphusConfig", () => { }); }); + describe("#given dotted Opus 4.7 model with user override allowing grep and glob", () => { + test("#when config is created #then grep and glob are still denied", () => { + // given + const agentOverrides: AgentOverrides = { + sisyphus: { + model: "anthropic/claude-opus-4.7", + permission: { + grep: "allow", + glob: "allow", + } as Record, + }, + }; + const mergedCategories: Record = {}; + + // when + const config = maybeCreateSisyphusConfig({ + disabledAgents: [], + agentOverrides, + availableModels: new Set(["anthropic/claude-opus-4.7"]), + systemDefaultModel: "anthropic/claude-opus-4.7", + isFirstRunNoCache: false, + availableAgents: [], + availableSkills: [], + availableCategories: [], + mergedCategories, + useTaskSystem: false, + }); + + // then + expect(config?.permission).toHaveProperty("grep", "deny"); + expect(config?.permission).toHaveProperty("glob", "deny"); + }); + }); + describe("#given GPT 5.5 model with user override allowing grep and glob", () => { test("#when config is created #then grep and glob are still denied", () => { // given diff --git a/src/agents/frontier-tool-schema-guard.ts b/src/agents/frontier-tool-schema-guard.ts index 68158149a..b64e45d10 100644 --- a/src/agents/frontier-tool-schema-guard.ts +++ b/src/agents/frontier-tool-schema-guard.ts @@ -7,7 +7,8 @@ type MutablePermission = Record { diff --git a/src/agents/hephaestus/agent.test.ts b/src/agents/hephaestus/agent.test.ts index ca1d65c01..4d41d95b8 100644 --- a/src/agents/hephaestus/agent.test.ts +++ b/src/agents/hephaestus/agent.test.ts @@ -451,6 +451,40 @@ describe("maybeCreateHephaestusConfig GPT apply_patch guard", () => { }); }); + describe("#given dotted Opus 4.7 model with user override allowing grep and glob", () => { + test("#when config is created #then grep and glob are still denied", () => { + // given + const agentOverrides: AgentOverrides = { + hephaestus: { + model: "anthropic/claude-opus-4.7", + permission: { + grep: "allow", + glob: "allow", + } as Record, + }, + }; + const mergedCategories: Record = {}; + + // when + const config = maybeCreateHephaestusConfig({ + disabledAgents: [], + agentOverrides, + availableModels: new Set(["anthropic/claude-opus-4.7"]), + systemDefaultModel: "anthropic/claude-opus-4.7", + isFirstRunNoCache: false, + availableAgents: [], + availableSkills: [], + availableCategories: [], + mergedCategories, + useTaskSystem: false, + }); + + // then + expect(config?.permission).toHaveProperty("grep", "deny"); + expect(config?.permission).toHaveProperty("glob", "deny"); + }); + }); + describe("#given GPT 5.5 model with user override allowing grep and glob", () => { test("#when config is created #then grep and glob are still denied", () => { // given diff --git a/src/agents/tool-restrictions.test.ts b/src/agents/tool-restrictions.test.ts index 1d0fed4fd..2ee0880d2 100644 --- a/src/agents/tool-restrictions.test.ts +++ b/src/agents/tool-restrictions.test.ts @@ -140,8 +140,10 @@ describe("read-only agent tool restrictions", () => { // given const frontierAgents = [ createSisyphusAgent("anthropic/claude-opus-4-7"), + createSisyphusAgent("anthropic/claude-opus-4.7"), createSisyphusAgent("openai/gpt-5.5"), createHephaestusAgent("anthropic/claude-opus-4-7"), + createHephaestusAgent("anthropic/claude-opus-4.7"), createHephaestusAgent("openai/gpt-5.5"), ]