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:
@@ -4,6 +4,7 @@ import { getTimingConfig } from "./timing"
|
||||
import { storeToolMetadata } from "../../features/tool-metadata-store"
|
||||
import { formatDuration } from "./time-formatter"
|
||||
import { formatDetailedError } from "./error-formatting"
|
||||
import { getSessionTools } from "../../shared/session-tools-store"
|
||||
|
||||
export async function executeUnstableAgentTask(
|
||||
args: DelegateTaskArgs,
|
||||
@@ -26,6 +27,7 @@ export async function executeUnstableAgentTask(
|
||||
parentMessageID: parentContext.messageID,
|
||||
parentModel: parentContext.model,
|
||||
parentAgent: parentContext.agent,
|
||||
parentTools: getSessionTools(parentContext.sessionID),
|
||||
model: categoryModel,
|
||||
skills: args.load_skills.length > 0 ? args.load_skills : undefined,
|
||||
skillContent: systemContent,
|
||||
|
||||
Reference in New Issue
Block a user