fix(sandbox): restore spawned workspace handoff (#44307)

This commit is contained in:
Marcus Castro
2026-03-12 16:12:08 -03:00
committed by GitHub
parent 4ca84acf24
commit e525957b4f
2 changed files with 5 additions and 0 deletions

View File

@@ -1502,6 +1502,10 @@ export async function runEmbeddedAttempt(
runId: params.runId,
agentDir,
workspaceDir: effectiveWorkspace,
// When sandboxing uses a copied workspace (`ro` or `none`), effectiveWorkspace points
// at the sandbox copy. Spawned subagents should inherit the real workspace instead.
spawnWorkspaceDir:
sandbox?.enabled && sandbox.workspaceAccess !== "rw" ? resolvedWorkspace : undefined,
config: params.config,
abortSignal: runAbortController.signal,
modelProvider: params.model.provider,