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:
YeonGyu-Kim
2025-12-14 11:54:36 +09:00
parent 0fcfe21b27
commit d1a527c700
2 changed files with 4 additions and 3 deletions

View File

@@ -82,10 +82,8 @@ export class BackgroundManager {
body: {
agent: input.agent,
tools: {
task: false,
background_task: false,
background_output: false,
background_cancel: false,
call_omo_agent: false,
},
parts: [{ type: "text", text: input.prompt }],
},

View File

@@ -123,6 +123,9 @@ async function executeSync(
tools: {
task: false,
call_omo_agent: false,
background_task: false,
background_output: false,
background_cancel: false,
},
parts: [{ type: "text", text: args.prompt }],
},