fix(run): inherit main-session tool permissions for continuation prompts

This commit is contained in:
YeonGyu-Kim
2026-02-18 18:02:42 +09:00
parent 80bb262066
commit dba7a1e07c
17 changed files with 297 additions and 28 deletions
@@ -56,7 +56,7 @@ export async function notifyParentSession(
completedTasks,
})
const { agent, model } = await resolveParentSessionAgentAndModel({ client, task })
const { agent, model, tools } = await resolveParentSessionAgentAndModel({ client, task })
log("[background-agent] notifyParentSession context:", {
taskId: task.id,
@@ -71,7 +71,7 @@ export async function notifyParentSession(
noReply: !allComplete,
...(agent !== undefined ? { agent } : {}),
...(model !== undefined ? { model } : {}),
...(task.parentTools ? { tools: task.parentTools } : {}),
...(tools ? { tools } : {}),
parts: [{ type: "text", text: notification }],
},
})