Propagate workspace roots into subagent sessions
Subagents (task tool) now inherit the parent session's additionalDirectories via ToolSession → ExecutorOptions → CreateAgentSessionOptions, so delegated agents see the same <workspace-roots> block and can read/grep/glob added roots. Co-authored-by: oh-my-pi <https://omp.sh>
This commit is contained in:
co-authored by
oh-my-pi <https://omp.sh>
parent
c24cb606a8
commit
ffe50650e1
@@ -371,6 +371,7 @@ function buildExecutorOptions(
|
||||
const enableMCP = !policy.planMode && (session.enableMCP ?? true);
|
||||
return {
|
||||
cwd: session.cwd,
|
||||
additionalDirectories: session.additionalDirectories,
|
||||
agent: policy.effectiveAgent,
|
||||
task: renderSubagentPrompt(request.assignment),
|
||||
assignment: request.assignment.trim(),
|
||||
|
||||
Reference in New Issue
Block a user