fix: inherit parent session tool restrictions in background task notifications

Pass parentTools from session-tools-store through the background task
lifecycle (launch → task → notify) so that when notifyParentSession
sends promptAsync, the original tool restrictions (e.g., question: false)
are preserved. This prevents the Question tool from re-enabling after
call_omo_agent background tasks complete.
This commit is contained in:
YeonGyu-Kim
2026-02-14 14:30:30 +09:00
parent f20e1aa0d0
commit 8514906c3d
7 changed files with 37 additions and 12 deletions
@@ -5,6 +5,7 @@ import { log } from "../../shared"
import type { CallOmoAgentArgs } from "./types"
import type { ToolContextWithMetadata } from "./tool-context-with-metadata"
import { getMessageDir } from "./message-storage-directory"
import { getSessionTools } from "../../shared/session-tools-store"
export async function executeBackgroundAgent(
args: CallOmoAgentArgs,
@@ -36,6 +37,7 @@ export async function executeBackgroundAgent(
parentSessionID: toolContext.sessionID,
parentMessageID: toolContext.messageID,
parentAgent,
parentTools: getSessionTools(toolContext.sessionID),
})
const waitStart = Date.now()