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