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)
This commit is contained in:
@@ -83,6 +83,7 @@ export class BackgroundManager {
|
||||
agent: input.agent,
|
||||
tools: {
|
||||
task: false,
|
||||
call_omo_agent: false,
|
||||
background_task: false,
|
||||
},
|
||||
parts: [{ type: "text", text: input.prompt }],
|
||||
|
||||
@@ -124,8 +124,6 @@ async function executeSync(
|
||||
task: false,
|
||||
call_omo_agent: false,
|
||||
background_task: false,
|
||||
background_output: false,
|
||||
background_cancel: false,
|
||||
},
|
||||
parts: [{ type: "text", text: args.prompt }],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user