Skip to content

Commit ed76c50

Browse files
committed
feat(background-agent): restrict tool access in subagent execution to prevent recursive calls
- Disable 'task' and 'call_omo_agent' tools in BackgroundManager - Disable recursive background operation tools in call_omo_agent sync execution - Prevents agents from spawning background tasks or calling themselves 🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
1 parent c4f2b63 commit ed76c50

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/features/background-agent/manager.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ export class BackgroundManager {
8383
agent: input.agent,
8484
tools: {
8585
task: false,
86+
call_omo_agent: false,
8687
background_task: false,
8788
},
8889
parts: [{ type: "text", text: input.prompt }],

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,6 @@ async function executeSync(
124124
task: false,
125125
call_omo_agent: false,
126126
background_task: false,
127-
background_output: false,
128-
background_cancel: false,
129127
},
130128
parts: [{ type: "text", text: args.prompt }],
131129
},

0 commit comments

Comments
 (0)