From 43d99b03bfa70bc2ae7080d7d0b2bfa02f88a81e Mon Sep 17 00:00:00 2001 From: Devin Foley Date: Sat, 20 Jun 2026 11:59:06 -0700 Subject: [PATCH] Scope Claude sandbox effort probe cache by environment --- .../adapters/claude-local/src/server/cli-capabilities.ts | 1 - server/src/__tests__/claude-local-execute.test.ts | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/adapters/claude-local/src/server/cli-capabilities.ts b/packages/adapters/claude-local/src/server/cli-capabilities.ts index d7867faad0b..92964823498 100644 --- a/packages/adapters/claude-local/src/server/cli-capabilities.ts +++ b/packages/adapters/claude-local/src/server/cli-capabilities.ts @@ -19,7 +19,6 @@ function cacheKeyForTarget(command: string, target: AdapterExecutionTarget | nul "sandbox", target.providerKey ?? "", target.environmentId ?? "", - target.leaseId ?? "", command, ].join(":"); } diff --git a/server/src/__tests__/claude-local-execute.test.ts b/server/src/__tests__/claude-local-execute.test.ts index 2f820c3595f..0ee4c86177b 100644 --- a/server/src/__tests__/claude-local-execute.test.ts +++ b/server/src/__tests__/claude-local-execute.test.ts @@ -873,7 +873,7 @@ describe("claude execute", () => { } }, 10_000); - it("passes through --effort and reuses the sandbox capability probe when the installed Claude CLI advertises it", async () => { + it("passes through --effort and reuses the sandbox capability probe across sandbox leases when the installed Claude CLI advertises it", async () => { const root = await fs.mkdtemp(path.join(os.tmpdir(), "paperclip-claude-execute-sandbox-effort-supported-")); const { workspace, commandPath, capturePath, restore } = await setupExecuteEnv(root, { commandWriter: writeHelpWithEffortClaudeCommand, @@ -929,6 +929,10 @@ describe("claude execute", () => { const second = await execute({ runId: "run-sandbox-effort-supported-2", ...baseInput, + executionTarget: { + ...baseInput.executionTarget, + leaseId: "lease-2", + }, }); expect(first.exitCode).toBe(0);