From ed76c502c345dd994e4f7dbd78946d0011b46905 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Sun, 14 Dec 2025 11:54:36 +0900 Subject: [PATCH] feat(background-agent): restrict tool access in subagent execution to prevent recursive calls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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) --- src/features/background-agent/manager.ts | 1 + src/tools/call-omo-agent/tools.ts | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/features/background-agent/manager.ts b/src/features/background-agent/manager.ts index a7c86d2..a3e64bb 100644 --- a/src/features/background-agent/manager.ts +++ b/src/features/background-agent/manager.ts @@ -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 }], diff --git a/src/tools/call-omo-agent/tools.ts b/src/tools/call-omo-agent/tools.ts index f6c0ef2..2886e36 100644 --- a/src/tools/call-omo-agent/tools.ts +++ b/src/tools/call-omo-agent/tools.ts @@ -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 }], },