Scope Claude sandbox effort probe cache by environment

This commit is contained in:
Devin Foley committed 2026-06-20 11:59:06 -07:00
1 parent 42fded2180
commit 43d99b03bf
2 files changed
+5 -2

No files matched your search

@@ -19,7 +19,6 @@ function cacheKeyForTarget(command: string, target: AdapterExecutionTarget | nul
"sandbox",
target.providerKey ?? "",
target.environmentId ?? "",
target.leaseId ?? "",
command,
].join(":");
}
@@ -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);