Skip to content

Commit d68f90f

Browse files
feat(agents): enable call_omo_agent for Sisyphus-Junior subagents
Allow Sisyphus-Junior (category-based tasks) to spawn explore/librarian agents via call_omo_agent for research capabilities. Changes: - Remove call_omo_agent from BLOCKED_TOOLS in sisyphus-junior.ts - Update prompt to show ALLOWED status for call_omo_agent - Remove global call_omo_agent blocking in config-handler.ts - Keep blocking for orchestrator-sisyphus (use sisyphus_task instead) - Keep runtime recursion prevention in index.ts for explore/librarian Co-authored-by: Sisyphus <[email protected]>
1 parent e6e25e6 commit d68f90f

File tree

4 files changed

+17
-23
lines changed

4 files changed

+17
-23
lines changed

src/agents/sisyphus-junior.test.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ describe("createSisyphusJuniorAgentWithOverrides", () => {
138138
})
139139
})
140140

141-
describe("tool safety (blocked tools enforcement)", () => {
142-
test("blocked tools remain blocked even if override tries to enable them via tools format", () => {
141+
describe("tool safety (task/sisyphus_task blocked, call_omo_agent allowed)", () => {
142+
test("task and sisyphus_task remain blocked, call_omo_agent is allowed via tools format", () => {
143143
// #given
144144
const override = {
145145
tools: {
@@ -159,17 +159,19 @@ describe("createSisyphusJuniorAgentWithOverrides", () => {
159159
if (tools) {
160160
expect(tools.task).toBe(false)
161161
expect(tools.sisyphus_task).toBe(false)
162-
expect(tools.call_omo_agent).toBe(false)
162+
// call_omo_agent is NOW ALLOWED for subagents to spawn explore/librarian
163+
expect(tools.call_omo_agent).toBe(true)
163164
expect(tools.read).toBe(true)
164165
}
165166
if (permission) {
166167
expect(permission.task).toBe("deny")
167168
expect(permission.sisyphus_task).toBe("deny")
168-
expect(permission.call_omo_agent).toBe("deny")
169+
// call_omo_agent is NOW ALLOWED for subagents to spawn explore/librarian
170+
expect(permission.call_omo_agent).toBe("allow")
169171
}
170172
})
171173

172-
test("blocked tools remain blocked when using permission format override", () => {
174+
test("task and sisyphus_task remain blocked when using permission format override", () => {
173175
// #given
174176
const override = {
175177
permission: {
@@ -183,18 +185,18 @@ describe("createSisyphusJuniorAgentWithOverrides", () => {
183185
// #when
184186
const result = createSisyphusJuniorAgentWithOverrides(override as Parameters<typeof createSisyphusJuniorAgentWithOverrides>[0])
185187

186-
// #then - blocked tools should be denied regardless
188+
// #then - task/sisyphus_task blocked, but call_omo_agent allowed for explore/librarian spawning
187189
const tools = result.tools as Record<string, boolean> | undefined
188190
const permission = result.permission as Record<string, string> | undefined
189191
if (tools) {
190192
expect(tools.task).toBe(false)
191193
expect(tools.sisyphus_task).toBe(false)
192-
expect(tools.call_omo_agent).toBe(false)
194+
expect(tools.call_omo_agent).toBe(true)
193195
}
194196
if (permission) {
195197
expect(permission.task).toBe("deny")
196198
expect(permission.sisyphus_task).toBe("deny")
197-
expect(permission.call_omo_agent).toBe("deny")
199+
expect(permission.call_omo_agent).toBe("allow")
198200
}
199201
})
200202
})

src/agents/sisyphus-junior.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@ Execute tasks directly. NEVER delegate or spawn other agents.
1515
<Critical_Constraints>
1616
BLOCKED ACTIONS (will fail if attempted):
1717
- task tool: BLOCKED
18-
- sisyphus_task tool: BLOCKED
19-
- sisyphus_task tool: BLOCKED (already blocked above, but explicit)
20-
- call_omo_agent tool: BLOCKED
18+
- sisyphus_task tool: BLOCKED
2119
22-
You work ALONE. No delegation. No background tasks. Execute directly.
20+
ALLOWED: call_omo_agent - You CAN spawn explore/librarian agents for research.
21+
You work ALONE for implementation. No delegation of implementation tasks.
2322
</Critical_Constraints>
2423
2524
<Work_Context>
@@ -76,7 +75,8 @@ function buildSisyphusJuniorPrompt(promptAppend?: string): string {
7675
}
7776

7877
// Core tools that Sisyphus-Junior must NEVER have access to
79-
const BLOCKED_TOOLS = ["task", "sisyphus_task", "call_omo_agent"]
78+
// Note: call_omo_agent is ALLOWED so subagents can spawn explore/librarian
79+
const BLOCKED_TOOLS = ["task", "sisyphus_task"]
8080

8181
export const SISYPHUS_JUNIOR_DEFAULTS = {
8282
model: "anthropic/claude-sonnet-4-5",
@@ -106,6 +106,7 @@ export function createSisyphusJuniorAgentWithOverrides(
106106
for (const tool of BLOCKED_TOOLS) {
107107
merged[tool] = "deny"
108108
}
109+
merged.call_omo_agent = "allow"
109110
toolsConfig = { permission: { ...merged, ...basePermission } }
110111
} else {
111112
const userTools = override?.tools ?? {}
@@ -114,6 +115,7 @@ export function createSisyphusJuniorAgentWithOverrides(
114115
for (const tool of BLOCKED_TOOLS) {
115116
merged[tool] = false
116117
}
118+
merged.call_omo_agent = true
117119
toolsConfig = { tools: { ...merged, ...baseTools } }
118120
}
119121

src/plugin-handlers/config-handler.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -283,27 +283,18 @@ export function createConfigHandler(deps: ConfigHandlerDeps) {
283283
config.tools = {
284284
...(config.tools as Record<string, unknown>),
285285
"grep_app_*": false,
286-
call_omo_agent: false,
287286
};
288287

289-
if (agentResult.explore) {
290-
agentResult.explore.tools = {
291-
...agentResult.explore.tools,
292-
call_omo_agent: false,
293-
};
294-
}
295288
if (agentResult.librarian) {
296289
agentResult.librarian.tools = {
297290
...agentResult.librarian.tools,
298-
call_omo_agent: false,
299291
"grep_app_*": true,
300292
};
301293
}
302294
if (agentResult["multimodal-looker"]) {
303295
agentResult["multimodal-looker"].tools = {
304296
...agentResult["multimodal-looker"].tools,
305297
task: false,
306-
call_omo_agent: false,
307298
look_at: false,
308299
};
309300
}

src/tools/call-omo-agent/tools.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ async function executeSync(
176176
agent: args.subagent_type,
177177
tools: {
178178
task: false,
179-
call_omo_agent: false,
180179
sisyphus_task: false,
181180
},
182181
parts: [{ type: "text", text: args.prompt }],

0 commit comments

Comments
 (0)