feat(plugin-sdk): also thread agentId into environmentResumeLease params

Symmetric with the acquireLease change. Lets plugin-backed sandbox
providers reject a reusable lease whose stored agentId doesn't match
the current run's agent, forcing the host to acquire a fresh lease
instead of stomping the previous agent's workspace state.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-12 07:36:08 -04:00
parent 417782a6ec
commit 73f4685729
2 changed files with 9 additions and 0 deletions
@@ -476,6 +476,7 @@ function createSandboxEnvironmentDriver(
config: workerConfig,
providerLeaseId: reusableLease.providerLeaseId,
leaseMetadata: reusableLease.metadata ?? undefined,
...(input.agentId ? { agentId: input.agentId } : {}),
},
resolvePluginSandboxRpcTimeoutMs(workerConfig),
).then((resumed) =>